Click here to Skip to main content
14,212,087 members
Click here to Skip to main content

Stats

59.6K views
1.1K downloads
39 bookmarked

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

,
Rate this:
4.72 (20 votes)
Please Sign up or sign in to vote.
4.72 (20 votes)
20 Dec 2003        
Create a fully integrated document window inside the Visual Studio IDE.
// VsCustomPackage.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "VsCustomPackage.h"
#include "Stdio.h"
#include "VsDllIf.h"


CVsDllIf g_DllIf;


BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
	CDbg::Trace( "\n=>==== DllMain ================\n"
				 "=> Dll Handle = 0x%p\n", hModule );
	CDbg::Trace( " This version traces all function parameters,\n"
				 "=> return values, and call order\n"
				 "=>===============================\n" );
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		DisableThreadLibraryCalls((HMODULE)hModule);
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
    return TRUE;
}

//===================================================================
//===================================================================
STDAPI DllCanUnloadNow(void)
{
	return g_DllIf.CanUnload();
}


//===================================================================
//===================================================================
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
	return g_DllIf.GetClassObject(rclsid, riid, ppv);
}

//===================================================================
// DllRegisterServer - Adds entries to the system registry
//===================================================================
STDAPI DllRegisterServer(void)
{
	return g_DllIf.RegisterServer();
}

//===================================================================
// DllUnregisterServer - Removes entries from the system registry
//===================================================================
STDAPI DllUnregisterServer(void)
{
	return g_DllIf.UnregisterServer();
}

//===================================================================
// DllRegisterServer - Adds entries to the system registry
//===================================================================
STDAPI VSDllRegisterServer(void)
{
	return g_DllIf.VSRegisterServer();
}

//===================================================================
// DllUnregisterServer - Removes entries from the system registry
//===================================================================
STDAPI VSDllUnregisterServer(void)
{
	return g_DllIf.VSUnregisterServer();
}

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

Share

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.

Layout: fixed | fluid

Article Copyright 2003 by Michael Sheinin
Everything else Copyright © CodeProject, 1999-2019

Server Web01
Version 2.8.190619.2