I have added these two methods to the 1st unit of my Delphi 5 application.
function Inp(PortAddress: Integer): Integer; stdcall; external 'inpout32.dll' name 'Inp32';
procedure Output(PortAddress, Value: Integer); stdcall; external 'inpout32.dll' name 'Out32';
However I don't want to have to issue the inpout32 library with the software unless they explicitly need it. Currently the program says "Not Found" upon executing unless they're present in the root or System32.
Users will only call these methods if they have a specific option set, but this is not gathered from the .ini file until after the inpout library is used.
Is there a way to only use this library when required like some components do, rather than declaring it the way I have?
LoadLibrary
andGetProcAddress
, as discussed here. – Cordes