Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/home/rdbrown/doxygen/cse125g1/IGameExporter/DllEntry.cpp

00001 /**********************************************************************
00002  *<
00003         FILE: DllEntry.cpp
00004 
00005         DESCRIPTION: Contains the Dll Entry stuff
00006 
00007         CREATED BY:      Neil Hazzard
00008 
00009         HISTORY:        summer 2002
00010 
00011  *>     Copyright (c) 2002, All Rights Reserved.
00012  **********************************************************************/
00013 #include "IGameExporter.h"
00014 
00015 extern ClassDesc2* GetIGameExporterDesc();
00016 
00017 HINSTANCE hInstance;
00018 int controlsInit = FALSE;
00019 
00020 
00021 BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
00022 {
00023         hInstance = hinstDLL;                           // Hang on to this DLL's instance handle.
00024 
00025         if (!controlsInit) {
00026                 controlsInit = TRUE;
00027                 InitCustomControls(hInstance);  // Initialize MAX's custom controls
00028                 InitCommonControls();                   // Initialize Win95 controls
00029         }
00030                         
00031         return (TRUE);
00032 }
00033 
00034 __declspec( dllexport ) const TCHAR* LibDescription()
00035 {
00036         return GetString(IDS_LIBDESCRIPTION);
00037 }
00038 
00039 //TODO: Must change this number when adding a new class
00040 __declspec( dllexport ) int LibNumberClasses()
00041 {
00042         return 1;
00043 }
00044 
00045 __declspec( dllexport ) ClassDesc* LibClassDesc(int i)
00046 {
00047         switch(i) {
00048                 case 0: return GetIGameExporterDesc();
00049                 default: return 0;
00050         }
00051 }
00052 
00053 __declspec( dllexport ) ULONG LibVersion()
00054 {
00055         return VERSION_3DSMAX;
00056 }
00057 
00058 // Let the plug-in register itself for deferred loading
00059 __declspec( dllexport ) ULONG CanAutoDefer()
00060 {
00061         return 1;
00062 }
00063 
00064 TCHAR *GetString(int id)
00065 {
00066         static TCHAR buf[256];
00067 
00068         if (hInstance)
00069                 return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
00070         return NULL;
00071 }
00072 

Generated on Thu Aug 18 16:02:56 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18