473,503 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1541

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7189
by: TI | last post by:
Where would you start if you wanted to program perhaps a java application to enable a bluetooth mobile phone to work as walkie-talkie? ( schematics, compilers... ) thanks
1
502
by: Luis | last post by:
Hi everybody! I would like to get the reception power (or the SNR) in a bluetooth phone, but I cannot find any bluetooth API that gives me this information. Can you help me, please? Thanks!...
2
5755
by: Alvin Lau | last post by:
Can I write pocket PC bluetooth program by using C# ? It seems so difficult to find the library? If it is possible , where can i find the reference of these kind of program ? *** Sent via...
0
1071
by: funitsu | last post by:
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 =...
1
1894
by: David A. Osborn | last post by:
Can anyone point me to a website for using VB.net and Bluetooth together?
0
341
by: funitsu | last post by:
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 =...
4
2219
by: Boki | last post by:
Hi All, I am going to use some Bluetotoh API, should I include some special DLL or just call it directly? Best regards, Boki.
7
3762
by: haytham D | last post by:
hey every one , i am lokking for a c#.net library to send and recive files via bluetooth , it does not has to be file transferring . its for my graduate project , workin in integrating my...
6
8493
by: jabslim | last post by:
excuse me, im a newbie programmer and i need a code on how to to be able to send files from a mobile phone to a pc through bluetooth in vb.net can anyone post a code here on how to detect a...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.