Newbie: Where are SetCommMask, GetCommState, etc?

Mark Hammond mhammond at skippinet.com.au
Thu Oct 31 19:05:24 EST 2002


engsol at teleport.com wrote:
> The crime scene:
> 
> Win NT, Python222, Mark Hammond's book on Win32, and win32comport_demo.py
> 
> The problem:
> 
> I connected my machine to another machine running Hyperterminal, using a null-modem cable,
> then fired up the demo. Works just fine.
> 
> Now I want to learn in detail how it works. The demo script refers to SetCommMask,
> SetupComm, GetCommState, etc., but I can't find an explanantion how they work.
> 
> I want to poke and prod my com ports, including the UART registers.
> 
> Any pointers? Thanks....

These are all just wrappers for the Win32 API.  See msdn.microsoft.com 
for details on how these functions work.

I am pretty sure that Win2k at least will not allow direct prodding of 
the UART, and that Python on Win9x wont be much help in such prodding 
(at least not without calldll)

Mark.




More information about the Python-list mailing list