source: trunk/src/uxtheme/initterm.cpp

Last change on this file was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

File size: 1.5 KB
RevLine 
[21899]1/* $Id: initterm.cpp,v 1.1 2002-04-10 18:35:18 bird Exp $ */
[8220]2/*
[21899]3 * UXTHEME DLL entry point
[8220]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
[21899]24// Win32 resource table (produced by wrc)
25extern DWORD uxtheme_PEResTab;
[8220]26
27static HMODULE dllHandle = 0;
28
29BOOL WINAPI LibMainUxTheme(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
30{
31 switch (fdwReason)
32 {
[21899]33 case DLL_PROCESS_ATTACH:
34 case DLL_THREAD_ATTACH:
35 case DLL_THREAD_DETACH:
36 case DLL_PROCESS_DETACH:
37 return TRUE;
[8220]38 }
39 return FALSE;
40}
[21899]41
42ULONG SYSTEM DLL_InitUxTheme(ULONG hModule)
[8220]43{
[21899]44 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/
[8220]45
[21899]46 dllHandle = RegisterLxDll(hModule, LibMainUxTheme, (PVOID)&uxtheme_PEResTab);
47 if (dllHandle == 0)
48 return -1;
[8220]49
[21899]50 return 0;
51}
[8220]52
[21899]53void SYSTEM DLL_TermUxTheme(ULONG hModule)
54{
55 if (dllHandle)
56 UnregisterLxDll(dllHandle);
[8220]57}
58
[21899]59ULONG SYSTEM DLL_Init(ULONG hModule)
60{
61 if (DLL_InitDefault(hModule) == -1)
62 return -1;
63 return DLL_InitUxTheme(hModule);
64}
65
66void 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.