client.cpp
来自「The source code samples for chapter 2, 4」· C++ 代码 · 共 27 行
CPP
27 行
// client.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "..\fwdshims.h"
struct ComInit
{
ComInit(DWORD dwCoInit = COINIT_APARTMENTTHREADED) { CoInitializeEx(0, dwCoInit); }
~ComInit() { CoUninitialize(); }
} g_com;
int main(int argc, char* argv[])
{
CComPtr<IUnknown> spunk;
if( SUCCEEDED(spunk.CoCreateInstance(__uuidof(AcePowell))) )
{
CComQIPtr<ICowboy> spcb = spunk;
if( spcb ) spcb->Draw();
CComQIPtr<IArtist> spa = spunk;
if( spa ) spa->Draw();
}
return S_OK;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?