F
funitsu
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
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