xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 24KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-29
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: C++??COM??組件??CoInitialize??

資源簡(jiǎn)介

實(shí)現(xiàn)一個(gè)最簡(jiǎn)單的COM組件,麻雀雖小,五臟俱全,使用完全C++和COM庫(kù)實(shí)現(xiàn),可以看到整個(gè)COM組件的組成脈絡(luò)。

資源截圖

代碼片段和文件信息

#include?“stdafx.h“
#include?“PeopleInterfaces.h“
#include?“PeopleFactory.h“

BOOL?APIENTRY?DllMain(?HMODULE?hModule
???????????????????????DWORD??ul_reason_for_call
???????????????????????LPVOID?lpReserved
?)
{
switch?(ul_reason_for_call)
{
case?DLL_PROCESS_ATTACH:
g_hModule?=?hModule;
case?DLL_THREAD_ATTACH:
case?DLL_THREAD_DETACH:
case?DLL_PROCESS_DETACH:
break;
}
return?TRUE;
}

/************************************************************************/
/*?DLL?應(yīng)用程序的導(dǎo)出函數(shù)。????????????????????????????????????????????????????*/
/************************************************************************/

//組件注冊(cè)函數(shù)
STDAPI?DllRegisterServer(void)
{
TCHAR?szModule[MAX_PATH];
DWORD?dwResult?=?::GetModuleFileName(g_hModule?szModule?MAX_PATH);
if?(0?==?dwResult)
{
return?SELFREG_E_CLASS;
}

return?CToolHelper::RegisterServer(?CLSID_EasyComPeople?
TEXT(“EasyCom.object“)?
szModule
TEXT(“EasyCom?Component?Description“))
?????S_OK?:?SELFREG_E_CLASS;
}

//組件取消注冊(cè)函數(shù)
STDAPI?DllUnregisterServer(void)
{
return?CToolHelper::UnRegisterServer(CLSID_EasyComPeople?TEXT(“EasyCom.object“))?
?????S_OK?:?SELFREG_E_CLASS;
}

//組件信息函數(shù)
STDAPI??DllGetClassobject(__in?REFCLSID?rclsid?__in?REFIID?riid?LPVOID?FAR*?ppv)
{
if?(rclsid?==?CLSID_EasyComPeople)
{
CPeopleFactory?*pFactory?=?new?CPeopleFactory;

if?(NULL?==?pFactory)
{
return?E_FAIL;
}

HRESULT?hr?=?pFactory->QueryInterface(riid?ppv);
return?hr;
}?
else
{
return?CLASS_E_CLASSNOTAVAILABLE;
}
}

//組件卸載函數(shù)
STDAPI??DllCanUnloadNow(void)
{
if(g_LockNumber?==?0?&&?g_EasyComNumber==0)
{
return?S_OK;
}
else
{
return?S_FALSE;
}
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-16?19:40??最簡(jiǎn)單的COM實(shí)現(xiàn)\
?????目錄???????????0??2016-06-16?19:40??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\
?????文件????????1790??2016-06-10?20:51??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\dllmain.cpp
?????文件?????????155??2016-06-10?21:04??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\EasyCom.def
?????文件????????5140??2016-06-10?21:04??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\EasyCom.vcproj
?????文件????????1401??2016-06-16?19:39??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\EasyCom.vcproj.QIHUQIH-I5QE4NK.Administrator.user
?????文件????????1673??2016-06-16?19:26??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\People.cpp
?????文件?????????460??2016-06-10?20:39??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\People.h
?????文件????????1402??2016-06-16?19:20??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\PeopleFactory.cpp
?????文件?????????528??2016-06-10?20:25??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\PeopleFactory.h
?????文件?????????774??2016-06-10?20:34??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\PeopleInterfaces.h
?????文件????????1161??2016-06-10?18:26??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\ReadMe.txt
?????文件?????????213??2016-06-10?20:37??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\stdafx.cpp
?????文件?????????546??2016-06-10?20:43??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\stdafx.h
?????文件????????3224??2016-06-10?20:37??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\ToolHelper.cpp
?????文件?????????446??2016-06-10?20:06??最簡(jiǎn)單的COM實(shí)現(xiàn)\EasyCom\ToolHelper.h
?????目錄???????????0??2016-06-16?19:40??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\
?????文件?????????774??2016-06-10?20:34??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\PeopleInterfaces.h
?????文件????????1183??2016-06-10?20:53??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\ReadMe.txt
?????文件?????????212??2016-06-10?20:53??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\stdafx.cpp
?????文件?????????362??2016-06-10?20:53??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\stdafx.h
?????文件????????1026??2016-06-10?20:53??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\targetver.h
?????文件????????1341??2016-06-16?19:39??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\TestCom.cpp
?????文件????????4602??2016-06-10?21:00??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\TestCom.vcproj
?????文件????????1427??2016-06-16?19:39??最簡(jiǎn)單的COM實(shí)現(xiàn)\TestCom\TestCom.vcproj.QIHUQIH-I5QE4NK.Administrator.user
?????文件????????1346??2016-06-10?21:00??最簡(jiǎn)單的COM實(shí)現(xiàn)\最簡(jiǎn)單的COM實(shí)現(xiàn).sln
?????文件???????41984??2016-06-16?19:39??最簡(jiǎn)單的COM實(shí)現(xiàn)\最簡(jiǎn)單的COM實(shí)現(xiàn).suo

評(píng)論

共有 條評(píng)論