一段代码
if not FileExists(ExtractFilePath(Application.ExeName)+'demo.dll') then
raise Exception.CreateFmt('Can not find file %s', ['demo.dll']); LibHandle := LoadLibrary(PChar('demo.dll'));
if LibHandle = 0 then
raise Exception.CreateFmt('%s 文件加载出错', ['demo.dll']);
try
@GetSIMICCID := GetProcAddress(LibHandle, 'GetSIMICCID');
if @GetSIMICCID = Nil then
raise Exception.CreateFmt('在 %s 中找不到程序 %s', ['demo.dll','GetSIMICCID']);
Result:=GetSIMICCID(sim);
finally
FreeLibrary(LibHandle);
end;
客户老是报"'demo.dll'文件加载出错"
而我的机器又不会
很奇怪呀
if not FileExists(ExtractFilePath(Application.ExeName)+'demo.dll') then
raise Exception.CreateFmt('Can not find file %s', ['demo.dll']); LibHandle := LoadLibrary(PChar('demo.dll'));
if LibHandle = 0 then
raise Exception.CreateFmt('%s 文件加载出错', ['demo.dll']);
try
@GetSIMICCID := GetProcAddress(LibHandle, 'GetSIMICCID');
if @GetSIMICCID = Nil then
raise Exception.CreateFmt('在 %s 中找不到程序 %s', ['demo.dll','GetSIMICCID']);
Result:=GetSIMICCID(sim);
finally
FreeLibrary(LibHandle);
end;
客户老是报"'demo.dll'文件加载出错"
而我的机器又不会
很奇怪呀
就需要DELPHI的一个系统DLL,你的机器上装了DELPHI,所以用起来没有问题,
客户的机器上没有,所以就不行了。
可能是路径的问题