|
/****************************** Module Header ******************************\
* Module Name: CppCOMClient.cpp
* Project:
* Copyright (c) Microsoft Corporation.
*
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
* All other rights reserved.
*
* History:
* * 1/11/2009 2:54 PM Jialiang Ge Created
\***************************************************************************/
#pragma region Includes
#include "stdafx.h"
#include "RawAPI.h" // The examples of using the raw COM API to
// consume a COM server
#include "ImportDirective.h" // The examples of using the #import directive
// and smart pointers to consume a COM server
#pragma endregion
int _tmain(int argc, _TCHAR* argv[])
{
HANDLE hThread;
hThread = CreateThread(NULL, 0, RawConsumeSTAComponent, NULL, 0, NULL);
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
hThread = CreateThread(NULL, 0, ImportCSharpComponent, NULL, 0, NULL);
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Microsoft All-In-One Code Framework delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented to demonstrate one frequently-asked, tested or used coding scenario based on our support experience in MSDN newsgroups and forums. If you are a software developer, you can fill the skeleton with blood, muscle and soul. If you are a software tester or a support engineer like us, you may extend the sample codes a little to fit your specific test scenario or refer your customer to this project if the customer's question coincides with what we collected.
http://cfx.codeplex.com/