To recognize a media i use SHGetDriveMedia;
on the second parameter I pass pdwMediaContent for reference and the api
insert the type of content.
However, the recognition is done asynchronously. How can I know when the api
has finished the recognition?
To recognize a media i use SHGetDriveMedia ; on the second parameter I pass
Share
It’s not asynchronous. When you call it right after putting the disk in the drive, it’s in “sniffing phase”, trying to determine what method of autoplaying the disk should be used. There are several detection phases that can be returned in the ARCONTENT flags when the function returns:
This seems to indicate (based on the text with
ARCONTENT_PHASE_FINALabove) that you should expect to need to call this function more than once, until you receive that value in the flags returned, at which point you can check the other values in the flag for disk type.