1

有没有人有使用 Delphi 的 IAR VisualState 的 ExpertR9.dll 库的通用工作示例?

4

1 回答 1

2

这是一个使用“后期”绑定加载 SEM 的 DELPHI 示例:

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;
于 2011-11-21T15:09:28.933 回答