473,249 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,249 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 1528

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

Similar topics

1
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
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
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
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
by: David A. Osborn | last post by:
Can anyone point me to a website for using VB.net and Bluetooth together?
0
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
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
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
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
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.