Domanda

does anyone have a generic working example of the use of the ExpertR9.dll library of IAR VisualState with Delphi?

È stato utile?

Soluzione

Here is a DELPHI example of the loading of the SEM using 'late'binding:

Var
       DLLhandle : THandle;

Function SEM_Load(sStatemachineFilename : String) : Byte;
var
  Foo: function (filename : PChar) : Byte; {$IFDEF WIN32} stdcall; {$ENDIF}
  ProcAddres : farproc;
  cc: Byte;
 begin
     ProcAddres := GetProcAddress(DLLhandle, 'SEM_Load');
     If @ProcAddres <> NIL then
     Begin
       Foo := ProcAddres;
       cc  := Foo(Pchar(sStatemachineFilename));
     End;
     Result := cc;
 end;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top