Jump to content
Sign in to follow this  
aNewLyfe

DllCall

Recommended Posts

aNewLyfe

hi, i wasted a few hours but cant get it work :)

i want to use a dll to send message and get pixel from a window.

here is the dll functions,

Send Message Function :

PMX (PostMessageA):

Code:

function PMX(

hWnd:HWND;

MSG:UINT;

WPARAM:wParam;

LPARAM:lParam):BOOL;stdcall;

external 'GPPMX.dll' name 'PMX';

Example of usage in Delphi(i think) :

procedure TForm1.Timer1Timer(Sender: TObject);

var

h:hWnd;

A:DWORD;

Begin

h:=FindWindowA('MapleStoryClass',nil);

A:=MapVirtualKey($11,0);

A:=A shl 16;

if h<>0 then

begin

PMX(h,WM_KEYDOWN,$11,A);

PMX(h,WM_KEYUP,$11,A);

Application.ProcessMessages;

end;

end;

-----------------------------------------------------------------------

Get Pixel Color Function :

function GPX(

hdc: HDC;

nXPos: integer;

nYPos: Integer):COLORREF;stdcall;

external 'GPPMX.dll' name 'GPX';

Example of useage in delphi(i think):

var

GPF: HDC;

colorval: integer;

begin

GPF:=GetDC(0);

colorval:=GPX(GPF, 500, 600);

label1.caption:= IntToHex(colorval);

end;

how can i use them in DllCall Function, sorry for noob question tnx for helps.


:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×