TomJeffries
TomJeffries

Reputation: 568

Windows 7 CoreAudio Media Foundation- uuidof of IID_IAudioStreamVolume

I'm getting a link error for the following code:

hr = pPlaybackClient->GetService(IID_IAudioStreamVolume, (void **)&pStreamVolume);

The link error is "Unresolved external symbol _IID_IAudioStreamVolume"

IID_IAudioStreamVolume is defined in Audioclient.h, and I am #including that file. If I declare:

const IID IID_IAudioStreamVolume = __uuidof(IID_IAudioStreamVolume);

I get "error: operand of __uuidof must have a class or enum type for which __declspec(uuid('...')) has been specified.

I'm sure this is a minor problem, but I don't see the answer- help would be appreciated.

Upvotes: 0

Views: 379

Answers (1)

TomJeffries
TomJeffries

Reputation: 568

Found it. Using __uuidof(IAudioStreamVolume) instead of IID_IAudioStreamVolume allows it to compile and link properly. If anybody knows where I can find some documentation with regards to what MS is doing here I would appreciate it.

Upvotes: 1

Related Questions