Reading Infrared Ports
Keywords: Reading Infrared Ports
Question:
Do you know of a way to send and capture infrared signals?Answer:
Hmmm. If you have W98 or later the winsock api supports infrared programming , i would say is possible with winbatch, not easy though.After enabling my infrared port this code showed a valid socket handle:
wsock32=strcat(dirwindows(1),"wsock32.dll") SOCK_STREAM=1 AF_IRDA=26 WSADATA=binaryalloc(398) ver=binaryalloc(2) binarypoke(ver,0,1) binarypoke(ver,1,1) r=dllcall(wsock32,long:"WSAStartup",word:binarypeek2(ver,0),lpbinary:WSADATA) binaryfree(ver) binaryfree(WSADATA) ;message("start",r) hsocket=dllcall(wsock32,long:"socket",long:AF_IRDA,long:SOCK_STREAM,long:0) message("socket",hsocket)some links:http://msdn.microsoft.com/library/en-us/irda/irda/about_irda.asp http://msdn.microsoft.com/library/en-us/wcewinsk/htm/_wcecomm_Creating_an_Infrared_Winsock_Application.aspor search for 'IrDA Sockets' at http://msdn.microsoft.com