Line | |
---|
1 | #include "stdafx.h" |
---|
2 | #include "..\Module_i.h" |
---|
3 | #include "..\Module_i.c" |
---|
4 | |
---|
5 | int _tmain(int argc, _TCHAR* argv[]) |
---|
6 | { |
---|
7 | CoInitialize(NULL); |
---|
8 | { |
---|
9 | CComPtr<IClassFactory> pClassFactory; |
---|
10 | const HRESULT nCoGetClassObjectResult = CoGetClassObject(CLSID_Foo, CLSCTX_ALL, NULL, __uuidof(IClassFactory), (VOID**) &pClassFactory); |
---|
11 | _tprintf(_T("nCoGetClassObjectResult 0x%08X\n"), nCoGetClassObjectResult); |
---|
12 | Sleep(10000); |
---|
13 | CComPtr<IFoo> pFoo; |
---|
14 | const HRESULT nCreateInstanceResult = pClassFactory->CreateInstance(NULL, __uuidof(IFoo), (VOID**) &pFoo); |
---|
15 | _tprintf(_T("nCreateInstanceResult 0x%08X\n"), nCreateInstanceResult); |
---|
16 | } |
---|
17 | CoUninitialize(); |
---|
18 | return 0; |
---|
19 | } |
---|
20 | |
---|
Note: See
TracBrowser
for help on using the repository browser.