Line | |
---|
1 | /* $Id: initterm.cpp,v 1.1 2002-04-10 18:35:18 bird Exp $ */
|
---|
2 | /*
|
---|
3 | * UXTHEME DLL entry point
|
---|
4 | *
|
---|
5 | * Copyright 1998 Sander van Leeuwen
|
---|
6 | * Copyright 1998 Peter Fitzsimmons
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | */
|
---|
10 |
|
---|
11 | #define INCL_DOSMODULEMGR
|
---|
12 | #define INCL_DOSPROCESS
|
---|
13 | #include <os2wrap.h> //Odin32 OS/2 api wrappers
|
---|
14 | #include <stdlib.h>
|
---|
15 | #include <stdio.h>
|
---|
16 | #include <string.h>
|
---|
17 | #include <odin.h>
|
---|
18 | #include <win32type.h>
|
---|
19 | #include <winconst.h>
|
---|
20 | #include <odinlx.h>
|
---|
21 | #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/
|
---|
22 | #include <initdll.h>
|
---|
23 |
|
---|
24 | // Win32 resource table (produced by wrc)
|
---|
25 | extern DWORD uxtheme_PEResTab;
|
---|
26 |
|
---|
27 | static HMODULE dllHandle = 0;
|
---|
28 |
|
---|
29 | BOOL WINAPI LibMainUxTheme(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
---|
30 | {
|
---|
31 | switch (fdwReason)
|
---|
32 | {
|
---|
33 | case DLL_PROCESS_ATTACH:
|
---|
34 | case DLL_THREAD_ATTACH:
|
---|
35 | case DLL_THREAD_DETACH:
|
---|
36 | case DLL_PROCESS_DETACH:
|
---|
37 | return TRUE;
|
---|
38 | }
|
---|
39 | return FALSE;
|
---|
40 | }
|
---|
41 |
|
---|
42 | ULONG SYSTEM DLL_InitUxTheme(ULONG hModule)
|
---|
43 | {
|
---|
44 | CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/
|
---|
45 |
|
---|
46 | dllHandle = RegisterLxDll(hModule, LibMainUxTheme, (PVOID)&uxtheme_PEResTab);
|
---|
47 | if (dllHandle == 0)
|
---|
48 | return -1;
|
---|
49 |
|
---|
50 | return 0;
|
---|
51 | }
|
---|
52 |
|
---|
53 | void SYSTEM DLL_TermUxTheme(ULONG hModule)
|
---|
54 | {
|
---|
55 | if (dllHandle)
|
---|
56 | UnregisterLxDll(dllHandle);
|
---|
57 | }
|
---|
58 |
|
---|
59 | ULONG SYSTEM DLL_Init(ULONG hModule)
|
---|
60 | {
|
---|
61 | if (DLL_InitDefault(hModule) == -1)
|
---|
62 | return -1;
|
---|
63 | return DLL_InitUxTheme(hModule);
|
---|
64 | }
|
---|
65 |
|
---|
66 | void SYSTEM DLL_Term(ULONG hModule)
|
---|
67 | {
|
---|
68 | DLL_TermUxTheme(hModule);
|
---|
69 | DLL_TermDefault(hModule);
|
---|
70 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.