||SmallPort Delphi Component.
Thank you for trying SmallPort Component.
This component allows you to reach hardware ports using "smport.vxd" driver with Win95/98.
It works a little bit faster and stable than regular assembler commands, that they usual use to reach h/w ports in Win95/98.
To install this component use Component >>Install Package>>Add>> HWTool4.bpl-for Delphi4 or HWTool3.dll-for Delphi3.
For Delphi2 use Component >>Install Component>>Browse>> \\..\SmallPort.pas
Copy file "smport.vxd" to Windows\System directory or to directory of your application.
Put component on your form and set property Opened to true. SmPort will open driver and now is ready to perform I/O operations. If you see message, that it's impossible to open driver, it means that driver is not in
application's folder and not ii System folder. Fix it and try again.
Opened - read/write : boolean : open and close "smport.vxd".
DriverHandle -read only : boolean: handle of driver.
IOResult : read only: boolean :true if last I/O operation successful.
Port : read/write : array: implementation Pascal array Port[portaddress].
Procedures and functions:
Create : constructor.
Destroy : destructor.
ReadByte: function, read byte from given port.
WriteByte : procedure, writes byte to port with given adress.
ReadWord: function, read word from given port.
WriteWord : procedure, writes word to port with given adress.
ReadDWord: function, read dword from given port.
WriteDWord : procedure, writes dword to port with given adress.
I use this component with Delphi 4, but I don't see any problem to use it with other 32 bit versions
Text of driver available by request, I wrote it using Win95 DDK.
I got some mail,where they said me, that SmallPort impossible to install
on Delphi 3. I checked it and made small changes: all declarations "xxx: Cardinal;" replaced
with "xxx: DWORD". Now I tested SmallPort on Delphi 3.
I include small demo program in zip file. Don't forget to copy "smallport.vxd" to your
"WINDOWS\SYSTEM" directory!(Or in the same directory where your program is).
New: I add new function: SpeakerOn and SpeakerOff like old Pascal Sound and Nosound procedures.
Also new procedure Sound(...), that gets as parameters frequency and duration and output
sound to PC-Speaker.
New: I add 2 properties: PortW-read and write to port WORD and PortDW -DWORD.
Contact the author
Please direct all correspondence to Alexander Weitzman at: mailto: email@example.com
Please be generous with questions, comments and suggestions.
Thanks and hope to hear from you soon.