View previous topic :: View next topic |
Author |
Message |
MyFeel Expert Cheater
Reputation: 0
Joined: 04 Jun 2007 Posts: 143
|
|
Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Mon Dec 03, 2007 12:48 pm Post subject: |
|
|
well this is just a wild guess cuz i dont really know anything about the pmx dll expect for the link where u download it and the functions
soo
Code: | using System.Runtime.InteropServices;
[DllImport("PMX.Dll")]
public static extern void PostMessageX(HWND hWnd, UINT MSG, WPARAM wParam, LPARAM lParam);
|
pretty sure u can just call the function with that after u define it.. iunno
someone correct me if im wrong plz
iunno.. that might be it, try it out? cuz i dont really do much coding for dll importing..
total guess, flame me or correct me if u want, idc
_________________
|
|
Back to top |
|
 |
MyFeel Expert Cheater
Reputation: 0
Joined: 04 Jun 2007 Posts: 143
|
Posted: Mon Dec 03, 2007 1:12 pm Post subject: |
|
|
lurc wrote: | well this is just a wild guess cuz i dont really know anything about the pmx dll expect for the link where u download it and the functions
soo
Code: | using System.Runtime.InteropServices;
[DllImport("PMX.Dll")]
public static extern void PostMessageX(HWND hWnd, UINT MSG, WPARAM wParam, LPARAM lParam);
|
pretty sure u can just call the function with that after u define it.. iunno
someone correct me if im wrong plz
iunno.. that might be it, try it out? cuz i dont really do much coding for dll importing..
total guess, flame me or correct me if u want, idc |
hey dude it may working but not for C#, but thank you anyway =]
someone something else..?
|
|
Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Mon Dec 03, 2007 1:16 pm Post subject: |
|
|
lol i tried
try googling how to import external dll's to gain a function in C# or like "importing dlls C#"
_________________
|
|
Back to top |
|
 |
MyFeel Expert Cheater
Reputation: 0
Joined: 04 Jun 2007 Posts: 143
|
Posted: Mon Dec 03, 2007 1:38 pm Post subject: |
|
|
ok i found how to call this function
but now how i use it?
i tried to do like:
PostMessageX(0x09);
or
PostMessageX(0x09, 0, 0, 0);
and that things not working =\
and that how i called the function (it was close to what you said ):
[DllImport("PMX.DLL", EntryPoint = "PostMessageX")]
public static extern IntPtr PostMessageX(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
hmm so someone know how to use it?
thanks =]
|
|
Back to top |
|
 |
killersamurai Expert Cheater
Reputation: 0
Joined: 10 Sep 2007 Posts: 197 Location: Colorado
|
Posted: Mon Dec 03, 2007 3:02 pm Post subject: |
|
|
hWnd = handle to the window
msg = the message you want to sent
wParam = additional message specific information
lParam = same as wParam
So, you should use it like
Code: |
IntPtr something = PostMessageX(handle, WM_KEYDOWN, VK_SPACE, 0);
|
|
|
Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Mon Dec 03, 2007 4:44 pm Post subject: |
|
|
killersamurai wrote: | hWnd = handle to the window
msg = the message you want to sent
wParam = additional message specific information
lParam = same as wParam
So, you should use it like
Code: |
IntPtr something = PostMessageX(handle, WM_KEYDOWN, VK_SPACE, 0);
|
|
WM_KEYDOWN and VK_SPACE wont work with C# cuz there included in the library "windows.h" so u have to go into it and define them yourself within ur project
just to let u know
_________________
|
|
Back to top |
|
 |
killersamurai Expert Cheater
Reputation: 0
Joined: 10 Sep 2007 Posts: 197 Location: Colorado
|
Posted: Mon Dec 03, 2007 6:07 pm Post subject: |
|
|
I assumed he (the topic creator) knew what WM_KEYDOWN and VK_(key) were and how to find their value, so I didn't bother mentioning that. Anyways, you can find the key codes here
or you can just use Keys.(key)
|
|
Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Mon Dec 03, 2007 7:01 pm Post subject: |
|
|
don't use PMX there's tons of shit in it.
_________________
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Dec 03, 2007 7:09 pm Post subject: |
|
|
use sponge's hookHop!
_________________
|
|
Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Mon Dec 03, 2007 7:28 pm Post subject: |
|
|
No, it's not ready yet. I still haven't fixed the bug w/ the OS version check yet.
_________________
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Mon Dec 03, 2007 7:41 pm Post subject: |
|
|
still leaps and bounds over PMX.DLL
_________________
|
|
Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Mon Dec 03, 2007 7:43 pm Post subject: |
|
|
sponge wrote: | don't use PMX there's tons of shit in it. |
shit is good
Edit:just to note that pmx.dll was just an example, so i don't really mind which one they use
|
|
Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Mon Dec 03, 2007 8:27 pm Post subject: |
|
|
and the sky cried at the arrival of hookHop.
hookHop [x]
Supported OS:
- Windows Vista
- Windows XP (Service Pack 2)
- If not supported API will return 01234h.
ReadMe will clear some stuff up.
_________________
|
|
Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Dec 03, 2007 9:49 pm Post subject: |
|
|
Try this:
Code: |
[System.Runtime.InteropServices.DLLImport("PMX.dll")]
private static extern void PostMessageX(IntPtr hWnd , UINT msg, IntPtr wParam, IntPtr lParam);
//Lalaa....
//Later...
System.Diagnostics.Process[] myprocs = System.Diagnostics.Process.GetByName("MyApp"); //I think that's how it is, it's been a little while
IntPtr hWnd = myprocs[0].ID; //First instance of the application
PostMessageX(hWnd,0x09,0,0); //I'm guessing that 0x09 is the message that you want to send
|
_________________
|
|
Back to top |
|
 |
|