J
jack011
Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:
procedure DLLEntryPoint(dwReason: DWord);
begin
case dwReason of
DLL_PROCESS_ATTACH:CoInitialize(nil);//初始化
DLL_PROCESS_DETACH:CoUninitialize;//释放
end;
end;
function DllRegisterServer: HResult; stdcall;
begin
try
InstallService;
Result := S_OK;
except
Result := E_FAIL;
end;
end;
function DllUnregisterServer: HResult; stdcall;
begin
try
UninstallService;
Result := S_OK;
except
Result := E_FAIL;
end;
end;
function DllCanUnloadNow: HResult; stdcall;
begin
Result := S_OK;
end;
// 导出函数列表
exports
ServiceMain,
DllRegisterServer,
DllUnregisterServer,
InstallService,
UninstallService;
{ dll入口点 }
begin
DllProc := @DllEntryPoint;
DllEntryPoint(DLL_PROCESS_ATTACH);
end.
为什么我的外部加载程序退出时,程序报地址错误呢?
不知咋个释放这个东东,参考了不少办法,可是都没成功!
郁闷啊......我看过以前的帖子,好象此类问题最终都没有圆满解决,
希望各路高手帮帮我吧!
procedure DLLEntryPoint(dwReason: DWord);
begin
case dwReason of
DLL_PROCESS_ATTACH:CoInitialize(nil);//初始化
DLL_PROCESS_DETACH:CoUninitialize;//释放
end;
end;
function DllRegisterServer: HResult; stdcall;
begin
try
InstallService;
Result := S_OK;
except
Result := E_FAIL;
end;
end;
function DllUnregisterServer: HResult; stdcall;
begin
try
UninstallService;
Result := S_OK;
except
Result := E_FAIL;
end;
end;
function DllCanUnloadNow: HResult; stdcall;
begin
Result := S_OK;
end;
// 导出函数列表
exports
ServiceMain,
DllRegisterServer,
DllUnregisterServer,
InstallService,
UninstallService;
{ dll入口点 }
begin
DllProc := @DllEntryPoint;
DllEntryPoint(DLL_PROCESS_ATTACH);
end.
为什么我的外部加载程序退出时,程序报地址错误呢?
不知咋个释放这个东东,参考了不少办法,可是都没成功!
郁闷啊......我看过以前的帖子,好象此类问题最终都没有圆满解决,
希望各路高手帮帮我吧!