mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
22 lines
434 B
C++
22 lines
434 B
C++
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <unknwn.h>
|
|
|
|
const char* ffInitCom(void);
|
|
|
|
static inline void ffReleaseComObject(void* ppUnknown) {
|
|
IUnknown* pUnknown = *(IUnknown**) ppUnknown;
|
|
if (pUnknown) {
|
|
pUnknown->Release();
|
|
}
|
|
}
|
|
|
|
#define FF_AUTO_RELEASE_COM_OBJECT FF_A_CLEANUP(ffReleaseComObject)
|
|
|
|
#else
|
|
// Win32 COM headers requires C++ compiler
|
|
#error Must be included in C++ source file
|
|
#endif
|