编译GINA.dll的64位错误

时间:2013-09-09 18:18:42

标签: c++ windows visual-studio dll gina

为项目开发自定义窗口GINA.DLL时,需要为32位和64位平台构建它 在开发和测试32位和代码工作后,我试图为64位平台构建它,它产生了以下错误:

Error   7   error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    3   Gina
Error   8   error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    3   Gina
Error   9   error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    3   Gina
Error   10  error C2146: syntax error : missing ';' before identifier 'RealWlxActivateUserShell'    d:\projects\prostick\prostick\gina\Trampulim.cpp    3   Gina
Error   11  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    3   Gina
Error   12  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    4   Gina
Error   13  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    4   Gina
Error   14  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    4   Gina
Error   15  error C2146: syntax error : missing ';' before identifier 'RealWlxDisplayLockedNotice'  d:\projects\prostick\prostick\gina\Trampulim.cpp    4   Gina
Error   16  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    4   Gina
Error   17  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    5   Gina
Error   18  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    5   Gina
Error   19  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    5   Gina
Error   20  error C2146: syntax error : missing ';' before identifier 'RealWlxDisplaySASNotice' d:\projects\prostick\prostick\gina\Trampulim.cpp    5   Gina
Error   21  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    5   Gina
Error   22  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    6   Gina
Error   23  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    6   Gina
Error   24  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    6   Gina
Error   25  error C2146: syntax error : missing ';' before identifier 'RealWlxGetConsoleSwitchCredentials'  d:\projects\prostick\prostick\gina\Trampulim.cpp    6   Gina
Error   26  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    6   Gina
Error   27  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    7   Gina
Error   28  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    7   Gina
Error   29  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    7   Gina
Error   30  error C2146: syntax error : missing ';' before identifier 'RealWlxGetStatusMessage' d:\projects\prostick\prostick\gina\Trampulim.cpp    7   Gina
Error   31  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    7   Gina
Error   32  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    8   Gina
Error   33  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    8   Gina
Error   34  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    8   Gina
Error   35  error C2146: syntax error : missing ';' before identifier 'RealWlxIsLockOk' d:\projects\prostick\prostick\gina\Trampulim.cpp    8   Gina
Error   36  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    8   Gina
Error   37  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    9   Gina
Error   38  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    9   Gina
Error   39  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    9   Gina
Error   40  error C2146: syntax error : missing ';' before identifier 'RealWlxIsLogoffOk'   d:\projects\prostick\prostick\gina\Trampulim.cpp    9   Gina
Error   41  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    9   Gina
Error   42  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    10  Gina
Error   43  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    10  Gina
Error   44  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    10  Gina
Error   45  error C2146: syntax error : missing ';' before identifier 'RealWlxLoggedOnSAS'  d:\projects\prostick\prostick\gina\Trampulim.cpp    10  Gina
Error   46  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    10  Gina
Error   47  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    11  Gina
Error   48  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    11  Gina
Error   49  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    11  Gina
Error   50  error C2146: syntax error : missing ';' before identifier 'RealWlxLoggedOutSAS' d:\projects\prostick\prostick\gina\Trampulim.cpp    11  Gina
Error   51  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    11  Gina
Error   52  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    12  Gina
Error   53  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    12  Gina
Error   54  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    12  Gina
Error   55  error C2146: syntax error : missing ';' before identifier 'RealWlxLogoff'   d:\projects\prostick\prostick\gina\Trampulim.cpp    12  Gina
Error   56  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    12  Gina
Error   57  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    13  Gina
Error   58  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    13  Gina
Error   59  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    13  Gina
Error   60  error C2146: syntax error : missing ';' before identifier 'RealWlxNetworkProviderLoad'  d:\projects\prostick\prostick\gina\Trampulim.cpp    13  Gina
Error   61  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    13  Gina
Error   62  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    14  Gina
Error   63  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    14  Gina
Error   64  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    14  Gina
Error   65  error C2146: syntax error : missing ';' before identifier 'RealWlxRemoveStatusMessage'  d:\projects\prostick\prostick\gina\Trampulim.cpp    14  Gina
Error   66  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    14  Gina
Error   67  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    15  Gina
Error   68  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    15  Gina
Error   69  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    15  Gina
Error   70  error C2146: syntax error : missing ';' before identifier 'RealWlxScreenSaverNotify'    d:\projects\prostick\prostick\gina\Trampulim.cpp    15  Gina
Error   71  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    15  Gina
Error   72  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    16  Gina
Error   73  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    16  Gina
Error   74  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    16  Gina
Error   75  error C2146: syntax error : missing ';' before identifier 'RealWlxShutdown' d:\projects\prostick\prostick\gina\Trampulim.cpp    16  Gina
Error   76  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    16  Gina
Error   77  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    17  Gina
Error   78  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    17  Gina
Error   79  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    17  Gina
Error   80  error C2146: syntax error : missing ';' before identifier 'RealWlxStartApplication' d:\projects\prostick\prostick\gina\Trampulim.cpp    17  Gina
Error   81  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    17  Gina
Error   82  error C2485: 'naked' : unrecognized extended attribute  d:\projects\prostick\prostick\gina\Trampulim.cpp    18  Gina
Error   83  error C4235: nonstandard extension used : '_asm' keyword not supported on this architecture d:\projects\prostick\prostick\gina\Trampulim.cpp    18  Gina
Error   84  error C2065: 'jmp' : undeclared identifier  d:\projects\prostick\prostick\gina\Trampulim.cpp    18  Gina
Error   85  error C2146: syntax error : missing ';' before identifier 'RealWlxWkstaLockedSAS'   d:\projects\prostick\prostick\gina\Trampulim.cpp    18  Gina
Error   86  error C2143: syntax error : missing ';' before '}'  d:\projects\prostick\prostick\gina\Trampulim.cpp    18  Gina

我认为问题出现在这个代码的两个地方“裸”和内联汇编跳转语句:

#define IMPLEMENT_TRAMPULIM_PROC(ProcName)      \
void* Real##ProcName = 0;                       \
extern "C" int __declspec(naked) ProcName(void) \
{                                               \
    _asm jmp Real##ProcName                     \
}                                               \

我在这里发布了包含此代码的2个文件: https://gist.github.com/emad-elsaid/cca68983951c82eb8e60

我使用visual studio 2008专业版

请注意,我没有写大部分代码,我从一个我不记得的网站上复制了它。 由于我没有使用C ++进行Windows编程的丰富经验,因此我无法进一步追踪错误。

1 个答案:

答案 0 :(得分:1)

64位版本的MS Visual Studio编译器不支持内联汇编程序。

如果不理解你为什么蹦床,很难说你应该做什么(如果有的话)。