source: trunk/src/DPlayX/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.3 KB
RevLine 
[6646]1/* $Id: initterm.cpp,v 1.7 2001-09-05 12:51:21 bird Exp $
2 *
[21916]3 * DPLAYX DLL entry point
[4314]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*/
[5130]22#include <initdll.h>
[4314]23
[21916]24// Win32 resource table (produced by wrc)
25extern DWORD dplayx_PEResTab;
[4314]26
27static HMODULE dllHandle = 0;
28
[21916]29extern BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved );
30
31ULONG SYSTEM DLL_InitDPlayX(ULONG hModule)
[4314]32{
[21916]33 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/
[4314]34
[21916]35 dllHandle = RegisterLxDll(hModule, DPLAYX_LibMain, (PVOID)&dplayx_PEResTab);
36 if(dllHandle == 0)
37 return -1;
[4314]38
[21916]39 return 0;
40}
[4314]41
[21916]42void SYSTEM DLL_TermDPlayX(ULONG hModule)
43{
44 if (dllHandle)
45 UnregisterLxDll(dllHandle);
46}
[6646]47
[21916]48ULONG SYSTEM DLL_Init(ULONG hModule)
49{
50 if (DLL_InitDefault(hModule) == -1)
51 return -1;
52 return DLL_InitDPlayX(hModule);
53}
[4314]54
[21916]55void SYSTEM DLL_Term(ULONG hModule)
56{
57 DLL_TermDPlayX(hModule);
58 DLL_TermDefault(hModule);
[4314]59}
Note: See TracBrowser for help on using the repository browser.