C:\Documents and Settings\Administrator\桌面\InputMessage\InputMessage.cpp(34) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\Documents and Settings\Administrator\桌面\InputMessage\InputMessage.cpp(34) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
请高手指点改如何修改才能通过编译!!!!
C:\Documents and Settings\Administrator\桌面\InputMessage\InputMessage.cpp(34) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
请高手指点改如何修改才能通过编译!!!!
#include "stdafx.h"
#include <windows.h>
dllimport("USER32.DLL")
int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
INPUT kbinput[3];
ZeroMemory( &kbinput, sizeof(INPUT)*3 ); kbinput[0].type = INPUT_KEYBOARD;
kbinput[0].ki.wVk = VK_LWIN; kbinput[1].type = INPUT_KEYBOARD;
kbinput[1].ki.wVk = 'D'; kbinput[2].type = INPUT_KEYBOARD;
kbinput[2].ki.wVk = VK_LWIN;
kbinput[2].ki.dwFlags = KEYEVENTF_KEYUP; SendInput( 3, kbinput, sizeof(INPUT) );
return 0;
}
改为:
#pragma comment(lib, "user32.lib")
在头文件中加上:<winable.h>