-
drive masking
If we were to obtain permission to utilize drive masking as mentioned in the earlier thread, ie, permission from the software producer, would the programming discussion be allowed to continue? I ask merely out of curiosity in the rules of this forum.
-
Hammer and I talked via the board PM. Basically the problem wasn't the drive masking, but the assumtion that "tracking disks" don't use standard file formats and as such what I was asking would be considered trying to bypass the security protcools (spelling?) of the program.
In my case that assumtion was wrong, but since the questions had been answered before it got locked there was no reason to reopen it.
-
When I was browsing another topic I came accross this which may help you.
http://msdn.microsoft.com/library/en...ssignments.asp
http://msdn.microsoft.com/library/en...evice_name.asp
By the way, when I originally posted I thought a tracking disk was something totally different. What sort of sotware uses one of these tracking discs. Why?
-
Yep, the following code gets rid of A: drive so it can be used with subst. Now I've got to figure out how to get it back! I'll post back when I figure it out.
EDIT : The code required admin privliges and Win2000/XP/2003
Code:
// define the _WIN32_WINNT macro as 0x0500 or later.
int main() {
BOOL bFlag;
bFlag = DeleteVolumeMountPoint(
"A:\\" // Path of the volume mount point
);
printf ("%s %s in unmounting the volume at %s.\n",
"A:\\", bFlag ? "succeeded" : "failed", "A:\\");
printf("Error: %d", GetLastError());
getchar();
return (bFlag);
}
-
Whew, 20 minutes of panic! My floppy drive is back. Hopefully it won't dissapear at the next reboot. The code to fix something is always a lot more complex than the code to break it.
Code:
int main() {
BOOL bFlag;
char szUniqueVolumeName[MAX_PATH];
bFlag = DefineDosDevice (DDD_RAW_TARGET_PATH, "A:",
"\\device\\floppy0");
if (!bFlag) printf("definedosdevice failed: %d\n", GetLastError());
if (!GetVolumeNameForVolumeMountPoint ("A:\\",
szUniqueVolumeName,
MAX_PATH)) {
printf("Failed to get volume name: %d", GetLastError());
}
bFlag = DefineDosDevice (
DDD_RAW_TARGET_PATH|DDD_REMOVE_DEFINITION|
DDD_EXACT_MATCH_ON_REMOVE, "A:",
"\\device\\floppy0");
if (!bFlag) printf("definedosdevice remove failed: %d", GetLastError());
bFlag = SetVolumeMountPoint ("A:\\", szUniqueVolumeName);
printf("Result: %d, %d", bFlag, GetLastError());
getchar();
return 0;
}
-
All the tracking disk (for the program I brought up) does is keep track of your scores for the interactive lab, bookmarks from the electronic book, and a few other things.
Thanks for the code. Will look at it when I have time (which isn't in abudence anymore)