Hi!
I am statically loading a dll from a service.
The function in the dll is declared as this:
Delphi-Quelltext
1:
| function TrInitTransportDriver(s: PChar):integer; stdcall; external 'Transport.dll'; |
and the function is used in my code as this:
Delphi-Quelltext
1:
| if TrInitTransportDriver('Devices.ini') = 1 then begin |
But the function never returns 1, only 0. I know nothing about the function, except that it is supposed to return 1.
BUT, here is the strange part.
If i take my code and paste it into a new empty vcl project... IT WORKS! But in my service, it doesn't.
Are there anything special about services i don't know?
I have double-checked that the file Transport.dll excists in the correct folder.