i'm trying to use the Widcomm bluetooth stack by Broadcomm and it should work but there's one thing that still i cannot understand: HOW CAN I AUTOMATICALLY OPEN THE VIRTUAL COM WHEN I NEED TO COMMUNICATE?
i am trying to use SPP (Serial Port Profile) but the documentation with the SDK is not so exaustive.
PLEASE, I JUST CANNOT USE 32FEET!
I wrapped the SPP Server part of the API:
[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);
What is pszServiceName? where i can find it? and hWnd and nMsg???
Thanks