source: OGRE/trunk/ogrenew/Tools/3dsmaxExport/plugins/PhysiqueInterface_sources/DllEntry.cpp @ 692

Revision 692, 1.3 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/**********************************************************************
2 *<
3        FILE: DllEntry.cpp
4
5        DESCRIPTION:Contains the Dll Entry stuff
6
7        CREATED BY:
8
9        HISTORY:
10
11 *>     Copyright (c) 1997, All Rights Reserved.
12 **********************************************************************/
13#include "PhyExport.h"
14
15extern ClassDesc2* GetPhyExportDesc();
16
17HINSTANCE hInstance;
18int controlsInit = FALSE;
19
20
21BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
22{
23        hInstance = hinstDLL;                           // Hang on to this DLL's instance handle.
24
25        if (!controlsInit) {
26                controlsInit = TRUE;
27                InitCustomControls(hInstance);  // Initialize MAX's custom controls
28                InitCommonControls();                   // Initialize Win95 controls
29        }
30                       
31        return (TRUE);
32}
33
34__declspec( dllexport ) const TCHAR* LibDescription()
35{
36        return GetString(IDS_LIBDESCRIPTION);
37}
38
39//TODO: Must change this number when adding a new class
40__declspec( dllexport ) int LibNumberClasses()
41{
42        return 1;
43}
44
45__declspec( dllexport ) ClassDesc* LibClassDesc(int i)
46{
47        switch(i) {
48                case 0: return GetPhyExportDesc();
49                default: return 0;
50        }
51}
52
53__declspec( dllexport ) ULONG LibVersion()
54{
55        return VERSION_3DSMAX;
56}
57
58TCHAR *GetString(int id)
59{
60        static TCHAR buf[256];
61
62        if (hInstance)
63                return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
64        return NULL;
65}
66
Note: See TracBrowser for help on using the repository browser.