Crating file using CreateFile API

by kmadhukishore - 11/16/09 7:27 AM

Hi all,
I am trying to create a file using CrateFile API in Windows Mobile(using C++) like below:

HANDLE fileHandler = CreateFile(TEXT("temp.sav") , GENERIC_READ | GENERIC_WRITE , 0 , NULL , OPEN_ALWAYS , 0 , NULL);

with this I am able to create file,but I have following doubts:

1)With the above code I am able to crate file in root directory,but I am interested in creating a file in applications directory some where like "\\Program Files\\MyProject\\temp.sav",this can be achieved by passing this as a first parameter to CreateFile method,but I dont want to do this because this code will go into framework so "MyProject" will vary from project to project so my question is"is there a simple way to create a file inside application folder (which is "\\Program Files\\MyProject")??"

2)In emulator if I run the above code where exactly it will create file in my computer directory structure??

Thanks In Advance...
Madhu