1 /*
2     TiMidity++ -- MIDI to WAVE converter and player
3     Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
4     Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
5 
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20 
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif /* HAVE_CONFIG_H */
24 
25 #include <windows.h>
26 #include <stdio.h>
27 #ifndef NO_STRING_H
28 #include <string.h>
29 #else
30 #include <strings.h>
31 #endif
32 #include "timidity.h"
33 #include "dlutils.h"
34 
35 /*ARGSUSED*/
dl_init(int argc,char ** argv)36 void dl_init(int argc, char **argv)
37 {
38 }
39 
dl_load_file(char * filename)40 void *dl_load_file(char *filename)
41 {
42     void *RETVAL;
43 
44     RETVAL = (void*)LoadLibrary(filename);
45     return RETVAL;
46 }
47 
dl_find_symbol(void * libhandle,char * symbolname)48 void *dl_find_symbol(void *libhandle, char *symbolname)
49 {
50     void *RETVAL;
51 
52     RETVAL = (void*) GetProcAddress((HINSTANCE) libhandle, symbolname);
53     return RETVAL;
54 }
55 
dl_free(void * libhandle)56 void dl_free(void *libhandle)
57 {
58     FreeLibrary((HINSTANCE)libhandle);
59 }
60