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 | |
---|
15 | extern ClassDesc2* GetPhyExportDesc(); |
---|
16 | |
---|
17 | HINSTANCE hInstance; |
---|
18 | int controlsInit = FALSE; |
---|
19 | |
---|
20 | |
---|
21 | BOOL 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 | |
---|
58 | TCHAR *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.