有的时候,当前执行的DLL 和启动的EXE 所在路径并不一致,这时我们想要获得当前执行DLL 所在路径可以使用下面的方法. // Summary: // Gets the path or UNC location of the loaded file that contains the manifest. // // Returns: // The location of the loaded file that contains the manifest. If the loaded file
研究delphi服务的路径,试了好几个方法 ,都没取出来,最后发现,要采用取DLL路径的方法 //一.获取Dll自身路径 //1)方法一: Function GetDllPath(sDllName:string):string; var ModuleFileName:array[0..255] of char; begin //{取得dll的实际位置} GetModuleFileName(GetModuleHandle(sDllName), @ModuleFileName[0], SizeOf(