請問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)