本文整理汇总了C++中CComModule::GetClassObject方法的典型用法代码示例。如果您正苦于以下问题:C++ CComModule::GetClassObject方法的具体用法?C++ CComModule::GetClassObject怎么用?C++ CComModule::GetClassObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComModule
的用法示例。
在下文中一共展示了CComModule::GetClassObject方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
#ifndef NO_EXPIRATION_DATE
// check if we are outdated
// delete this for an official release
SYSTEMTIME SystemTime;
GetSystemTime(&SystemTime);
if ((SystemTime.wYear * 500 + SystemTime.wMonth * 35 + SystemTime.wDay) >
(EXP_YEAR * 500 + EXP_MONTH * 35 + EXP_DAY)) {
char szTitle[256];
LoadString(_Module.m_hInst, IDS_EXPIREDTITLE, szTitle, sizeof szTitle);
char szText[256];
LoadString(_Module.m_hInst, IDS_EXPIRED, szText, sizeof szText);
MessageBox(0, szText, szTitle, MB_ICONINFORMATION|MB_OK);
return CLASS_E_CLASSNOTAVAILABLE;
}
#endif
/*
if ( !IsSingleThreadedApartment() ) {
MessageBox(0, "Wrong threading model, please reinstall VPinMAME!", "Unable to run", MB_ICONINFORMATION|MB_OK);
return CLASS_E_CLASSNOTAVAILABLE;
}
*/
#ifdef _MERGE_PROXYSTUB
if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK)
return S_OK;
#endif
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例2: getClassObject
HRESULT OPCEngine::getClassObject(
IN REFCLSID rclsid,
IN REFIID riid,
OUT LPVOID *ppvObj)
{
return _Module.GetClassObject(rclsid, riid, ppvObj);
}
示例3: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
#ifdef _MERGE_PROXYSTUB
if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK)
return S_OK;
#endif
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例4: DllGetClassObject
extern "C" STDAPI DllGetClassObject(
__in REFCLSID rclsid,
__in REFIID riid,
__deref_out LPVOID *ppv)
{
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例5:
/////////////////////////////////////////////////////////////////////////////
//++
//
// DllGetClassObject
//
// Description:
// Returns a class factory to create an object of the requested type
//
// Arguments:
// rclsidIn - CLSID of the class to create.
// riidIn - Requested interface of the class.
// ppvOut - Pointer to send the class back to the caller.
//
// Return Value:
// S_OK
// Success.
//
// Other errors as HRESULTs...
//
//--
/////////////////////////////////////////////////////////////////////////////
STDAPI
DllGetClassObject(
REFCLSID rclsidIn
, REFIID riidIn
, LPVOID * ppvOut
)
{
return _Module.GetClassObject( rclsidIn, riidIn, ppvOut );
} //*** DllGetClassObject
示例6: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
// Initialize the application, if needed
g_papp->Initialize(ZString());
#ifdef _MERGE_PROXYSTUB
if (S_OK == PrxDllGetClassObject(rclsid, riid, ppv))
return S_OK;
#endif
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例7:
//2 使用类厂创建对象,返回接口
IUnknown* MyCreateInstance2(CLSID clsid)
{
//1 根据组件ID获取组件的类厂接口
IClassFactory* piFactory=NULL;
_Module.GetClassObject(clsid,IID_IClassFactory,
(LPVOID*)&piFactory);
//2 使用类厂创建组件,返回接口
IUnknown* piUnknown=NULL;
piFactory->CreateInstance(NULL,IID_IUnknown,
(LPVOID*)&piUnknown);
return piUnknown;
}
示例8: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) {
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例9: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例10: DllGetClassObject
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
ATLTRACE("DllGetClassObject\n");
return _Module.GetClassObject(rclsid, riid, ppv);
}
示例11: DllGetClassObject
STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID* ppv)
{
TraceMsg( L"-->DllGetClassObject.\n");
return _Module.GetClassObject(rclsid, riid, ppv);
}