471,624 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Bluetooth API in Class Library - problem

Hi
I have two applications: Windows form application and Class library.
In both of them I have a code:

HANDLER hRadio;
BLUETOOTH_RADIO_INFO RadioInfo;
....
HBLUETOOTH_RADIO_FIND hFind = BluetoothFindFirstRadio( &btfrp, &hRadio );
....
DWORD result = BluetoothGetRadioInfo(hRadio, &RadioInfo);
.....
In the first application everything works fine (Windows Form), in the Class
library function BluetoothGetRadioInfo(hRadio, &RadioInfo) returns error 6 -
ERROR_INVALID_HANDLE. Both applications works in the same environment.
I guess that BluetoothFindFirstRadio returns wrong handler to hRadio, but
I'm not sure because returned handler "hFind" is not NULL (as in the error
case).

In the Class Library project I have public __gc interface, public __gc class
which inherits this interface and private __nogc class which includes this
code.
I don't understand why with one solution everything is OK and with the other
it isn't.
Is there a problem with the managed and the native code? Or mayby I use
functions from another library (irprops.lib, irprops.cpl ...) in my library?
I have no idea. :(

I use vs .net 2003.

Thanks for any advice
funitsu

Jul 21 '05 #1
0 1488

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by TI | last post: by
1 post views Thread by Luis | last post: by
1 post views Thread by David A. Osborn | last post: by
reply views Thread by funitsu | last post: by
4 posts views Thread by Boki | last post: by
7 posts views Thread by haytham D | last post: by
6 posts views Thread by jabslim | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.