Solved

IRDA SDK

Posted on 2002-04-17
8
540 Views
Last Modified: 2012-06-21
hi

I developed a programme using IRDA SDK .

the following code gives me the error even i included winsock32.lib or ws2_32.lib.

The platform SDK clearly specifies IRDA support.


the WSAGetLastError() returns me  10047
stating "Address family not supported by protocol family. "

this is from MSDN :

SOCKET ServSock;

     if ((ServSock = socket(AF_IRDA, SOCK_STREAM, 0)) == INVALID_SOCKET)
     {
             printf("\n error in sockets : %d", WSAGetLastError());
             return;
     }


apart form this if any one give me a sample code on IRDA it will be helpful.


Many Thanks!!!
0
Comment
Question by:havman56
8 Comments
 

Accepted Solution

by:
adamretter earned 50 total points
ID: 6950957
I also receive the same problem on my WinXP Pro system.

If you search the Platform SDK it mentions using the IrDA the same way as tcp/ip sockets, however this does not seem to work for yourself of myself, however I dont have an IrDA port physically connected to my machine - so perhaps that is the problem.

In the PatformSDK it also mentions IrCOMM which is an older way of doing IR communication, this has been replaced by IrDA sockets now as far as I can see but may still be work a look.
0
 

Expert Comment

by:adamretter
ID: 6950971
I also receive the same problem on my WinXP Pro system.

If you search the Platform SDK it mentions using the IrDA the same way as tcp/ip sockets, however this does not seem to work for yourself of myself, however I dont have an IrDA port physically connected to my machine - so perhaps that is the problem.

In the PatformSDK it also mentions IrCOMM which is an older way of doing IR communication, this has been replaced by IrDA sockets now as far as I can see but may still be work a look.
0
 

Expert Comment

by:adamretter
ID: 6950973
I have also found this in the PlatformSDK


IrDA and Af_irda.h
The Af_irda.h header file must be included by Windows Sockets applications to support IrDA. Several incompatible versions of Af_irda.h have been distributed, including those shipped with Windows CE and Windows 95 Ir3.0 DDKs and SDKs. A common Af_irda.h header file that supports all three platforms is available with the Windows IrDA DDK. This file may continue to evolve as Windows programmatic elements and platforms continue to merge.

To compile for a target platform, one of the following must be defined:

_WIN32_WINNT
_WIN32_WCE
_WIN32_WINDOWS
0
 
LVL 4

Author Comment

by:havman56
ID: 6952761
adam

thanks for response...

i included the af_irda.h file and in my code.

i also defined _WIN32_WINDOWS in my project settings.


do u know any microsoft site so that we can palce teh querry.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:mirtol
ID: 7011951
Use wsock32.lib

:o)
0
 
LVL 11

Expert Comment

by:griessh
ID: 7122099
Dear havman56

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to

     "refund the points and PAQ at zero points"

since nobody had a satisfying answer for you.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 4

Author Comment

by:havman56
ID: 7122121
sure griesh

i solved the problem of my own

but iw aited long if anyone gives me good answer.

but instead of closing the question without points  i feel i can give points to adamretter ..who had taken initiative to solve my problem.


0
 
LVL 4

Author Comment

by:havman56
ID: 7122133
Thnaks for all but sopecial thaks to adam retter to take initiative in solving my rpoblem
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now