I am trying to use the CreateDirectory function to create a directory structure. Is this allowed? For example, I have a directory now called d:\temp. I want to create upto d:\temp\dir1\dir2\dir3 in one go.
I have tried to create even one directory by CreateDirectory seems to fail with the following error message:
"Invalid Access to Memory Location".
My code looks like this:
sAtr.nLength = sizeof(SECURITY_ATTRIBUTES);
BOOL bDirDone = CreateDirectory("d:\\Temp\\dir1\\dir2\\dir3", &sAtr);
Whats going wrong??