Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi callµ÷ÓÃÀý×Ó

ÔÚȺÀï¿´µ½ÓÐÈË·¢Á˸ö±ðÈË·¢¸øËûµÄ
ÎÒ¿´ÁËдµÄ±È½ÏÉú¶¯ ÔÚÕâת¸ø´ó¼Ò¿´¿´
ºÃµÄ Ê°È¡ÎïÌ庯ÊýдºÃÁË Ï²½ÊÇÈçºÎ½«´úÂë×¢Èëµ½ÓÎÏ·½ø³ÌÖÐÖ´ÐÐ??
1) С͵¿ªÃÅ
PHND:= OpenProcess (PROCESS_ALL_ACCESS, False, PID);µÃµ½ÓÎÏ·´°¿Ú¾ä±ú»ñµÃȨÏÞ
2)С͵ÔÚ·¿¼ä¸ã¸ö·Å×÷°¸·½°¸µÄµØ·½
TAdd := VirtualAllocEx(PHND, nil, 4096, MEM_COMMIT, PAGE_EXECUTE_READWRITE)
ÔÚÓÎÏ·½ø³ÌÖÐÉêÇë4096×ֽڵĿռäÓÃÀ´´æ·Åº¯Êý´úÂë
3)С͵°Ñ×÷°¸·½°¸·ÅÈë×÷°¸¿Õ¼ä
WriteProcessMemory(TPHND, TAdd,PickCall,4096 , WriteCount);
°Ñ´úÂëдµ½ÓÎÏ·½ø³ÌÖÐ ¿ªÊ¼µÄµØÖ·Êǵڶþ²½µÃµ½µÄλÖÃ
4)С͵ÔÚ·¿¼äÖиã¸ö·Å×÷°¸¹¤¾ßµÄµØ·½
PAdd := VirtualAllocEx(PHND, nil, 128, MEM_COMMIT, PAGE_EXECUTE_READWRITE)
ÔÚÓÎÏ·½ø³ÌÖÐÉêÇë128×ֽڵĿռäÓÃÀ´´æ·Å²ÎÊý
5)С͵°Ñ×÷°¸¹¤¾ß·ÅÈë·¿¼ä
WriteProcessMemory(TPHND, TAdd,param,128 , WriteCount);
дÈë²ÎÊý
6)Ò»Æð¾Í¾ÍÐ÷ ¿ªÊ¼×÷°¸
TmpHandle := CreateRemoteThread(TPHND, nil, 0, TAdd, padd, 0, WriteCount);
WaitForSingleObject(TmpHandle, INFINITE);//µÈ´ý×÷°¸Íê³É
CloseHandle(TmpHandle); //¹Ø±ÕÔ¶³ÌµÄ¾ä±ú ×÷°¸Íê³Éºó¹ØÃÅÉÁÈË
µ½ÕâÀï »ù±¾¶¼¸ãÇå³þ×¢Èë´úÂëµÄÓ÷¨ÁË,ѧϰÖصãÊÇ
1)Àí½âCreateRemoteThreadº¯Êý¸÷¸ö²ÎÊýµÄÒâÒå
2)Êý¾Ý½á¹¹µÄÓ÷¨
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure runCall;stdcall; // ×ß·call
var
Address:Pointer;
begin
Address:=Pointer($004537E4); //º¯ÊýÈë¿ÚµØÖ·
asm
    pushad             //±£´æ¼Ä´æÆ÷»·¾³
    mov eax,47         //²Î¿¼ÉÏÃæµÄ·´»ã±à
    call Address         //Õýʽµ÷Óú¯Êý
    popad             //»Ö¸´¼Ä´æÆ÷»·¾³
end;
end;
//-------------------------×¢Èë´úÂëµÄº¯Êý----------------------------
//²ÎÊý˵Ã÷:
//InHWND:±»×¢ÈëµÄ´°¿Ú¾ä±ú
//Func:×¢ÈëµÄº¯ÊýµÄÖ¸Õë
//Param:²ÎÊýµÄÖ¸Õë
//ParamSize:²ÎÊýµÄ´óС
//
procedure InjectFunc(InHWND: HWND; Func: Pointer; Param: Pointer; ParamSize: DWORD);
var
hProcess_N: T


Ïà¹ØÎĵµ£º

Delphi – ÎҵĴúÂëÖ®¼òµ¥Îå×ÓÆå

¼¼Êõ½»Á÷,DH½²½â. ½ñÌìÀ´ÊµÏÖÒ»¸ö¼òµ¥µÄÎå×ÓÆå,Ö±½ÓÓÃGDIÀ´»­µÄÒ»¸öÓÎÏ·.
Ê×ÏÈÎÒÃÇÀ´ÏëÏÂÔõô´æ·ÅÊý¾Ý,ÄÄЩµØ·½ÊÇ°×Æå,ÄÄЩµØ·½ÊǺÚÆå,ÄÄЩµØ·½Ã»ÓÐÏÂÆå?
¶Ô,ÎÒÃÇÓÃÒ»¸ö¶þάÊý×é,Èç¹ûÊý×éÖÐijһ¸öλÖõÄֵΪ0´ú±íûÓÐÏÂÆå,Ϊ1´ú±íÊÇ°×Æå,Ϊ2´ú±íÊǺÚÆå.
ºÃ¾ÍÕâô˵¶¨ÁË,ΪÁËʹÓ÷½±ã,ÎÒÃÇ´òËã×ö³ÉÒ»¸ö¿Ø¼ ......

ÔÚDelphiÖÐÈçºÎʹÓÃRCÎļþÖеÄ×Ö·û´®±í

Ê×ÏÈÓÃNotepad»òResource workshop 4.5½¨Á¢RCÎļþ¡£ ½á¹¹ÈçÏ /****************************************************************************
rcdemo.rc
produced by Borland Resource Workshop
*****************************************************************************/
# ......

DELPHIÖвÙ×÷ACCESSÊý¾Ý¿â

DELPHIÖвÙ×÷ACCESSÊý¾Ý¿â(½¨Á¢.mdbÎļþ,ѹËõÊý¾Ý¿â)

ÒÔÏ´úÂëÔÚWIN2K,D6,MDAC2.6ϲâÊÔͨ¹ý,

±àÒëºÃµÄ³ÌÐòÔÚWIN98µÚ¶þ°æÎÞACCESS»·¾³ÏÂÔËÐгɹ¦.







//ÉùÃ÷Á¬½Ó×Ö·û´®

Const

SConnectionString      
= 'Provider=M ......

Delphi ·Ö¸î×Ö·û´®µÄ·½·¨

ȷʵºÜÓÐÓ㬵«ÊÇÕâ¸öÔõô°Ñ¿Õ¸ñҲĬÈÏΪ·Ö¸î·ûÁËÄØ£¬Ë­ÖªµÀÔõÑù°Ñ¿Õ¸ñ²»ÈÏΪÊÇ·Ö¸î·ûµÄ£¿£¿ TStringsÊÇÒ»¸ö³éÏóÀ࣬ÔÚʵ¼Ê¿ª·¢ÖУ¬ÊdzýÁË»ù±¾ÀàÐÍÍ⣬ӦÓõÃ×î¶àµÄ¡£ ³£¹æµÄÓ÷¨´ó¼Ò¶¼ÖªµÀ£¬ÏÖÔÚÀ´ÌÖÂÛËüµÄһЩ¸ß¼¶µÄÓ÷¨¡£ ÏÈ°ÑÒªÌÖÂ۵ļ¸¸öÊôÐÔÁгöÀ´£º 1
ȷʵºÜÓÐÓ㬵«ÊÇÕâ¸öÔõô°Ñ¿Õ¸ñҲĬÈÏΪ·Ö¸î·ûÁËÄØ£¬Ë­ÖªµÀÔõÑ ......

delphi ÅжÏÍøÂçÊÇ·ñÁ¬Í¨µÄ·½·¨

uses WinInet;
procedure TForm1.Button1Click(Sender: TObject);
begin
  if InternetGetConnectedState(nil, 0) then
    ShowMessage('ÒÑÁ¬½Ó')
  else
    ShowMessage('ÒѶϿª');
end; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ