serial port

BlitzMax Forums/BlitzMax Programming/serial port

@Odriozola Almeida, something like this:

Global	DllHandle=LoadLibraryA("DLPORTIO.dll")

Global	DlPortReadPortUchar:Byte( port:Int )"Win32"=GetProcAddress(DllHandle,"DlPortReadPortUchar")
Global	DLPortReadPortUshort:Short( port:Int )"Win32"=GetProcAddress(DllHandle,"DLPortReadPortUshort")
Global	DLPortReadPortUlong:Int( port:Int )"Win32"=GetProcAddress(DllHandle,"DLPortReadPortUlong")

Global	DlPortReadPortBufferUchar( port:Int, buffer:Byte Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortReadPortBufferUchar")
Global	DlPortReadPortBufferUshort( port:Int, buffer:Short Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortReadPortBufferUshort")
Global	DlPortReadPortBufferUlong( port:Int, buffer:Int Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortReadPortBufferUlong")

Global	DlPortWritePortUchar( port:Int, value:Byte )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortUchar")
Global	DlPortWritePortUshort( port:Int, value:Short )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortUshort")
Global	DlPortWritePortUlong( port:Int, value:Int )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortUlong")

Global	DlPortWritePortBufferUchar( port:Int, buffer:Byte Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortBufferUchar")
Global	DlPortWritePortBufferUshort( port:Int, buffer:Short Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortBufferUshort")
Global	DlPortWritePortBufferUlong( port:Int, buffer:Int Ptr, count:Int )"Win32"=GetProcAddress(DllHandle,"DlPortWritePortBufferUlong")