kingkong321
May 17th, 2002, 06:21 AM
Hello,
how can I get the CD label information?
thx
kingkong321
how can I get the CD label information?
thx
kingkong321
|
Click to See Complete Forum and Search --> : How to get CD Label Information kingkong321 May 17th, 2002, 06:21 AM Hello, how can I get the CD label information? thx kingkong321 curious May 21st, 2002, 06:54 AM use BOOL GetVolumeInformation( LPCTSTR lpRootPathName, // root directory LPTSTR lpVolumeNameBuffer, // volume name buffer DWORD nVolumeNameSize, // length of name buffer LPDWORD lpVolumeSerialNumber, // volume serial number LPDWORD lpMaximumComponentLength, // maximum file name length LPDWORD lpFileSystemFlags, // file system options LPTSTR lpFileSystemNameBuffer, // file system name buffer DWORD nFileSystemNameSize // length of file system name buffer ); kingkong321 May 27th, 2002, 02:21 PM Hi curious, Thank you for your help. It seems to be that this is the function I searched for. But how to use it? I always get an error. #include <iostream.h> #include <windows.h> void main () { char *VolumeNameBuffer, *FileSystemNameBuffer; DWORD VolumeNameSize, FileSystemNameSize, *VolumeSerialNumber, *MaximumComponentLength, *FileSystemFlags; VolumeNameBuffer=0; FileSystemNameBuffer=0; VolumeNameSize=0; FileSystemNameSize=0; VolumeSerialNumber=0; MaximumComponentLength=0; FileSystemFlags=0; GetVolumeInformation("c:\\", VolumeNameBuffer, VolumeNameSize, VolumeSerialNumber, MaximumComponentLength, FileSystemFlags, FileSystemNameBuffer, FileSystemNameSize); cout << VolumeNameBuffer << endl; } thx kingkong321 R. J. Dunnill May 28th, 2002, 11:55 PM #include <iostream.h> #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { _TCHAR VolumeNameBuffer[MAX_PATH+1], FileSystemNameBuffer[MAX_PATH+1]; DWORD VolumeNameSize = sizeof(FileSystemNameBuffer), FileSystemNameSize = sizeof(FileSystemNameBuffer), VolumeSerialNumber = 0, MaximumComponentLength = 0, FileSystemFlags = 0, lastError; VolumeSerialNumber=0; MaximumComponentLength=0; FileSystemFlags=0; if (!::GetVolumeInformation(_T("G:\\"), VolumeNameBuffer, VolumeNameSize, &VolumeSerialNumber, &MaximumComponentLength, &FileSystemFlags, FileSystemNameBuffer, FileSystemNameSize)) lastError = ::GetLastError(); cout << VolumeNameBuffer << endl; } Hi - try this. It worked for me. I changed the NULL pointers to arrays, amongst other things. RD kingkong321 May 29th, 2002, 02:51 PM Hi R. J. Dunnill thank you very much. your posting mehlped me to get what i searched for. ;-) thanks!!! Regards, kingkong321 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |