PDA

View Full Version : Basic IO with infrared reciver/remote? (need a little guiden



Ron
October 13th, 2002, 01:55 PM
A book:
http://www.oreilly.com/catalog/win32api/
The win32 helpfile
ftp://ftp.borland.com/pub/delphi/techpubs/delphi2/win32.zip
The MS starts guide
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win32/win32start_1xyd.asp
The online help index
http://leb.net/wine/WinDoc/funcIndex-MSFT.html

Ron
October 13th, 2002, 01:55 PM
Also use Google, tons of stuff out there.

Mark F
October 13th, 2002, 01:55 PM
Welcome to Girder.

Check out the Generic UIR or IR/UIR sources on the download page. Look for the "CreateFile" call. This returns a device handle. Look for all instances of calls using this handle. This will show you the important Win32 interfaces for manipulating a device (like the com port).

ReadFile reads data from a handle.
WriteFile writes to a handle.
GetCommModemStatus gets the modem status.
SetCommTimeouts changes the timeout values for a COM port.
GetCommState retrieves the Device COntrol Block (DCB).
SetCommState changes the DCB.
EscapeCommFunction lets you change the state of individual handshaking lines.
PurgeComm flushes all data in the device driver.
CloseHandle releases the device handle and all the resources it uses.

Another useful function is GetOverlappedResult which allows you to use overlapped IO. This means you can start a request and do other work while the request completes asynchronously. This capability is specified on the CreateFile call.

Good luck. :smile:

Limca3
October 13th, 2002, 01:55 PM
Well i know the igor plugin works with the packardbell remote, but i just got my packardbell remote and i want to play around a little. How would i do basic serial io, so i could recive the data that is sent by the remote when its pressed. Anyone have any example source or something i can learn from? I checked out the source for some of the plugins, but i dont know how i could implement their io functions....please help :smile:

Limca3
October 13th, 2002, 01:55 PM
how would i find out what parameters each function takes? Im going to attempt to make a short vb program in win2k to use it...