| View previous topic :: View next topic |
| Author |
Message |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Feb 05, 2009 6:57 pm Post subject: NtUserSendInput... |
|
|
typedef ULONG (__stdcall *NTUSERSENDINPUT)(UINT, LPINPUT, INT);
it keeps giving me an error about LPINPUT and INT are not formal? why?
I suck at C so dont complain/flame.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Feb 05, 2009 7:15 pm Post subject: |
|
|
Well, I assume this is for your driver right?
Well guess what, INT doesn't exist, nor does LPINPUT.
Define them.
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Feb 05, 2009 7:33 pm Post subject: |
|
|
You know what, I'm just going to go ahead and say this, as I'm sure most of the people here are thinking it:
You do not know C. You are over your head. If you are programming drivers and keep spamming the forums up with useless syntax based questions you are not ready to leave usermode. Plain and simple. People have been feeding you source code and leading you by the nose, and you obviously aren't learning shit. For the love of God, program something easier.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Thu Feb 05, 2009 7:35 pm Post subject: |
|
|
ok Ill start learning C.
and everything works except NtUserSendInput. So After I program this driver im outa kernelmode...
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
|
| Back to top |
|
 |
BanMe Master Cheater
Reputation: 0
Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
|
Posted: Thu Feb 05, 2009 8:14 pm Post subject: |
|
|
bah dont listen to flyte though his point is valid do not let that stop you..
the fact that the headers are different from usermode to kernel mode is a fact that escaped alot of people.. so dont let that get you down.
as lurk stated "define them" here's how
| Code: |
#define INT int
#define UINT unsigned int
typedef struct tagMOUSEINPUT {
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;
typedef struct tagKEYBDINPUT {
WORD wVk;
WORD wScan;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
typedef struct tagHARDWAREINPUT {
DWORD uMsg;
WORD wParamL;
WORD wParamH;
} HARDWAREINPUT, *PHARDWAREINPUT, FAR* LPHARDWAREINPUT;
#define INPUT_MOUSE 0
#define INPUT_KEYBOARD 1
#define INPUT_HARDWARE 2
typedef struct tagINPUT {
DWORD type;
union
{
MOUSEINPUT mi;
KEYBDINPUT ki;
HARDWAREINPUT hi;
};
} INPUT, *PINPUT, FAR* LPINPUT;
/*
NTSYSAPI
ULONG
NTAPI
NtUserSendInput(
IN UINT cInputs, // number of input in the array
IN LPINPUT pInputs, // array of inputs
IN int cbSize); // sizeof(INPUT)
*/
|
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Fri Feb 06, 2009 2:56 pm Post subject: |
|
|
| Thanks. Its fixed now.
|
|
| Back to top |
|
 |
|