SetVolumeMountPoint problem!!! Please help

Hi all,

I am developing a module similar to FileDisk . FileDisk is a virtual
disk
driver for Windows NT/2000/XP that uses one or more files to emulate
physical disks. A console application is included that let you dynamically
mount and unmount files.This code is written by jamey kirby. u may get
code
at http://www.acc.umu.se/~bosse/

In this program , the disk un mounts after every restart. But in my
application I want my disk to be persistent across restarts. ie. always
mounted. For this I tried using SetVolumeMountPoint .

I used the following piece of code for persistent mounting::

=========================================================
#define BUFFSIZE 1024
char buf[BUFFSIZE];
BOOL bFlag;

bFlag = GetVolumeNameForVolumeMountPoint(
“f:\” , // input volume mount point or directory
Buf, // output volume name buffer
BUFSIZE // size of volume name buffer
);

if (bFlag != TRUE)
{
printf( “Retrieving volume name failed.\n”);

}

bFlag = SetVolumeMountPoint(“c:\file.tmp\”,“f:\” );

if (!bFlag)
printf (“Attempt to mount failed.\n”);

=============================================================
ie. I am trying to mount f: on c:\file.tmp. But it is not working. It
again
un mounts the disk on restart.

I also tried using IOCTL_MOUNTDEV_QUERY_UNIQUE_ID routine in my driver.
This is what your volume to be
persistently identified by the system.

Can you please suggest a way for persistent mounting ?

Thanks in advance.