Click to See Complete Forum and Search --> : question about format driver


MichaelLee
March 22nd, 2004, 02:07 AM
hello:

My english is not very good and i hope i can make myself clear.
I am now working on a program, i mount a image as a virtual driver with filedisk(you can down load it at: http://www.acc.umu.se/~bosse/filedisk.zip), my program then use it as a temporary place to store file. The question is that every time i mount a new blank image, i must format it first to use, is there any code can do format job silently for me? I know SHFormatDrive can do this job, but it pop a dialog so it is not what i want.
I heard some IOCtrls can do the job silently , but I don't know how to do it.

please help me. thanks!

j0nas
March 22nd, 2004, 04:58 PM
Hmm... I did some searching on this, because it was an interesting subject. I found out that there is a DLL that SHFormatDrive itself is using, which is called FMIFS.DLL. Undocumented etc, but it may work for you. Check this out: http://mvb.saic.com/freeware/vmslt99b/nt/fmifs.htm

Sam Hobbs
March 22nd, 2004, 07:28 PM
I put ioctl into my MSDN index and found IOCTL_DISK_FORMAT_TRACKS. That looks relevant, so I searched MSDN for IOCTL_DISK_FORMAT_TRACKS. Try looking at that.