A
Ahmet
Hi All;
I have one dll in which I have some function calls about a legend system
that I dont want to rewrite using c#
In this DLL I have function prototype like below;
#define SWCOMM_API extern "C" __declspec(dllexport)
SWCOMM_API int SwCmdSend(int Code, char *Txn, char *TxnSub, char *src, int
time);
Using interop. services, I make on dll call to this function using the code
below
[DllImport("SwComm.dll")]
public static extern int SwCmdSend(int pi_code, string Txn, string TxnSub,
string src, int time);
In c#, my return value is -256 (that I am sure SwCmdSend func in dll never
returns this value)
and operation fails.
When I use same dll with same parameters in one vc++ MFC program return
value is as expected and
operation is completed.
What is wrong in this example with dll usage in c# ?
Thanks..
I have one dll in which I have some function calls about a legend system
that I dont want to rewrite using c#
In this DLL I have function prototype like below;
#define SWCOMM_API extern "C" __declspec(dllexport)
SWCOMM_API int SwCmdSend(int Code, char *Txn, char *TxnSub, char *src, int
time);
Using interop. services, I make on dll call to this function using the code
below
[DllImport("SwComm.dll")]
public static extern int SwCmdSend(int pi_code, string Txn, string TxnSub,
string src, int time);
In c#, my return value is -256 (that I am sure SwCmdSend func in dll never
returns this value)
and operation fails.
When I use same dll with same parameters in one vc++ MFC program return
value is as expected and
operation is completed.
What is wrong in this example with dll usage in c# ?
Thanks..