Reputation: 266
I have a DLL (CliSiTef32I.dll) and I need to call the following methods on my C# code:
//The DLL can be downloaded at http://54.197.252.236/se/CliSiTef32I.dll
long ConfiguraIntSiTefInterativoEx(
char* IPSiTef,
char* IdLoja,
char* IdTerminal,
short Reservado,
char* ParametrosAdicionais
)
long IniciaFuncaoSiTefInterativo(
long Funcao,
char* Valor,
char* CupomFiscal,
char* DataFiscal,
char* HoraFiscal,
char* Operador,
char* ParamAdic
)
How can I do this?
Upvotes: 1
Views: 252
Reputation: 10201
These might do the job:
[DllImport("CliSiTef32I.dll")]
public static extern int ConfiguraIntSiTefInterativoEx (
byte[] IPSiTef,
byte[] IdLoja,
byte[] IdTerminal,
short Reservado,
byte[] ParametrosAdicionais)
[DllImport("CliSiTef32I.dll")]
public static extern int IniciaFuncaoSiTefInterativo (
long Funcao,
byte[] Valor,
byte[] CupomFiscal,
byte[] DataFiscal,
byte[] HoraFiscal,
byte[] Operador,
byte[] ParamAdic)
I'm not entirely sure about the meaning of short
though. If that's a 16 bit signed int, this will work.
Also, if the 32 bit int that you are returning is really a bool, you might declare the return value as such.
Upvotes: 2