Solved

IRDA SDK

Posted on 2002-04-17
8
537 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 2

Expert Comment

by:mirtol
Comment Utility
Use wsock32.lib

:o)
0
 
LVL 11

Expert Comment

by:griessh
Comment Utility
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
Comment Utility
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
Comment Utility
Thnaks for all but sopecial thaks to adam retter to take initiative in solving my rpoblem
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

763 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

12 Experts available now in Live!

Get 1:1 Help Now