Line | |
---|
1 | /* $Id: initterm.cpp,v 1.7 2001-09-05 12:51:21 bird Exp $
|
---|
2 | *
|
---|
3 | * DPLAYX 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 dplayx_PEResTab;
|
---|
26 |
|
---|
27 | static HMODULE dllHandle = 0;
|
---|
28 |
|
---|
29 | extern BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved );
|
---|
30 |
|
---|
31 | ULONG SYSTEM DLL_InitDPlayX(ULONG hModule)
|
---|
32 | {
|
---|
33 | CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/
|
---|
34 |
|
---|
35 | dllHandle = RegisterLxDll(hModule, DPLAYX_LibMain, (PVOID)&dplayx_PEResTab);
|
---|
36 | if(dllHandle == 0)
|
---|
37 | return -1;
|
---|
38 |
|
---|
39 | return 0;
|
---|
40 | }
|
---|
41 |
|
---|
42 | void SYSTEM DLL_TermDPlayX(ULONG hModule)
|
---|
43 | {
|
---|
44 | if (dllHandle)
|
---|
45 | UnregisterLxDll(dllHandle);
|
---|
46 | }
|
---|
47 |
|
---|
48 | ULONG SYSTEM DLL_Init(ULONG hModule)
|
---|
49 | {
|
---|
50 | if (DLL_InitDefault(hModule) == -1)
|
---|
51 | return -1;
|
---|
52 | return DLL_InitDPlayX(hModule);
|
---|
53 | }
|
---|
54 |
|
---|
55 | void SYSTEM DLL_Term(ULONG hModule)
|
---|
56 | {
|
---|
57 | DLL_TermDPlayX(hModule);
|
---|
58 | DLL_TermDefault(hModule);
|
---|
59 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.