Access Disk Sector for non-admin user
-
Hi, Currently, I need to do read/write on disk sector under Win2000/XP. I found out that the statement below is only valid for administrator. hDisk=CreateFile("\\\\.\\C:", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL); ... For non-admin user, the above statement will always return hDisk=INVALID_HANDLE_VALUE. My question is how can we solve this problem? Can we assign access right or privilege in our program in order to access disk sector? or do we need to develop VXD to solve this problem? Hope that some of you can give me some hints. Thanks in advance! Best Regards, K Wan
-
Hi, Currently, I need to do read/write on disk sector under Win2000/XP. I found out that the statement below is only valid for administrator. hDisk=CreateFile("\\\\.\\C:", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL); ... For non-admin user, the above statement will always return hDisk=INVALID_HANDLE_VALUE. My question is how can we solve this problem? Can we assign access right or privilege in our program in order to access disk sector? or do we need to develop VXD to solve this problem? Hope that some of you can give me some hints. Thanks in advance! Best Regards, K Wan
Yes my friend As far as my Knowledge u will neet a service to do the above work and not a VXD cause VXD is required on 9X M/C and No such funda like aadministrator in 9X M/C ok i hope this solev ur prob.. Thanx TAKE CARE
-
Yes my friend As far as my Knowledge u will neet a service to do the above work and not a VXD cause VXD is required on 9X M/C and No such funda like aadministrator in 9X M/C ok i hope this solev ur prob.. Thanx TAKE CARE
Thanks for pointed out my mistake and confusion. Basically, what does the service do in this problem? Can the service use 'CreateFile' to access the disk sector for non-admin user? Since the security context for file system root (eg: 'c:','d:') will be lost every time we restart the computer, how do we solve this problem? More hints and guides for me? Thanks!