研究delphi服务的路径,试了好几个方法 ,都没取出来,最后发现,要采用取DLL路径的方法 //一.获取Dll自身路径 //1)方法一: Function GetDllPath(sDllName:string):string; var ModuleFileName:array[0..255] of char; begin //{取得dll的实际位置} GetModuleFileName(GetModuleHandle(sDllName), @ModuleFileName[0], SizeOf(
procedure TForm1.Button2Click(Sender: TObject); var Reg:TRegistry; Val:TStrings; ii:System.Integer; TmpStr:String; begin Reg:=TRegistry.Create(); Val:=TStringList.Create(); Try Reg.RootKey:=HKEY_CURRENT_USER; if Reg.OpenKey('Software\Tencent\PlatForm
#coding=utf8 import _winreg as winreg class Win32Environment: """Utility class to get/set windows environment variable""" def __init__(self, scope,name): self.scope = scope if scope == 'user': self.root = winreg.HKEY_CURRENT_