Hi,
Thats an interesting dll but I have a problem with the name "iodll.dll".
You might try this WinIO.dll from http://www.internals.com
You would have to do your own bit fiddle functions or you can use it as a starting point on converting the IO dll
Other Threads:
http://www.realgametools.net/forums/index.php?board=14;action=display;threadid=14640
http://www.darkbasicpro.com/apollo/view.php?t=8469&b=1
If you want to create the plugin then just folllow the API instructions to create the string table.
----- winiotest.dba -----
rem DBP WINIO sample (Call DLL)
Port as WORD
Port = 0x378
PortVal as DWORD
PortVal = 0
FormFeed = 12
#constant WINIODLL 1
load dll "winio.dll",WINIODLL
Ret = call dll(WINIODLL, "InitializeWinIo")
print "InitializeWinIo = ";Ret
rem RetPortVal was added to winio.dll to return the value
rem instead of passsing the address of a variable.
PortVal = call dll(WINIODLL, "RetPortVal", Port, 4)
print "RetPortVal = ";PortVal
Ret = call dll(WINIODLL, "SetPortVal", Port, FormFeed, 4)
print "SetPortVal = ";Ret
Ret = call dll(WINIODLL, "ShutdownWinIo")
print "ShutdownWinIo = ";Ret
delete dll WINIODLL
wait key
----- Create winio.def -----
LIBRARY WINIO
EXPORTS
InitializeWinIo
ShutdownWinIo
MapPhysToLin
UnmapPhysicalMemory
GetPhysLong
SetPhysLong
GetPortVal
SetPortVal
InstallWinIoDriver
RemoveWinIoDriver
RetPortVal
----- winio.h -----
#ifndef WINIO_H
#define WINIO_H
#ifdef WINIO_DLL
#define WINIO_API _declspec(dllexport)
#else
#define WINIO_API _declspec(dllimport)
#endif
extern "C"
{
WINIO_API bool _stdcall InitializeWinIo();
WINIO_API void _stdcall ShutdownWinIo();
WINIO_API PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
WINIO_API bool _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
WINIO_API bool _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
WINIO_API bool _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);
WINIO_API bool _stdcall GetPortVal(WORD wPortAddr, PDWORD pdwPortVal, BYTE bSize);
WINIO_API bool _stdcall SetPortVal(WORD wPortAddr, DWORD dwPortVal, BYTE bSize);
WINIO_API bool _stdcall InstallWinIoDriver(PSTR pszWinIoDriverPath, bool IsDemandLoaded = false);
WINIO_API bool _stdcall RemoveWinIoDriver();
//
//Added Function
//
WINIO_API DWORD _stdcall RetPortVal(WORD wPortAddr, BYTE bSize);
}
extern bool IsNT;
extern HANDLE hDriver;
extern bool IsWinIoInitialized;
bool _stdcall StartWinIoDriver();
bool _stdcall StopWinIoDriver();
#endif
----- Add to port32.cpp -----
DWORD _stdcall RetPortVal(WORD wPortAddr, BYTE bSize)
{
DWORD dwPortVal;
GetPortVal(wPortAddr, &dwPortVal, bSize);
return dwPortVal;
}