1
votes

I'm new in Visual Studio and I tried to compile a code which uses the VirtualProtect function. Compilation failed, I was expecting a linking issue first but after further investigation, even the function's constants weren't initialized, so the problem seems to came from the header. I've found the header file of VirtualProtect function (memoryapi.h included by winbase.h included by windows.h), and the function's declaration depend to this statement :

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)    

It seems it's a macro used to define what APIs the compiler should use according to the platform. Then, how can I change the configuration of my project to set it as a pure desktop app ? I don't know why VS insists to create a Windows Phone version of everything I'm compiling...

1
Which edition of Visual Studio 2013 are you using?Medinoc
I'm using Visual Studio Express 2013MadMass

1 Answers

3
votes

You may have taken the wrong Express: According to this page, there are "Express 2013 for Windows" and "Express 2013 for Windows Desktop"; you need the latter.