How would one "translate" following C++ function
LONG CALL_METHOD NET_SDK_Login(
char *sDVRIP,
WORD wDVRPort,
char *sUserName,
char *sPassword,
LPNET_SDK_DEVICEINFO lpDeviceInfo);
to .Net (C#) to be used with P/Invoke? I tried with
[DllImport("DVR_NET_SDK.dll", CallingConvention = CallingConvention.StdCall)]
public static extern int NET_SDK_Login(
[MarshalAs(UnmanagedType.LPStr)] string sDVRIP,
ushort wDVRPort,
[MarshalAs(UnmanagedType.LPStr)] string sUserName,
[MarshalAs(UnmanagedType.LPStr)] string sPassword,
out _net_sdk_deviceinfo devinfo);
But no luck. Can anyone help?