U盘只读程序源码源码

时间:2013-05-04 06:23:45
【文件属性】:

文件名称:U盘只读程序源码源码

文件大小:92KB

文件格式:RAR

更新时间:2013-05-04 06:23:45

源码,U盘

U盘只读程序源码源码 DELPHI版 function InstallService(SvcName, SvcDispName, SvcFullPath: string): integer; var hSCM, hService: SC_HANDLE; sInfo: string; begin result := 0; hSCM := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS); if hSCM = 0 then begin result := GetLastError; {$IFDEF DEBUG} ShowMessage(SysErrorMessage(result)); {$ENDIF} exit; end; try hService := CreateService(hSCM, PChar(SvcName), PChar(SvcDispName), SERVICE_ALL_ACCESS, //SERVICE_START OR SERVICE_QUERY_STATUS OR _DELETE, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, //SERVICE_AUTO_START,SERVICE_DEMAND_START SERVICE_ERROR_NORMAL, PChar(SvcFullPath), nil, nil, nil, nil, nil); if hService = 0 then begin result := GetLastError; {$IFDEF DEBUG} ShowMessage(SysErrorMessage(result)); {$ENDIF} case result of ERROR_ACCESS_DENIED: sInfo := 'ERROR_ACCESS_DENIED'; ERROR_CIRCULAR_DEPENDENCY: sInfo := 'ERROR_CIRCULAR_DEPENDENCY'; ERROR_DUPLICATE_SERVICE_NAME: sInfo := 'ERROR_DUPLICATE_SERVICE_NAME'; ERROR_INVALID_HANDLE: sInfo := 'ERROR_INVALID_HANDLE'; ERROR_INVALID_NAME: sInfo := 'ERROR_INVALID_NAME'; ERROR_INVALID_PARAMETER: sInfo := 'ERROR_INVALID_PARAMETER'; ERROR_INVALID_SERVICE_ACCOUNT: sInfo := 'ERROR_INVALID_SERVICE_ACCOUNT'; ERROR_SERVICE_EXISTS: sInfo := 'ERROR_SERVICE_EXISTS'; end; {$IFDEF DEBUG} ShowMessage(sInfo); {$ENDIF} end else CloseServiceHandle(hService); finally CloseServiceHandle(hSCM); end; end;


【文件预览】:
Reg.res
U.cfg
clear.bat
U.res
PTools.pas
0000-0F12-3FEB-FBFF-0000-0000.txt
Service.dpr
Service.dof
make.bat
UnitMain.pas
Reg.cfg
HardwareInfo.pas
Service.cfg
0000-0F41-BFEB-FBFF-0000-441D.txt
U.bpg
UnitServiceU.dfm
U.dpr
UnitServiceU.pas
Reg.dof
Reg.dpr
UnitMain.dfm
U.dof
UnitReg.dfm
UnitServiceU.ddp
Delphi盒子.url
serviceU.rc
2ccc.com.nfo
Service.res
UnitReg.pas

网友评论

  • 很好很有用