OpenCBM
xu1541/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, 2009 Spiro Trikaliotis
8  *
9 */
10 
19 #include <windows.h>
20 #include <windowsx.h>
21 
22 #include "dynlibusb.h"
23 
24 
26 #define DBG_USERMODE
27 
29 #define DBG_DLL
30 
32 #define DBG_PROGNAME "OPENCBM-XU1541.DLL"
33 
35 //#define DBG_IS_DEBUG_C
36 
37 #include "debug.h"
38 
40 #define OPENCBM_PLUGIN
41 #include "archlib.h"
42 
43 #include "xu1541.h"
44 
66 BOOL WINAPI
67 DllMain(IN HANDLE Module, IN DWORD Reason, IN LPVOID Reserved)
68 {
69  return TRUE;
70 }
71 
72 int CBMAPIDECL
73 opencbm_plugin_init(void)
74 {
75 #if DBG
76 
77  // Read the debugging flags from the registry
78 
79  cbm_get_debugging_flags("xu1541");
80 
81 #endif
82 
83  return dynlibusb_init();
84 }
85 
86 void CBMAPIDECL
87 opencbm_plugin_uninit(void)
88 {
89  dynlibusb_uninit();
90 }
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
Allow for libusb (0.1) to be loaded dynamically (Currently, this is used on Windows only) ...
BOOL WINAPI DllMain(IN HANDLE Module, IN DWORD Reason, IN LPVOID Reserved)
Dummy DllMain.