int __stdcall MessageBox(int hWnd, char *lpText, char *lpCaption, int uType);
MessageBox = GetProcAddress(LoadLibrary("User32.dll"), "MessageBoxA");
MessageBox(0, "cool", "A messagebox", 0);
Also use keybd_event, your function is just a wrapper. Anyways, if you need a struxt or something then just go to msdn and copy and paste it to your project.