Jump to content

winuser.h


AggrorJorn
 Share

Recommended Posts

After doing a rebuild of my entire project I get several errors in the winuser.h.

 

I have never touched that file nor have I updated the project via the leadwerks updater. I checked out an older version via GIT but the problem remains. Any idea what this could be?

 

typedef struct tagINPUT {
DWORD type;
union
{
 MOUSEINPUT	 mi;
 KEYBDINPUT	 ki;
 HARDWAREINPUT hi;
};
} INPUT, *PINPUT, FAR* LPINPUT;
WINUSERAPI
UINT
WINAPI
SendInput(
__in UINT cInputs,					 // number of input in the array
__in_ecount(cInputs) LPINPUT pInputs, // array of inputs
__in int cbSize);					 // sizeof(INPUT)

post-45-0-19097200-1370000005_thumb.jpg

Link to comment
Share on other sites

Thanks for the answer guys. Unfortunately, it hasn't gone away. I tried the following steps.

 

I closed visual studio.

I did a hard reset on the last commit where everything worked.

I closed GIT (just to be sure)

I opened up visual studio

I cleaned the solution and did a rebuild

Link to comment
Share on other sites

I found it.

 

After recreating a new project and copying everything over I still got the error. Then I spotted something in a class:

#ifndef ENGINE_INPUT
#define INPUT

I have my own class for handling input. The define segment doesn't define my class because I forgot to give it a different name. Coincidental, input is already used by the winuser.h, causing the error.

Link to comment
Share on other sites

You should name your #define macros like XXX_INPUT, where XXX stands for your project or your favorite name.

 

That's also a good scenario why c++ programmer use namespace and why "using namespace" shouldn't be in header files (if your #define would be a const int input = 0x01 for example and windows.h (or some other header) using the same variable name, you would have similiar problems).

 

Good to see, you could resolve your problem *cheers*

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...