Hi, I'm using the volume serial of the harddrive for authorization of my program, I'm using the c:\ drive as default but some user do not have a c:\ drive so I need some way to check what the main hardrive is called. I'm using code like so:
Code:
DWORD dwVolSerial;
BOOL bIsRetrieved;
bIsRetrieved = GetVolumeInformation("C:\\",NULL,NULL,&dwVolSerial,NULL,NULL,NULL,NULL);
if (bIsRetrieved)
{
TSTR buf;
buf.printf(_T("%u"),dwVolSerial);
return new String(buf);
}
return &undefined;
Any idea on how to expand on this code to also include such a check?
cheers,
CML