tags:

views:

15

answers:

1

Hi All,

I am unable to create directory using CreateDirectoryW(). Kindly help me.

+1  A: 

This won't work unless c:\\A already exists. Check the error (ERROR_PATH_NOT_FOUND ?). Does the user have permissions to write to that part of the disk?

From the docs

One or more intermediate directories do not exist; this function will only create the final directory in the path.

The code will operate the same on both machines, so this must be environment-specific.

In general all your Win32 API calls should check and handle errors. That will speed up resolution of future issues like this.

Steve Townsend