全部博文(788)
分类:
2009-02-03 09:54:28
procedure TForm1.Button1Click(Sender: TObject);
type
SplitString =function SplitString(Source, Deli: string ): TStringList;stdcall;
var
OneHandle: THandle;
begin
OneHandle := LoadLibrary('DLLSplitString.dll');
try
if OneHandle <> 0 then
@SplitString := GetProcAddress(OneHandle, 'SplitString');
if not (@SplitString = nil) then
...
else
RaiseLastWin32Error;
finally
FreeLibrary(OneHandle);
end;
end;
SplitString标识符未定义。
procedure TForm1.Button1Click(Sender: TObject);
var
OneHandle: THandle;
SplitString: function (Source, Deli: string): TStringList;
begin
OneHandle := LoadLibrary('DLLSplitString.dll');
try
if OneHandle <> 0 then
SplitString := GetProcAddress(OneHandle, 'SplitString');
if SplitString <> nil then
...
else
RaiseLastWin32Error;
finally
FreeLibrary(OneHandle);
end;
end;