The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Armindilo on February 26, 2006, 08:45:45 PM

Title: WinIo in assembly
Post by: Armindilo on February 26, 2006, 08:45:45 PM
Hi All,
I am trying to control ports and so I am going to use WinIo. I read that WinIo now supports asm, without AsmIo. So what do I need to put in my code to be able to use WinIo in my assembly code? I have the following lines of code at the start

InitializeWinIo          PROTO STDCALL
ShutdownWinIo            PROTO STDCALL
includelib WinIo.lib

This does not work. It says WinIo is not a valid library file. Do I possibly need another library to help read this one? Any help is greatly appreciated.

Thanks
Armindilo
Title: Re: WinIo in assembly
Post by: PBrennick on February 26, 2006, 11:22:58 PM
Armindilo,
Read the following post, it has example code from a person I trust...

http://www.masmforum.com/simple/index.php?topic=3894.0

The test app is in the download, be sure to get it.

Paul
Title: Re: WinIo in assembly
Post by: Armindilo on February 27, 2006, 06:39:13 PM
I still get an invalid library error with those files. Maybe I will reinstall masm.

Armindilo
Title: Re: WinIo in assembly
Post by: MichaelW on February 27, 2006, 09:25:36 PM
Hi Armindilo,

QuoteIt says WinIo is not a valid library file.

What is "it", and what was the error message that led you to this conclusion?

If the winio.lib is the one I posted, the langtype field in the prototype needs to be SYSCALL. If you use STDCALL then the procedure names are _InitializeWinIo and _ShutdownWinIo, instead of InitializeWinIo and ShutdownWinIo as they appear in the source file, and in the import library. Why not use the winio.inc that I provided?