本文整理汇总了C++中COperator::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ COperator::Initialize方法的具体用法?C++ COperator::Initialize怎么用?C++ COperator::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperator
的用法示例。
在下文中一共展示了COperator::Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
/**********************************************************
* WinMain *
*---------*
* Description:
* Main entry point for the application
***********************************************************/
int WINAPI WinMain(
HINSTANCE hInst,
HINSTANCE hPrevInst,
LPSTR lpCmdLine,
int nCmdShow
)
{
// Initialize COM.
if (FAILED(::CoInitialize( NULL )))
{
return 0;
}
// Create an instance of our main call-handling class
COperator *pOperator = new COperator( hInst );
if ( !pOperator )
{
return 0;
}
// Does initialization of SAPI and TAPI objects
HRESULT hr = pOperator->Initialize();
if ( FAILED( hr ) )
{
return 0;
}
// everything is initialized, so
// start the main dialog box
::DialogBoxParam( hInst,
MAKEINTRESOURCE(IDD_MAINDLG),
NULL,
MainDialogProc,
(LPARAM) pOperator
);
// This does the cleanup of SAPI and TAPI objects
delete pOperator;
::CoUninitialize();
return 1;
}