海康威视8016硬盘录象机,NET_DVR_SetDVRConfig叠加字符结构问题
有如下几个问题:其一,有如下C++声明的两个结构体,如何转换成C#的结构体:typedef struct {
DWORD dwShowString;
WORD wStringSize;
WORD wShowStringTopLeftX;
WORD wShowStringTopLeftY;
char sString[44];
}NET_DVR_SHOWSTRINGINFO, *LPNET_DVR_SHOWSTRINGINFO;
typedef struct {
DWORD dwSize;
NET_DVR_SHOWSTRINGINFO struStringInfo[MAX_STRINGNUM_V30];
}NET_DVR_SHOWSTRING_V30, *LPNET_DVR_SHOWSTRING_V30;
其二,函数如何声明成C#的方式:BOOL NET_DVR_SetDVRConfig(
LONG lUserID,
DWORD dwCommand,
LONG lChannel,
LPVOID lpInBuffer,
DWORD dwInBufferSize
)
事例NET_DVR_SetDVRConfig(lUserID, NET_DVR_SET_DEVICECFG, 0, &devicecfg, sizeof(NET_DVR_DEVICECFG))
其三,如果哪位兄台有这方面的例子,请联系我,论坛里可以直接找我或邮箱zhslls@63.com
分数觉得不够,可以追加,
--------------------编程问答-------------------- 易做图自己占沙发。。。 --------------------编程问答-------------------- strust NET_DVR_SHOWSTRINGINFO
{
int dwShowString;
int wStringSize;
int wShowStringTopLeftX;
int wShowStringTopLeftY;
[MarshalAs(UnmanagedType.LPArray, SizeConst = 44)]
char[] sString;
}
第二个不清楚 --------------------编程问答-------------------- 第二个问题
[DllImport("HCNetSDK.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
public static extern bool NET_DVR_SetDVRConfig(int ID, uint Command, int Channel, IntPtr InBuffer,uint dwOutBufferSize);
补充:.NET技术 , 其他语言