T
tutush
Hi there,
I have problem with importing my C++ code to C#.
The c++ looks like these
extern _declspec(dllexport) const char*
SendAndReceiveBufferedWrp(__int64 hConnection, const char*
pchSendBuffer, int iCmdDataMode,unsigned long bufferLength, unsigned
long * pulNumBytesRcved) {
}
And the C#
[DllImport("\\dll\\Test.dll", EntryPoint =
"SendAndReceiveBufferedWrp")]
unsafe private static extern string
SendAndReceiveBufferedDll(Int64 connection, string sendBuffer,int
cmdDataMode,ulong bufferLength,ref ulong numbytes);
unsafe public string SendAndReceiveBuffered(Int64 connection,
string sendBuffer,int cmdDataMode,ulong bufferLength,out ulong
numbytes)
{
return SendAndReceiveBufferedDll(connection, sendBuffer,
cmdDataMode, bufferLength,ref numbytes);
}
in the c++ the pulNumBytesRcved pointer is allways NULL there is no
address passed.
Could somebody help me with thise ?
Thanks in advance.
I have problem with importing my C++ code to C#.
The c++ looks like these
extern _declspec(dllexport) const char*
SendAndReceiveBufferedWrp(__int64 hConnection, const char*
pchSendBuffer, int iCmdDataMode,unsigned long bufferLength, unsigned
long * pulNumBytesRcved) {
}
And the C#
[DllImport("\\dll\\Test.dll", EntryPoint =
"SendAndReceiveBufferedWrp")]
unsafe private static extern string
SendAndReceiveBufferedDll(Int64 connection, string sendBuffer,int
cmdDataMode,ulong bufferLength,ref ulong numbytes);
unsafe public string SendAndReceiveBuffered(Int64 connection,
string sendBuffer,int cmdDataMode,ulong bufferLength,out ulong
numbytes)
{
return SendAndReceiveBufferedDll(connection, sendBuffer,
cmdDataMode, bufferLength,ref numbytes);
}
in the c++ the pulNumBytesRcved pointer is allways NULL there is no
address passed.
Could somebody help me with thise ?
Thanks in advance.