SecWiki / windows-kernel-exploits

windows-kernel-exploits Windows平台提权漏洞集合
MIT License
8.05k stars 2.83k forks source link

Compile CVE 2017-0213 #12

Open ricardojruiz opened 5 years ago

ricardojruiz commented 5 years ago

Hi. I am trying to compile the cpp with Visual Studio 2017 but the output is like the one in this picture (it translates to "you can not assign a value of type "const wchar_t *" to an entity of type "LPWSTR"") . I tried adding a cast using "const_cast<LPWSTR" and also using "(LPWSTR)" before it, but then the .exe file does not work. The steps i am doing are in Visual Studio 2017 are:

So if i add the cast it compiles but does not work and if i do not add it, it does not compile.

Thank you very much!!

Image: https://i.stack.imgur.com/hBFlB.png