Board index » delphi » Calling DLL's in Delphi V1?

Calling DLL's in Delphi V1?

I am trying to use the Formula Spreadsheet VBX in Delphi V1 but am unable
to call any dll functions out of the VTSSDLL.DLL library.

 I have managed to get a handle to the library (at least the handle is
non zero) but thats about it.
Here is some sample code.

type
 TSSArb = Function (SheetHandle:THandle):Integer;

var
GotoDlg : TSSarb;
a : Integer;
LibHandle: Thandle;

LibHandle := LoadLibrary('VTSSDLL.DLL');
@GotoDlg := GetProcAddress(LibHandle, 'SSGotoDlg');
a:=gotoDlg (SSSpreadsheet.Handle);

This does nothing, can any body help

 

Re:Calling DLL's in Delphi V1?


Edward de la Rey wrote:

Quote

> I am trying to use the Formula Spreadsheet VBX in Delphi V1 but am unable
> to call any dll functions out of the VTSSDLL.DLL library.

>  I have managed to get a handle to the library (at least the handle is
> non zero) but thats about it.
> Here is some sample code.

> type
>  TSSArb = Function (SheetHandle:THandle):Integer;

> var
> GotoDlg : TSSarb;
> a : Integer;
> LibHandle: Thandle;

> LibHandle := LoadLibrary('VTSSDLL.DLL');
> @GotoDlg := GetProcAddress(LibHandle, 'SSGotoDlg');

Don't need the @. Might actually be what's causing you trouble.

Quote
> a:=gotoDlg (SSSpreadsheet.Handle);

M.

--
Martin Larsson, author of several unknown utilities for DOS and Windows.
mailto:martin.lars...@delfi-data.msmail.telemax.no
http://www.delfidata.no/users/~martin
X.400:G=martin;S=larsson;O=delfi-data;P=msmail;A=telemax;C=no

Other Threads