00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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;
00024
00025 if (!controlsInit) {
00026 controlsInit = TRUE;
00027 InitCustomControls(hInstance);
00028 InitCommonControls();
00029 }
00030
00031 return (TRUE);
00032 }
00033
00034 __declspec( dllexport ) const TCHAR* LibDescription()
00035 {
00036 return GetString(IDS_LIBDESCRIPTION);
00037 }
00038
00039
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
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