Added static keyword to avoid link errors

This commit is contained in:
Thomas Wilkie 2023-09-24 21:43:53 +09:00
parent 00cd3ea11b
commit 801c070bd2
1 changed files with 14 additions and 14 deletions

View File

@ -1,27 +1,27 @@
#ifndef _CLSIDS_AND_IIDS_H_
#define _CLSIDS_AND_IIDS_H_
// For whatever reason IID's and CLSID's are not easily accessible with C, C++ can use __uuidof() or something.
// I am unclear on wht the proper fix is supposed to be but this works to fix the LNK2001 error for underfined externals
#include <Windows.h>
//#include <initguid.h>
//BCDE0395-E52F-467C-8E3D-C4579291692E
const CLSID CLSID_MMDeviceEnumerator = { 0xBCDE0395, 0xE52F, 0x467C, { 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E } };
//const IID IID_IMMDeviceEnumerator= {0xA95664D, 0x9614, 0x4F35, 0xA746, 0xDE8DB63617E6};
const static CLSID CLSID_MMDeviceEnumerator = { 0xBCDE0395, 0xE52F, 0x467C, { 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E } };
//A95664D2-9614-4F35-A746-DE8DB63617E6
const IID IID_IMMDeviceEnumerator = { 0xA95664D2, 0x9614, 0x4F35, { 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6 } };
const static IID IID_IMMDeviceEnumerator = { 0xA95664D2, 0x9614, 0x4F35, { 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6 } };
//BFA971F1-4D5E-40BB-935E-967039BFBEE4
const IID IID_IAudioSessionManager = { 0xBFA971F1, 0x4D5E, 0x40BB, { 0x93, 0x5E, 0x96, 0x70, 0x39, 0xBF, 0xBE, 0xE4 } };
const static IID IID_IAudioSessionManager = { 0xBFA971F1, 0x4D5E, 0x40BB, { 0x93, 0x5E, 0x96, 0x70, 0x39, 0xBF, 0xBE, 0xE4 } };
//1CB9AD4C-DBFA-4c32-B178-C2F568A703B2
const IID IID_IAudioClient = { 0x1CB9AD4C, 0xDBFA, 0x4C32, { 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2 } };
const static IID IID_IAudioClient = { 0x1CB9AD4C, 0xDBFA, 0x4C32, { 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2 } };
//F4B1A599-7266-4319-A8CA-E70ACB11E8CD
const IID IID_IAudioSessionControl = { 0xF4B1A599, 0x7266, 0x4319, { 0xA8, 0xCA, 0xE7, 0x0A, 0xCB, 0x11, 0xE8, 0xCD } };
//5CDF2C82 - 841E-4546 - 9722 - 0CF74078229A
const IID IID_IAudioEndpointVolume = { 0x5CDF2C82, 0x841E, 0x4546, { 0x97, 0x22, 0x0C, 0xF7, 0x40, 0x78, 0x22, 0x9A } };
//77AA99A0 - 1BD6 - 484F - 8BC7 - 2C654C9A9B6F
const IID IID_IAudioSessionManager2 = { 0x77AA99A0, 0x1BD6, 0x484F, { 0x8B, 0xC7, 0x2C, 0x65, 0x4C, 0x9A, 0x9B, 0x6F } };
const static IID IID_IAudioSessionControl = { 0xF4B1A599, 0x7266, 0x4319, { 0xA8, 0xCA, 0xE7, 0x0A, 0xCB, 0x11, 0xE8, 0xCD } };
//5CDF2C82-841E-4546-9722-0CF74078229A
const static IID IID_IAudioEndpointVolume = { 0x5CDF2C82, 0x841E, 0x4546, { 0x97, 0x22, 0x0C, 0xF7, 0x40, 0x78, 0x22, 0x9A } };
//77AA99A0-1BD6-484F-8BC7-2C654C9A9B6F
const static IID IID_IAudioSessionManager2 = { 0x77AA99A0, 0x1BD6, 0x484F, { 0x8B, 0xC7, 0x2C, 0x65, 0x4C, 0x9A, 0x9B, 0x6F } };
//BFB7FF88-7239-4FC9-8FA2-07C950BE9C6D
const IID IID_IAudioSessionControl2 = { 0xBFB7FF88, 0x7239, 0x4FC9, {0x8F, 0xA2, 0x07, 0xC9, 0x50, 0xBE, 0x9C, 0x6D } };
//641DD20B - 4D41 - 49CC - ABA3 - 174B9477BB08
const IID IID_IAudioSessionNotification = { 0x641DD20B, 0x4D41, 0x49CC, { 0xAB, 0xA3, 0x17, 0x4B, 0x94, 0x77, 0xBB, 0x08 } };
const static IID IID_IAudioSessionControl2 = { 0xBFB7FF88, 0x7239, 0x4FC9, {0x8F, 0xA2, 0x07, 0xC9, 0x50, 0xBE, 0x9C, 0x6D } };
//641DD20B-4D41-49CC-ABA3-174B9477BB08
const static IID IID_IAudioSessionNotification = { 0x641DD20B, 0x4D41, 0x49CC, { 0xAB, 0xA3, 0x17, 0x4B, 0x94, 0x77, 0xBB, 0x08 } };
#endif