S
srks
Hi i am calling a function in Native c++ .dll from .NetCF 3.5 app
the function takes char * as one of the args.
code snippets:
in C++
int SendResponse(int Bus, char *response_msg, int msg_size)
in C#
[DllImport("NIDeviceWrapper.dll")]
public static extern int SendResponse(int Bus,
StringBuilder response_msg,
int msg_size);
// call to the native code
ResponseSb = new StringBuilder(ResponseString);
// Send the response message through the library interface.
status = cNiDeviceWrapper.SendResponse(cDevice.ActiveBus,
ResponseSb, ResponseSb.Length);
i am getting a pointer to Unicode chars as an argument in the c++ code
rather than a pointer to bytes.
how do i solve this so that i get a pointer to bytes as in C++ code.
the function takes char * as one of the args.
code snippets:
in C++
int SendResponse(int Bus, char *response_msg, int msg_size)
in C#
[DllImport("NIDeviceWrapper.dll")]
public static extern int SendResponse(int Bus,
StringBuilder response_msg,
int msg_size);
// call to the native code
ResponseSb = new StringBuilder(ResponseString);
// Send the response message through the library interface.
status = cNiDeviceWrapper.SendResponse(cDevice.ActiveBus,
ResponseSb, ResponseSb.Length);
i am getting a pointer to Unicode chars as an argument in the c++ code
rather than a pointer to bytes.
how do i solve this so that i get a pointer to bytes as in C++ code.