/[pcsx2_0.9.7]/trunk/plugins/CDVDpeops/cdvdPeops.c
ViewVC logotype

Contents of /trunk/plugins/CDVDpeops/cdvdPeops.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 3216 byte(s)
committing r3113 initial commit again...
1 /***************************************************************************
2 cdvdPeops.c - description
3 -------------------
4 begin : Sun Nov 16 2003
5 copyright : (C) 2003 by Pete Bernert
6 email : BlackDove@addcom.de
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. See also the license.txt file for *
15 * additional informations. *
16 * *
17 ***************************************************************************/
18
19 //*************************************************************************//
20 // History of changes:
21 //
22 // 2003/11/16 - Pete
23 // - generic cleanup for the Peops release
24 //
25 //*************************************************************************//
26
27 // cdrPeops.cpp : Defines the entry point for the DLL application.
28 //
29
30 #include "stdafx.h"
31 #include "cdvdPeops.h"
32 #define _IN_PEOPS
33 #include "externals.h"
34
35 /////////////////////////////////////////////////////////
36
37 HINSTANCE hInst=0;
38
39 /////////////////////////////////////////////////////////
40 // get selected interface mode from registry: needed,
41 // if user has w2k and aspi available, so the plugin
42 // can know, what he wants to use
43
44 int iGetUserInterfaceMode(void)
45 {
46 HKEY myKey;DWORD temp;DWORD type;DWORD size;
47 int iRet=0;
48
49 if(RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\PS2Eplugin\\CDVD\\CDVDPeops",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
50 {
51 size = 4;
52 if(RegQueryValueEx(myKey,"InterfaceMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
53 iRet=(int)temp;
54 RegCloseKey(myKey);
55 }
56 return iRet;
57 }
58
59 /////////////////////////////////////////////////////////
60 // dll entry point
61
62 BOOL APIENTRY DllMain(HANDLE hModule,
63 DWORD ul_reason_for_call,
64 LPVOID lpReserved)
65 {
66 hInst=(HINSTANCE)hModule;
67
68 switch (ul_reason_for_call)
69 {//--------------------------------------------------//
70 case DLL_PROCESS_ATTACH:
71 iInterfaceMode=iGetUserInterfaceMode(); // get interface on startup
72 OpenGenInterface(); // open interface (can be changed in the config window)
73 break;
74 //--------------------------------------------------//
75 case DLL_PROCESS_DETACH:
76 CloseGenInterface(); // close interface
77 break;
78 //--------------------------------------------------//
79 case DLL_THREAD_ATTACH:
80 break;
81 //--------------------------------------------------//
82 case DLL_THREAD_DETACH:
83 break;
84 //--------------------------------------------------//
85 }
86 return TRUE;
87 }
88
89 /////////////////////////////////////////////////////////

  ViewVC Help
Powered by ViewVC 1.1.22