Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Customized Visual Studio .NET package: your fully integrated document window inside the IDE

, 20 Dec 2003
Create a fully integrated document window inside the Visual Studio IDE.
/**********************************************************************
- File Name: VsEditorFactory.h
- Date: 12/5/2003 4:58:22 PM
- Author: Michael Sheinin
- Description : 
	1. Declaration of IVsEditorFactory interface.
	2. Declaration of CVsEditorFactory class implementing IVsEditorFactory interface.
- Notes: 
	1. Number of methods, parameters and behavour of the interface were identified
	using code dissasembly and memory contents analysis.
	2. CVsEditorFactory class wraps real object (implementing IVsEditorFactory interface)
	obtained from the "bined" package.
	3. This is another hacked interface.
**********************************************************************/
#pragma once

#include <unknwn.h>

interface IServiceProvider;

interface IVsEditorFactory : public IUnknown
{
	virtual STDMETHODIMP QueryInterface(REFIID rid, void** ppObj ) = 0;
	virtual STDMETHODIMP_(ULONG) AddRef() = 0;
	virtual STDMETHODIMP_(ULONG) Release() = 0;
	virtual STDMETHODIMP CreateEditorInstance(DWORD dwFlg, LPCOLESTR pszDoc, LPOLESTR pszView,
									  void* pvHier, DWORD dwID, IUnknown* pDocDataExisting,
									  IUnknown** ppDocView, IUnknown** ppDocData, BSTR* pbsCapt,
									  GUID*	pguidCmdUI, void** pCDW ) = 0;
	virtual STDMETHODIMP Stub4( IServiceProvider* pSP ) = 0; // 1-st method called
	virtual STDMETHODIMP Stub5( ) = 0;						// called on VS exit
	virtual STDMETHODIMP Stub6( void* p1, void* p2) = 0;
};


class CVsEditorFactory : public IVsEditorFactory
{
public:
	CVsEditorFactory();
	~CVsEditorFactory();
	STDMETHODIMP QueryInterface(REFIID rid, void** ppObj );
	STDMETHODIMP_(ULONG) AddRef();
	STDMETHODIMP_(ULONG) Release();
	STDMETHODIMP CreateEditorInstance(DWORD dwFlg, LPCOLESTR pszDoc, LPOLESTR pszView,
									  void* pvHier, DWORD dwID, IUnknown* pDocDataExisting,
									  IUnknown** ppDocView, IUnknown** ppDocData, BSTR* pbsCapt,
									  GUID*	pguidCmdUI, void** pCDW );
	STDMETHODIMP Stub4( IServiceProvider* pSP );
	STDMETHODIMP Stub5( );
	STDMETHODIMP Stub6( void* p1, void* p2);
	BOOL Attach(void* pEditFact);
protected:
	IVsEditorFactory*	m_pRealObject;
	IServiceProvider*	m_pServiceProvider;
};

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Michael Sheinin
Web Developer
United States United States
For the last 7 years I have developed software in real-time/embedded and MS-Windows environments for military and civil markets. I hold B.Sc. degree in computer engineering. Living in Ontario, Canada, I like hiking and traveling in general. Currently, I'm looking for employment opportunity inside the GTA.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 21 Dec 2003
Article Copyright 2003 by Michael Sheinin
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid