I am just starting with Win32 and have read the Win32 Help.

I want to simply create a directory on my hard drive and am trying the code below. It compiles without error, but does not create the directory:

#define WIN_32_LEAN_AND_MEAN

#include <windows.h>

int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR lpcmdline, int ncmdshow)

{
char dirname[] = "C:\new";

int retval = CreateDirectory(dirname, NULL);

if (retval != 0)
{
MessageBox(NULL, "Directory Created", "Success", MB_OK);
}
else
{
MessageBox(NULL, "Directory Failed", "Failure", MB_OK);

}
return (0);
}

Can someone suggest why the new directory is not created?

Thanks