Click here to Skip to main content
12,633,764 members (27,906 online)
Click here to Skip to main content

Stats

39.4K views
419 downloads
25 bookmarked
Posted

Using COM Objects in Scripting Languages -- Part 2 (Python)

, 20 Apr 2010 CPOL
This article shows how to instantiate a COM object in Python and use its methods and properties.
// dllmain.cpp : Implementation of DllMain.

#include "stdafx.h"
#include "resource.h"
#include "SimpleCOM_i.h"
#include "dllmain.h"
#include "dlldatax.h"

CSimpleCOMModule _AtlModule;

class CSimpleCOMApp : public CWinApp
{
public:

// Overrides
	virtual BOOL InitInstance();
	virtual int ExitInstance();

	DECLARE_MESSAGE_MAP()
};

BEGIN_MESSAGE_MAP(CSimpleCOMApp, CWinApp)
END_MESSAGE_MAP()

CSimpleCOMApp theApp;

BOOL CSimpleCOMApp::InitInstance()
{
#ifdef _MERGE_PROXYSTUB
	if (!PrxDllMain(m_hInstance, DLL_PROCESS_ATTACH, NULL))
		return FALSE;
#endif
	return CWinApp::InitInstance();
}

int CSimpleCOMApp::ExitInstance()
{
	return CWinApp::ExitInstance();
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sharjith
Engineer Tata Technologies Ltd
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161208.2 | Last Updated 20 Apr 2010
Article Copyright 2010 by Sharjith
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid