 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
jongwee Moderator
Reputation: 0
Joined: 28 Jun 2006 Posts: 1388 Location: Singapore
|
Posted: Thu Dec 06, 2007 4:28 am Post subject: |
|
|
| sponge wrote: | If you look in my DEF file... you will see that the exported name for my "API" is hhPostMessageA.
I do not program in C# so I cannot tell you how to import it. |
Yeap, I tried to use your .dll and it gave me an error, and i looked at your folder and found hhpostmessageA ^^
Code for delphi would be:
| Code: | function hhPostMessageA(
hWnd:HWND;
MSG:UINT;
WPARAM:wParam;
LPARAM:lParam):BOOL;stdcall;
external 'HookHop.dll' name 'hhPostMessageA'; |
_________________
|
|
| Back to top |
|
 |
MyFeel Expert Cheater
Reputation: 0
Joined: 04 Jun 2007 Posts: 143
|
Posted: Thu Dec 06, 2007 1:29 pm Post subject: |
|
|
hmm ok i got this Import now, but i use it?
here the code i use:
| Code: |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
[DllImport("HookHop.dll")]
private static extern bool hhPostMessageA(IntPtr hWnd, uint MSG, IntPtr WPARAM, IntPtr LPARAM);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
hhPostMessageA(hWnd, 0x09, 0, 0);
}
}
}
|
but it say's error :
Error 1 The name 'hWnd' does not exist in the current context
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Thu Dec 06, 2007 6:20 pm Post subject: |
|
|
You have to get a handle of a window first...
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|