作者gd3727 (灿烂流星)
看板C_Sharp
标题[问题] C++转C#结构
时间Mon Jul 20 17:52:34 2009
请问C#要如何引用下面的 C++ 方法与指标结构?
//bt_api.h (coredll.dll)
HANDLE RegisterBluetoothCOMPort
(
LPCWSTR lpszType, // "BSP" or "COM"
DWORD dwIndex, // device index
PORTEMUPortParams* pParams // BT specific params
);
typedef struct _portemu_port_params {
int channel;
int flocal;
BT_ADDR device;
int imtu;
int iminmtu;
int imaxmtu;
int isendquota;
int irecvquota;
GUID uuidService;
unsigned int uiportflags;
} PORTEMUPortParams;
//ws2bth.h
typedef ULONGLONG bt_addr, *pbt_addr, BT_ADDR, *PBT_ADDR;
我只懂得…
[DllImport("coredll")]
private static extern int RegisterBluetoothCOMPort(
string lpszType,
uint dwIndex,......
接下来就不知道怎麽改写了…。谢谢。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 120.96.54.61
※ 编辑: gd3727 来自: 120.96.54.61 (07/20 17:55)