Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use __uuidof in MINGW?

Tags:

c++

gcc

mingw

com

I want to use __uuidof in function CoCreateInstance:

CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(Isesoft),(LPVOID*)&pem);

error:

'__uuidof' was not declared in this scope.

How can I use it in MINGW?

like image 543
CodeCat Avatar asked Sep 20 '25 11:09

CodeCat


1 Answers

__uuidof is an MS specific extension, but you should be able to replace __uuidof(IMyInterface) with IID_IMyInterface for the same behavior in a portable way.

like image 153
bara Avatar answered Sep 22 '25 05:09

bara