Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
 
Add your own
alternative version

3D Graph ActiveX Control

, 2 Aug 2003
An ATL/STL ActiveX control based on OpenGL library for 3D data visualization
Prize winner in Competition "MFC/C++ May 2003"
ntgraph3d_bin.zip
ntgraph3d_demo.zip
NTGraph3D_demo
Demo3D
Demo.aps
Demo.clw
Demo.dsp
Demo.dsw
Demo.ncb
Demo.opt
Demo.plg
res
Demo.ico
Demo3D.hta
Torus
res
Torus.ico
Torus.aps
Torus.clw
Torus.dsp
Torus.dsw
Torus.ncb
Torus.opt
Torus.plg
ntgraph3d_src.zip
NTGraph3D_src
graphctl.bmp
GraphCtl.rgs
NTGraph3D.aps
NTGraph3D.def
NTGraph3D.dsp
NTGraph3D.dsw
NTGraph3D.ncb
NTGraph3D.opt
NTGraph3D.plg
NTGraph3D.tlb
NTGraph3Dps.def
NTGraph3Dps.mk
ReleaseMinSize
Test.dsm
ntgraph_bin.zip
// NTGraph3D.cpp : Implementation of DLL Exports.


// Note: Proxy/Stub Information
//      To build a separate proxy/stub DLL, 
//      run nmake -f NTGraph3Dps.mk in the project directory.

#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "NTGraph3D.h"

#include "NTGraph3D_i.c"
#include "GraphCtl.h"


CComModule _Module;

BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_NTGraph3D, CGraphCtl)
END_OBJECT_MAP()

/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point

extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
    if (dwReason == DLL_PROCESS_ATTACH)
    {
        _Module.Init(ObjectMap, hInstance, &LIBID_NTGRAPH3DLib);
        DisableThreadLibraryCalls(hInstance);
    }
    else if (dwReason == DLL_PROCESS_DETACH)
        _Module.Term();
    return TRUE;    // ok
}

/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE

STDAPI DllCanUnloadNow(void)
{
    return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
}

/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type

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

/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry

STDAPI DllRegisterServer(void)
{
    // registers object, typelib and all interfaces in typelib
    return _Module.RegisterServer(TRUE);
}

/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry

STDAPI DllUnregisterServer(void)
{
    return _Module.UnregisterServer(TRUE);
}


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

Nikolai Teofilov
Researcher
Germany Germany
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 3 Aug 2003
Article Copyright 2003 by Nikolai Teofilov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid