Hi..
To get the volume GUID i tried the code like below
int len = wcslen( pDetData->DevicePath);
pDetData->DevicePath[len] = '\\';
pDetData->DevicePath[len+1] = 0;
#define BUFFER_SIZE MAX_PATH
WCHAR volume[BUFFER_SIZE];
BOOL bFlag;
bFlag = GetVolumeNameForVolumeMountPoint( pDetData->DevicePath, volume, BUFFER_SIZE );
int loginErrCode = GetLastError();
printf("loginErrCode: %d\n", loginErrCode);
printf("BFLAG: %d\n", bFlag);
the GetLastError() also prints it as 1 . it means ERROR_INVALID_FUNCTION. The bFlag always returns zero it means false.
what is the problem in my code...