OpenCBM
xum1541/WINDOWS/dllmain.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2007, 2010 Spiro Trikaliotis
8  * Copyright 2009 Nate Lawson
9  *
10 */
11 
20 #include <windows.h>
21 #include <windowsx.h>
22 
23 #include "dynlibusb.h"
24 
25 
27 #define DBG_USERMODE
28 
30 #define DBG_DLL
31 
33 #define DBG_PROGNAME "OPENCBM-XUM1541.DLL"
34 
36 //#define DBG_IS_DEBUG_C
37 
38 #include "debug.h"
39 
41 #define OPENCBM_PLUGIN
42 #include "archlib.h"
43 
44 #include "xum1541.h"
45 
67 BOOL WINAPI
68 DllMain(IN HANDLE Module, IN DWORD Reason, IN LPVOID Reserved)
69 {
70  return TRUE;
71 }
72 
73 int CBMAPIDECL
74 opencbm_plugin_init(void)
75 {
76 #if DBG
77 
78  // Read the debugging flags from the registry
79 
80  cbm_get_debugging_flags("xum1541");
81 
82 #endif
83 
84  return dynlibusb_init();
85 }
86 
87 void CBMAPIDECL
88 opencbm_plugin_uninit(void)
89 {
90  dynlibusb_uninit();
91 }
void cbm_get_debugging_flags(const char *ModuleName)
Set the debugging flags.
Definition: registry.c:97
Define makros for debugging purposes.
#define CBMAPIDECL
Definition: opencbm.h:85
#define WINAPI
Definition: opencbm.h:86
BOOL WINAPI DllMain(IN HANDLE Module, IN DWORD Reason, IN LPVOID Reserved)
Dummy DllMain.
Allow for libusb (0.1) to be loaded dynamically (Currently, this is used on Windows only) ...