delphiÆô¶¯·þÎñÍ£Ö¹·þÎñн¨·þÎñµÄ·½·¨
unit Servicescontrol;
interface
uses Windows,Messages,SysUtils,Winsvc,Dialogs;
function StartServices(Const SvrName:String):Boolean;
function StopServices(Const SvrName:String):Boolean;
function QueryServiceStatu(Const SvrName: String):String;
function CreateServices(Const SvrName,FilePath:String):Boolean;
function DeleteServices(Const SvrName: String):Boolean;
implementation
//¿ªÆô·þÎñ
function StartServices(Const SvrName: String): Boolean;
var
a,b:SC_HANDLE;
c:PChar;
begin
Result:=False;
a:=OpenSCManager(nil,nil,SC_MANAGER_ALL_ACCESS);
if a <=0 then Exit;
b:=OpenService(a,PChar(SvrName),SERVICE_ALL_ACCESS);
if b <=0 then Exit;
try
Result:=StartService(b,0,c);
CloseServiceHandle(b);
CloseServiceHandle(a);
except
CloseServiceHandle(b);
Ïà¹ØÎĵµ£º
ÔÚÖ÷½çÃæµÄimplementation {$R *.dfm} Ï·ÅÈëÒÔÏ´úÂ룺
procedure PatchInt3;
var
NOP: Byte;
NTDLL: THandle;
BytesWritten: DWORD;
Address: Pointer;
begin
if Win32Platform <> VER_PLATFORM_WIN32_NT then
Exit;
NTDLL := GetModuleHandle('NTDLL.DLL');
if NT ......
´ó¼Ò¶¼ÈÏΪ£¬CÓïÑÔÖ®ËùÒÔÇ¿´ó£¬ÒÔ¼°Æä×ÔÓÉÐÔ£¬ºÜ´ó²¿·ÖÌåÏÖÔÚÆäÁé»îµÄÖ¸ÕëÔËÓÃÉÏ¡£Òò´Ë£¬ËµÖ¸ÕëÊÇCÓïÑÔµÄÁé»ê£¬Ò»µã¶¼²»Îª¹ý¡£Í¬Ê±£¬ÕâÖÖ˵·¨Ò²ÈúܶàÈ˲úÉúÎó½â£¬ËƺõÖ»ÓÐCÓïÑÔµÄÖ¸Õë²ÅÄÜËãÖ¸Õë¡£Basic²»Ö§³ÖÖ¸Õ룬Ôڴ˲»ÂÛ¡£Æäʵ£¬PascalÓïÑÔ±¾ÉíÒ²ÊÇÖ§³ÖÖ¸ÕëµÄ¡£´Ó×î³õµÄPascal·¢Õ¹ÖÁ½ñµÄObject Pascal£¬¿ÉÒÔ˵ÔÚÖ¸ÕëÔËÓ ......
@·ûºÅ·µ»ØÒ»¸ö±äÁ¿µÄµØÖ·
Àý£º
var
f:string;
p:^string; //ÉùÃ÷Ò»¸ö×Ö·û´®ÀàÐ͵ÄÖ¸Õë
begin
f ='demo'; ......
Ò»¡¢ÕûÊýÀàÐÍ
ÀàÐÍ ËùÕ¼×Ö½ÚÊý ȡֵ·¶Î§
byte 1 0-255
word 2 0-65535
shortint 1 -128-127
smallint 2 -32768-32767
integer 4 -214748648-214748467
longint 4 -214748648-214748467
cordinal 4 0-2147483647
¶þ¡¢ÊµÊýÀàÐÍ
ÀàÐÍ Ëùµã×Ö½ÚÊý ȡֵ·¶Î§
Real 6 ±2.9×10µÄ¸º39´Î·½µ½1.7× ......
Ò»Äêǰ¿ª·¢ÁËÒ»¸öMIDASµÄ³ÌÐò,×î½üÐ޸ķþÎñ¶Ë,¿ÉÊÇÕâ¸ö·þÎñÎÞ·¨×¢²á,×îºóÖÕÓÚÕÒµ½Á˽â¾ö°ì·¨,Õâ¸öÏà¹ØÎÄÕÂÈçÏÂ:(ËãÊDZ¸·Ý°É)
£¨Ò»£©MIDASÊÇʲô£¿
DelphiÖÐMIDASµ½µ×ÊÇÊ²Ã´ÄØ?ºÍËûÏà¹Ø×é¼þÊÇÊ²Ã´ÄØ?
MIDAS(Multitiered Distributed Application Services)¶à²ã·Ö²¼Ê½Ó¦Ó÷þÎñ¡£
DelphiËùÌá³ö ......