Loading and unloading WinIO64.dll

So currently spent 2 days on this and developed a migraine as well :) (yay).

I have found in my program loading the DLL (LoadLibrary) and initialising it works fine and dll methods work fine too.

However I noticed when exiting my APP I found I was not calling shutdown on the dll and not unloading the DLL(FreeLibrary).

I corrected the mistake, App work fine still. But only the first time its ran.

So,
I turn computer off and on, run APP DLL loads and unloads fine and initialise and shutdown of dll return pass.

exit App run again this time DLL loads fine but initialise fails, same with unload DLL but shutdown of dll returns fail.

I went back to how to was just initialising and loading the dll and no unloading and it works perfect.

If anyone go any more info on WinIO64 that would be great. As google has not got much info on it.

Thank you in advance.
Did you examine the error codes returned by LoadLibrary() or FreeLibrary()? What are the corresponding error messages?
What it is WinIO64.dll ?
Could well be this (see WinIo)
http://www.internals.com/
LoadLibrary() returns a handle and if it fails is NULL, I don't get NULL and FreeLibrary returns Zero if failed and non zero if not.

Both these commands run through fine, but the initialize dll and shutdown dll's fail on second run of APP.

(InitializeWinIo())
(ShutdownWinIo())
Last edited on
If LoadLibrary() fails (returning NULL), you call GetLastError() to obtain the error number, and FormatMessage() to obtain the error message.

Is LoadLIbrary() failing? If yes, get the error code and error message. Same for FreeLibrary().

If function calls inside this library you are using are failing, refer to their documentation to know how to proceed. They don't seem to be part of Windows.
Did you followed this steps exactly ?

Driver Signing Requirements on 64-bit Systems

64-bit versions of Windows only load device drivers that are signed by a code signing certificate issued by a public CA such as Verisign, Thawte, etc. WinIo64.sys must not be deployed on production machines unless a code signing certificate is obtained and used to sign this file. The bundled copy of WinIo64.sys is signed with a self-signed certificate and can only be used on development/test machines with Windows running in a special "test" mode. In order to use the bundled version of WinIo64.sys, you need to take the following steps:

Open an elevated command window by right-clicking the icon and clicking "Run as Administrator".
Type the following command to enable test-signing:

bcdedit.exe /set TESTSIGNING ON

Reboot the machine

For more information on Windows driver signing requirements, please refer to http://www.microsoft.com/whdc/winlogo/drvsign/kmcs_walkthrough.mspx
WebJose
LoadLIbrary() and FreeLibrary() are not failing.

Everything works perfect when I first run the APP. Then on the second start up, the only things which fail are InitializeWinIo() and ShutdownWinIo().

It seems at the moment just calling LoadLIbrary() and InitializeWinIo() Without FreeLibrary() and ShutdownWinIo() the APP works perfect.

Modoran
Checking out your link now

Thank you all with the help.
Last edited on
@banburybug, that information was copy pasted from WinIO documentation. You did not read it ?
Interesting If I just don't call ShutdownWinIo() everything works.
Topic archived. No new replies allowed.