我試圖使用Broadcomm的Widcomm藍牙堆棧,它應該工作,但有一件事仍然我不明白:如何當我需要時自動打開虛擬COM通信?Widcomm藍牙:如何打開虛擬COM
我正在嘗試使用SPP(串行端口配置文件),但SDK的文檔並不那麼具有說服力。
請,我不能使用32FEET!
我包API的SPP服務器部分:
[DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
internal static extern IntPtr CreateSppServer(IntPtr pStack);
[DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
internal static extern void DeleteSppServer(IntPtr pServer);
[DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
internal static extern bool SppServerStart(IntPtr pServer, IntPtr pszServiceName);
[DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
internal static extern bool SppServerStop(IntPtr pServer);
[DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
internal static extern IntPtr SppServerNotifyWindow(IntPtr pServer, IntPtr hWnd, int nMsg);
什麼是pszServiceName?哪裏可以找到它? 和hWnd和nMsg?
感謝
是的,我已經看到了示例,但包裝沒有實施SPP服務,我試圖添加到項目中,實際上上面的代碼片段是由我寫的 – Sunrising 2010-01-07 11:26:21
此外32feet不好如果你想賣你的產品! – Sunrising 2010-01-07 16:24:46