Click here to Skip to main content
15,889,992 members

Comments by lrtsenar (Top 2 by date)

lrtsenar 8-Oct-15 10:17am View    
Let me re-scope the project :
In a 1st time, I wish to have the following :
I have succesfully compiled the 'file device driver' found here (filedisk) : https://www.acc.umu.se/~bosse/

Unfortunately, when I try to 'share' the new created device, the following message appears:

An error occurred while sharing .The device or directory does not exist. The shared resource was not created
To summarize, here is the method used to mount file as drive:

int FileDiskMount(...)
...
DefineDosDevice(DDD_RAW_TARGET_PATH,"T:","\Device\FileDisk\FileDisk0")
...
Device = CreateFile("\\.\T:",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_FLAG_NO_BUFFERING,NULL);

DeviceIoControl(Device,IOCTL_FILE_DISK_OPEN_FILE,OpenFileInformation,sizeof(OPEN_FILE_INFORMATION) + OpenFileInformation->FileNameLength - 1,
NULL,0,&BytesReturned,NULL))
where OpenFileInformation->FileName = "\??\d:\fd.img"

Do you know what's wrong ? Many thanks in advance.
lrtsenar 30-Oct-14 9:58am View    
I wish use Visual Studio in C++ under Windows. I was using FAT as a generic word (File Allocation Table) not as a specific file system. Thank you for your interest.