windows-nt/Source/XPSP1/NT/shell/inc/objclsid.h
2020-09-26 16:20:57 +08:00

32 lines
529 B
C++

#ifndef _OBJCLSID_H_
#define _OBJCLSID_H_
class CObjectCLSID : public IPersist
{
public:
CObjectCLSID(const CLSID * pClsid) {_clsid = *pClsid;};
virtual ~CObjectCLSID() {}
//*** IUnknown ****
// (client must provide!)
//*** IPersist ***
STDMETHOD(GetClassID)(IN CLSID *pClassID)
{
HRESULT hr = E_INVALIDARG;
if (pClassID)
{
*pClassID = _clsid;
hr = S_OK;
}
return hr;
}
protected:
CLSID _clsid;
};
#endif // _OBJCLSID_H_