Question

Answers

WinMain is not used in Windows Store apps (the subject of this forum). WinMain is the entry point for desktop apps compiled either 32-bit and 64-bit (or 16-bit, which is where hPrevInstance came from). See
WinMain entry point.

This is not used for Windows Store apps or Windows phone apps which instead use:

[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)

I suspect you are using this forum as it's the only one that mentions "DirectX" but you aren't writing a Windows Store app. You should take al look at the
Direct3D Win32 Game Visual Studio template for VS 2013 or this
tutorial for an example of how to set up a DirectX 11 device and swap chain for a Windows desktop application for 32-bit and 64-bit native.

All replies

WINAPI is a standard macro from 'minwindef.h' which ensures all the C calling convention for OS functions are using __stdcall

PSTR is a standard type from 'ntdef.h' commonly used in Windows APIs.

DirectX 11.2 is supported for both Win32 desktop applications and Windows Store applications. You have to use the IDXGIFactory2::CreateSwapChainForCoreWindow for setting up the swapchain for a "DirectX" app, you use IDXGIFactory2::CreateSwapChainForComposition
for setting up a swapchain for a "DirectX / XAML" app, and you use IDXGIFactory2::CreateSwapChainForHwnd (or the older CreateSwapChain) for setting up a swapchain for a Win32 window.

WinMain is not used in Windows Store apps (the subject of this forum). WinMain is the entry point for desktop apps compiled either 32-bit and 64-bit (or 16-bit, which is where hPrevInstance came from). See
WinMain entry point.

This is not used for Windows Store apps or Windows phone apps which instead use:

[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)

I suspect you are using this forum as it's the only one that mentions "DirectX" but you aren't writing a Windows Store app. You should take al look at the
Direct3D Win32 Game Visual Studio template for VS 2013 or this
tutorial for an example of how to set up a DirectX 11 device and swap chain for a Windows desktop application for 32-bit and 64-bit native.