473,386 Members | 1,720 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,386 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 1535

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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...

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.