I have a DLL, whose functions i want to use in my c# code Here are the functions of that DLL :
extern "C"
{
__declspec(dllimport) const char* __stdcall ZAJsonRequestA(const char *szReq);
__declspec(dllimport) const wchar_t* __stdcall ZAJsonRequestW(const wchar_t *szReq);
__declspec(dllimport) const BSTR __stdcall ZAJsonRequestBSTR(BSTR sReq);
}
For the first function, i have used the syntax below :
My declaration is like this :
[DllImport("FANselect.dll", EntryPoint = "ZAJsonRequestA")]
private static extern string ZAJsonRequestA(string szReq);
and i try to invoke it using :
string sResult = ZAJsonRequestA(sRequest);
When i try to invoke the function, it goes out of the block and the following other statements donot get executed.
Can anyone tell me, what i am doing wrong here ?
how to use it in c# project, as this dll seems to be in other language ?