YC Yc.W home Systems · C++ · AI Infrastructure
C & C++ · Note

C++-CLSID

Explore all C & C++ notes →

July 9, 2020 9:08 PM

OPC中Server的CLSID转换。

转换用宏: USES_CONVERSION;

##StringFromCLSID CString temp; LPOLESTR lpszOleUuidstr1 = NULL; StringFromCLSID(clsid,&lpszOleUuidstr1); LPTSTR lpszUuidstr1 = OLE2T(lpszOleUuidstr1); temp.Format(_T(“%s”),lpszUuidstr1);

##CLSIDFromString LPTSTR tempL = “{C14D1400-D13A-11D2-93B9-0060B067C684}”; LPOLESTR tempLp = T2OLE(tempL); CLSIDFromString((LPOLESTR)tempLp, (LPCLSID)&clsid);


← Previous Windows API-_com_error

Next → Java-JNA