File: ReWire.c

package info (click to toggle)
cadencii 3.3.9%2Bsvn20110818.r1732-5
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 35,880 kB
  • sloc: cs: 160,836; java: 42,449; cpp: 7,605; ansic: 1,728; perl: 1,087; makefile: 236; php: 142; xml: 117; sh: 21
file content (637 lines) | stat: -rw-r--r-- 29,295 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#include "ReWire.h"

_RWDCloseImp                rw_d_close;
_RWDComBytesAvailableImp    rw_d_com_bytes_available;
_RWDComCheckConnectionImp   rw_d_com_check_connection;
_RWDComCreateImp            rw_d_com_create;
_RWDComDestroyImp           rw_d_com_destroy;
_RWDComDoesMessageFitImp    rw_d_com_does_message_fit;
_RWDComReadImp              rw_d_com_read;
_RWDComSendImp              rw_d_com_send;
_RWDIsCloseOKImp            rw_d_is_close_ok;
_RWDOpenImp                 rw_d_open;
_RWIsReWireMixerAppRunningImp   rw_is_rewire_mixer_app_running;
_RWM2CloseDeviceImp             rw2_close_device;
_RWM2CloseImp                   rw2_close;
_RWM2DriveAudioImp              rw2_drive_audio;
_RWM2GetControllerInfoImp       rw2_get_controller_info;
_RWM2GetDeviceCountImp          rw2_get_device_count;
_RWM2GetDeviceInfoByHandleImp   rw2_get_device_info_byte_handle;
_RWM2GetDeviceInfoImp           rw2_get_device_info;
_RWM2GetEventBusInfoImp         rw2_get_event_bus_info;
_RWM2GetEventChannelInfoImp     rw2_get_event_channel_info;
_RWM2GetEventInfoImp            rw2_get_event_info;
_RWM2GetNoteInfoImp             rw2_get_note_info;
_RWM2IdleImp                    rw2_idle;
_RWM2IsCloseDeviceOKImp         rw2_is_close_device_ok;
_RWM2IsCloseOKImp               rw2_is_close_ok;
_RWM2IsPanelAppLaunchedImp      rw2_is_panel_app_lauched;
_RWM2LaunchPanelAppImp          rw2_lauch_panel_app;
_RWM2OpenDeviceImp              rw2_open_device;
_RWM2OpenImp                    rw2_open;
_RWM2QuitPanelAppImp            rw2_quit_panel_app;
_RWM2SetAudioInfoImp            rw2_set_audio_info;
_RWMCloseDeviceImp              rw_m_close_device;
_RWMCloseImp                    rw_m_close;
_RWMDriveAudioImp               rw_m_drive_audio;
_RWMGetDeviceCountImp           rw_m_get_device_count;
_RWMGetDeviceInfoByHandleImp    rw_m_get_device_info_by_handle;
_RWMGetDeviceInfoImp            rw_m_get_device_info;
_RWMIdleImp                     rw_m_idle;
_RWMIsCloseDeviceOKImp          rw_m_is_close_device_ok;
_RWMIsCloseOKImp                rw_m_is_close_ok;
_RWMOpenDeviceImp               rw_m_open_device;
_RWMOpenImp                     rw_m_open;
_RWPCloseImp                    rw_p_close;
_RWPComBytesAvailableImp        rw_p_com_bytes_available;
_RWPComCheckConnectionImp       rw_p_com_check_connection;
_RWPComConnectImp               rw_p_com_connect;
_RWPComDisconnectImp            rw_p_com_disconnect;
_RWPComDoesMessageFitImp        rw_p_com_does_message_fit;
_RWPComReadImp                  rw_p_com_read;
_RWPComSendImp                  rw_p_com_send;
_RWPIsCloseOKImp                rw_p_is_close_ok;
_RWPLoadDeviceImp               rw_p_load_device;
_RWPOpenImp                     rw_p_open;
_RWPRegisterDeviceImp           rw_p_register_device;
_RWPUnloadDeviceImp             rw_p_unload_device;
_RWPUnregisterDeviceImp         rw_p_unregister_device;
_SmugglerDLL_UnitTest_AllocTestNames    smuggler_dll_unittest_alloc_test_names;
_SmugglerDLL_UnitTest_FreeTestNames     smuggler_dll_unittest_free_test_names;
_SmugglerDLL_UnitTest_RunTests          smuggler_dll_unittest_runtests;
_TopHatCloseDeviceImp       top_hat_close_device;
_TopHatCloseImp             top_hat_clsoe;
_TopHatDriveAudioImp        top_hat_drive_audio;
_TopHatGetDeviceCountImp    top_hat_get_device_count;
_TopHatGetDeviceInfoImp     top_hat_get_device_info;
_TopHatIdleImp              top_hat_idle;
_TopHatIsCloseDeviceOKImp   top_hat_is_close_device_ok;
_TopHatIsCloseOKImp         top_hat_is_close_ok;
_TopHatOpenDeviceImp        top_hat_open_device;
_TopHatOpenImp              top_hat_open;
BOOL g_initialized = FALSE;
FILE *g_log = NULL;

void load_entry_points(){
    g_log = fopen( "C:\\ReWire.log", "w" );
    HMODULE dll_handle = LoadLibraryA( "C:\\WINDOWS\\system32\\_ReWire.dll" );//, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
    fprintf( g_log, "dll_handle=0x%X\n", (int)dll_handle );
    rw_d_close                                                     = (_RWDCloseImp)GetProcAddress( dll_handle, "RWDCloseImp" );
    fprintf( g_log, "rw_d_close=0x%X\n", rw_d_close );
    rw_d_com_bytes_available                           = (_RWDComBytesAvailableImp)GetProcAddress( dll_handle, "RWDComBytesAvailableImp" );
    fprintf( g_log, "rw_d_com_bytes_available=0x%X\n", rw_d_com_bytes_available );
    rw_d_com_check_connection                          =(_RWDComCheckConnectionImp)GetProcAddress( dll_handle, "RWDComCheckConnectionImp" );
    fprintf( g_log, "rw_d_com_check_connection=0x%X\n", rw_d_com_check_connection );
    rw_d_com_create                                            = (_RWDComCreateImp)GetProcAddress( dll_handle, "RWDComCreateImp" );
    fprintf( g_log, "rw_d_com_create=0x%X\n", rw_d_com_create );
    rw_d_com_destroy                                          = (_RWDComDestroyImp)GetProcAddress( dll_handle, "RWDComDestroyImp" );
    fprintf( g_log, "rw_d_com_destroy=0x%X\n", rw_d_com_destroy );
    rw_d_com_does_message_fit                          = (_RWDComDoesMessageFitImp)GetProcAddress( dll_handle, "RWDComDoesMessageFitImp" );
    fprintf( g_log, "rw_d_com_does_message_fit=0x%X\n", rw_d_com_does_message_fit );
    rw_d_com_read                                                = (_RWDComReadImp)GetProcAddress( dll_handle, "RWDComReadImp" );
    fprintf( g_log, "rw_d_com_read=0x%X\n", rw_d_com_read );
    rw_d_com_send                                                = (_RWDComSendImp)GetProcAddress( dll_handle, "RWDComSendImp" );
    fprintf( g_log, "rw_d_com_send=0x%X\n", rw_d_com_send );
    rw_d_is_close_ok                                           = (_RWDIsCloseOKImp)GetProcAddress( dll_handle, "RWDIsCloseOKImp" );
    fprintf( g_log, "rw_d_is_close_ok=0x%X\n", rw_d_is_close_ok );
    rw_d_open                                                       = (_RWDOpenImp)GetProcAddress( dll_handle, "RWDOpenImp" );
    fprintf( g_log, "rw_d_open=0x%X\n", rw_d_open );
    rw_is_rewire_mixer_app_running                = (_RWIsReWireMixerAppRunningImp)GetProcAddress( dll_handle, "RWIsReWireMixerAppRunningImp" );
    fprintf( g_log, "rw_is_rewire_mixer_app_running=0x%X\n", rw_is_rewire_mixer_app_running );
    rw2_close_device                                        = (_RWM2CloseDeviceImp)GetProcAddress( dll_handle, "RWM2CloseDeviceImp" );
    fprintf( g_log, "rw2_close_device=0x%X\n", rw2_close_device );
    rw2_close                                                     = (_RWM2CloseImp)GetProcAddress( dll_handle, "RWM2CloseImp" );
    fprintf( g_log, "rw2_close=0x%X\n", rw2_close );
    rw2_drive_audio                                          = (_RWM2DriveAudioImp)GetProcAddress( dll_handle, "RWM2DriveAudioImp" );
    fprintf( g_log, "rw2_drive_audio=0x%X\n", rw2_drive_audio );
    rw2_get_controller_info                           = (_RWM2GetControllerInfoImp)GetProcAddress( dll_handle, "RWM2GetControllerInfoImp" );
    fprintf( g_log, "rw2_get_controller_info=0x%X\n", rw2_get_controller_info );
    rw2_get_device_count                                 = (_RWM2GetDeviceCountImp)GetProcAddress( dll_handle, "RWM2GetDeviceCountImp" );
    fprintf( g_log, "rw2_get_device_count=0x%X\n", rw2_get_device_count );
    rw2_get_device_info_byte_handle               = (_RWM2GetDeviceInfoByHandleImp)GetProcAddress( dll_handle, "RWM2GetDeviceInfoByHandleImp" );
    fprintf( g_log, "rw2_get_device_info_byte_handle=0x%X\n", rw2_get_device_info_byte_handle );
    rw2_get_device_info                                   = (_RWM2GetDeviceInfoImp)GetProcAddress( dll_handle, "RWM2GetDeviceInfoImp" );
    fprintf( g_log, "rw2_get_device_info=0x%X\n", rw2_get_device_info );
    rw2_get_event_bus_info                              = (_RWM2GetEventBusInfoImp)GetProcAddress( dll_handle, "RWM2GetEventBusInfoImp" );
    fprintf( g_log, "rw2_get_event_bus_info=0x%X\n", rw2_get_event_bus_info );
    rw2_get_event_channel_info                      = (_RWM2GetEventChannelInfoImp)GetProcAddress( dll_handle, "RWM2GetEventChannelInfoImp" );
    fprintf( g_log, "rw2_get_event_channel_info=0x%X\n", rw2_get_event_channel_info );
    rw2_get_event_info                                     = (_RWM2GetEventInfoImp)GetProcAddress( dll_handle, "RWM2GetEventInfoImp" );
    fprintf( g_log, "rw2_get_event_info=0x%X\n", rw2_get_event_info );
    rw2_get_note_info                                       = (_RWM2GetNoteInfoImp)GetProcAddress( dll_handle, "RWM2GetNoteInfoImp" );
    fprintf( g_log, "rw2_get_note_info=0x%X\n", rw2_get_note_info );
    rw2_idle                                                       = (_RWM2IdleImp)GetProcAddress( dll_handle, "RWM2IdleImp" );
    fprintf( g_log, "rw2_idle=0x%X\n", rw2_idle );
    rw2_is_close_device_ok                              = (_RWM2IsCloseDeviceOKImp)GetProcAddress( dll_handle, "RWM2IsCloseDeviceOKImp" );
    fprintf( g_log, "rw2_is_close_device_ok=0x%X\n", rw2_is_close_device_ok );
    rw2_is_close_ok                                           = (_RWM2IsCloseOKImp)GetProcAddress( dll_handle, "RWM2IsCloseOKImp" );
    fprintf( g_log, "rw2_is_close_ok=0x%X\n", rw2_is_close_ok );
    rw2_is_panel_app_lauched                         = (_RWM2IsPanelAppLaunchedImp)GetProcAddress( dll_handle, "RWM2IsPanelAppLaunchedImp" );
    fprintf( g_log, "rw2_is_panel_app_lauched=0x%X\n", rw2_is_panel_app_lauched );
    rw2_lauch_panel_app                                  = (_RWM2LaunchPanelAppImp)GetProcAddress( dll_handle, "RWM2LaunchPanelAppImp" );
    fprintf( g_log, "rw2_lauch_panel_app=0x%X\n", rw2_lauch_panel_app );
    rw2_open_device                                          = (_RWM2OpenDeviceImp)GetProcAddress( dll_handle, "RWM2OpenDeviceImp" );
    fprintf( g_log, "rw2_open_device=0x%X\n", rw2_open_device );
    rw2_open                                                       = (_RWM2OpenImp)GetProcAddress( dll_handle, "RWM2OpenImp" );
    fprintf( g_log, "rw2_open=0x%X\n", rw2_open );
    rw2_quit_panel_app                                     = (_RWM2QuitPanelAppImp)GetProcAddress( dll_handle, "RWM2QuitPanelAppImp" );
    fprintf( g_log, "rw2_quit_panel_app=0x%X\n", rw2_quit_panel_app );
    rw2_set_audio_info                                     = (_RWM2SetAudioInfoImp)GetProcAddress( dll_handle, "RWM2SetAudioInfoImp" );
    fprintf( g_log, "rw2_set_audio_info=0x%X\n", rw2_set_audio_info );
    rw_m_close_device                                        = (_RWMCloseDeviceImp)GetProcAddress( dll_handle, "RWMCloseDeviceImp" );
    fprintf( g_log, "rw_m_close_device=0x%X\n", rw_m_close_device );
    rw_m_close                                                     = (_RWMCloseImp)GetProcAddress( dll_handle, "RWMCloseImp" );
    fprintf( g_log, "rw_m_close=0x%X\n", rw_m_close );
    rw_m_drive_audio                                          = (_RWMDriveAudioImp)GetProcAddress( dll_handle, "RWMDriveAudioImp" );
    fprintf( g_log, "rw_m_drive_audio=0x%X\n", rw_m_drive_audio );
    rw_m_get_device_count                                 = (_RWMGetDeviceCountImp)GetProcAddress( dll_handle, "RWMGetDeviceCountImp" );
    fprintf( g_log, "rw_m_get_device_count=0x%X\n", rw_m_get_device_count );
    rw_m_get_device_info_by_handle                 = (_RWMGetDeviceInfoByHandleImp)GetProcAddress( dll_handle, "RWMGetDeviceInfoByHandleImp" );
    fprintf( g_log, "rw_m_get_device_info_by_handle=0x%X\n", rw_m_get_device_info_by_handle );
    rw_m_get_device_info                                   = (_RWMGetDeviceInfoImp)GetProcAddress( dll_handle, "RWMGetDeviceInfoImp" );
    fprintf( g_log, "rw_m_get_device_info=0x%X\n", rw_m_get_device_info );
    rw_m_idle                                                       = (_RWMIdleImp)GetProcAddress( dll_handle, "RWMIdleImp" );
    fprintf( g_log, "rw_m_idle=0x%X\n", rw_m_idle );
    rw_m_is_close_device_ok                              = (_RWMIsCloseDeviceOKImp)GetProcAddress( dll_handle, "RWMIsCloseDeviceOKImp" );
    fprintf( g_log, "rw_m_is_close_device_ok=0x%X\n", rw_m_is_close_device_ok );
    rw_m_is_close_ok                                           = (_RWMIsCloseOKImp)GetProcAddress( dll_handle, "RWMIsCloseOKImp" );
    fprintf( g_log, "rw_m_is_close_ok=0x%X\n", rw_m_is_close_ok );
    rw_m_open_device                                          = (_RWMOpenDeviceImp)GetProcAddress( dll_handle, "RWMOpenDeviceImp" );
    fprintf( g_log, "rw_m_open_device=0x%X\n", rw_m_open_device );
    rw_m_open                                                       = (_RWMOpenImp)GetProcAddress( dll_handle, "RWMOpenImp" );
    fprintf( g_log, "rw_m_open=0x%X\n", rw_m_open );
    rw_p_close                                                     = (_RWPCloseImp)GetProcAddress( dll_handle, "RWPCloseImp" );
    fprintf( g_log, "rw_p_close=0x%X\n", rw_p_close );
    rw_p_com_bytes_available                           = (_RWPComBytesAvailableImp)GetProcAddress( dll_handle, "RWPComBytesAvailableImp" );
    fprintf( g_log, "rw_p_com_bytes_available=0x%X\n", rw_p_com_bytes_available );
    rw_p_com_check_connection                         = (_RWPComCheckConnectionImp)GetProcAddress( dll_handle, "RWPComCheckConnectionImp" );
    fprintf( g_log, "rw_p_com_check_connection=0x%X\n", rw_p_com_check_connection );
    rw_p_com_connect                                          = (_RWPComConnectImp)GetProcAddress( dll_handle, "RWPComConnectImp" );
    fprintf( g_log, "rw_p_com_connect=0x%X\n", rw_p_com_connect );
    rw_p_com_disconnect                                    = (_RWPComDisconnectImp)GetProcAddress( dll_handle, "RWPComDisconnectImp" );
    fprintf( g_log, "rw_p_com_disconnect=0x%X\n", rw_p_com_disconnect );
    rw_p_com_does_message_fit                          = (_RWPComDoesMessageFitImp)GetProcAddress( dll_handle, "RWPComDoesMessageFitImp" );
    fprintf( g_log, "rw_p_com_does_message_fit=0x%X\n", rw_p_com_does_message_fit );
    rw_p_com_read                                                = (_RWPComReadImp)GetProcAddress( dll_handle, "RWPComReadImp" );
    fprintf( g_log, "rw_p_com_read=0x%X\n", rw_p_com_read );
    rw_p_com_send                                                = (_RWPComSendImp)GetProcAddress( dll_handle, "RWPComSendImp" );
    fprintf( g_log, "rw_p_com_send=0x%X\n", rw_p_com_send );
    rw_p_is_close_ok                                           = (_RWPIsCloseOKImp)GetProcAddress( dll_handle, "RWPIsCloseOKImp" );
    fprintf( g_log, "rw_p_is_close_ok=0x%X\n", rw_p_is_close_ok );
    rw_p_load_device                                          = (_RWPLoadDeviceImp)GetProcAddress( dll_handle, "RWPLoadDeviceImp" );
    fprintf( g_log, "rw_p_load_device=0x%X\n", rw_p_load_device );
    rw_p_open                                                       = (_RWPOpenImp)GetProcAddress( dll_handle, "RWPOpenImp" );
    fprintf( g_log, "rw_p_open=0x%X\n", rw_p_open );
    rw_p_register_device                                  = (_RWPRegisterDeviceImp)GetProcAddress( dll_handle, "RWPRegisterDeviceImp" );
    fprintf( g_log, "rw_p_register_device=0x%X\n", rw_p_register_device );
    rw_p_unload_device                                      = (_RWPUnloadDeviceImp)GetProcAddress( dll_handle, "RWPUnloadDeviceImp" );
    fprintf( g_log, "rw_p_unload_device=0x%X\n", rw_p_unload_device );
    rw_p_unregister_device                              = (_RWPUnregisterDeviceImp)GetProcAddress( dll_handle, "RWPUnregisterDeviceImp" );
    fprintf( g_log, "rw_p_unregister_device=0x%X\n", rw_p_unregister_device );
    smuggler_dll_unittest_alloc_test_names = (_SmugglerDLL_UnitTest_AllocTestNames)GetProcAddress( dll_handle, "SmugglerDLL_UnitTest_AllocTestNames" );
    fprintf( g_log, "smuggler_dll_unittest_alloc_test_names=0x%X\n", smuggler_dll_unittest_alloc_test_names );
    smuggler_dll_unittest_free_test_names   = (_SmugglerDLL_UnitTest_FreeTestNames)GetProcAddress( dll_handle, "SmugglerDLL_UnitTest_FreeTestNames" );
    fprintf( g_log, "smuggler_dll_unittest_free_test_names=0x%X\n", smuggler_dll_unittest_free_test_names );
    smuggler_dll_unittest_runtests               = (_SmugglerDLL_UnitTest_RunTests)GetProcAddress( dll_handle, "SmugglerDLL_UnitTest_RunTests" );
    fprintf( g_log, "smuggler_dll_unittest_runtests=0x%X\n", smuggler_dll_unittest_runtests );
    top_hat_close_device                                  = (_TopHatCloseDeviceImp)GetProcAddress( dll_handle, "TopHatCloseDeviceImp" );
    fprintf( g_log, "top_hat_close_device=0x%X\n", top_hat_close_device );
    top_hat_clsoe                                               = (_TopHatCloseImp)GetProcAddress( dll_handle, "TopHatCloseImp" );
    fprintf( g_log, "top_hat_clsoe=0x%X\n", top_hat_clsoe );
    top_hat_drive_audio                                    = (_TopHatDriveAudioImp)GetProcAddress( dll_handle, "TopHatDriveAudioImp" );
    fprintf( g_log, "top_hat_drive_audio=0x%X\n", top_hat_drive_audio );
    top_hat_get_device_count                           = (_TopHatGetDeviceCountImp)GetProcAddress( dll_handle, "TopHatGetDeviceCountImp" );
    fprintf( g_log, "top_hat_get_device_count=0x%X\n", top_hat_get_device_count );
    top_hat_get_device_info                             = (_TopHatGetDeviceInfoImp)GetProcAddress( dll_handle, "TopHatGetDeviceInfoImp" );
    fprintf( g_log, "top_hat_get_device_info=0x%X\n", top_hat_get_device_info );
    top_hat_idle                                                 = (_TopHatIdleImp)GetProcAddress( dll_handle, "TopHatIdleImp" );
    fprintf( g_log, "top_hat_idle=0x%X\n", top_hat_idle );
    top_hat_is_close_device_ok                        = (_TopHatIsCloseDeviceOKImp)GetProcAddress( dll_handle, "TopHatIsCloseDeviceOKImp" );
    fprintf( g_log, "top_hat_is_close_device_ok=0x%X\n", top_hat_is_close_device_ok );
    top_hat_is_close_ok                                     = (_TopHatIsCloseOKImp)GetProcAddress( dll_handle, "TopHatIsCloseOKImp" );
    fprintf( g_log, "top_hat_is_close_ok=0x%X\n", top_hat_is_close_ok );
    top_hat_open_device                                    = (_TopHatOpenDeviceImp)GetProcAddress( dll_handle, "TopHatOpenDeviceImp" );
    fprintf( g_log, "top_hat_open_device=0x%X\n", top_hat_open_device );
    top_hat_open                                                 = (_TopHatOpenImp)GetProcAddress( dll_handle, "TopHatOpenImp" );
    fprintf( g_log, "top_hat_open=0x%X\n", top_hat_open );
    g_initialized = TRUE;
}

int main(){
    load_entry_points();
    return 0;
}

void RWDCloseImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDCloseImp\n" );
    rw_d_close();
}

void RWDComBytesAvailableImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComBytesAvailableImp\n" );
    rw_d_com_bytes_available();
}

void RWDComCheckConnectionImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComCheckConnectionImp\n" );
    rw_d_com_check_connection();
}

void RWDComCreateImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComCreateImp\n" );
    rw_d_com_create();
}

void RWDComDestroyImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComDestroyImp\n" );
    rw_d_com_destroy();
}

void RWDComDoesMessageFitImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComDoesMessageFitImp\n" );
    rw_d_com_does_message_fit();
}

void RWDComReadImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComReadImp\n" );
    rw_d_com_read();
}

void RWDComSendImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDComSendImp\n" );
    rw_d_com_send();
}

void RWDIsCloseOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDIsCloseOKImp\n" );
    rw_d_is_close_ok();
}

void RWDOpenImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWDOpenImp\n" );
    rw_d_open();
}

void RWIsReWireMixerAppRunningImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWIsReWireMixerAppRunningImp\n" );
    rw_is_rewire_mixer_app_running();
}

void RWM2CloseDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2CloseDeviceImp\n" );
    rw2_close_device();
}

void RWM2CloseImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2CloseImp\n" );
    rw2_close();
}

void RWM2DriveAudioImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2DriveAudioImp\n" );
    rw2_drive_audio();
}

void RWM2GetControllerInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetControllerInfoImp\n" );
    rw2_get_controller_info();
}

void RWM2GetDeviceCountImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetDeviceCountImp\n" );
    rw2_get_device_count();
}

void RWM2GetDeviceInfoByHandleImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetDeviceInfoByHandleImp\n" );
    rw2_get_device_info_byte_handle();
}

void RWM2GetDeviceInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetDeviceInfoImp\n" );
    rw2_get_device_info();
}

void RWM2GetEventBusInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetEventBusInfoImp\n" );
    rw2_get_event_bus_info();
}

void RWM2GetEventChannelInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetEventChannelInfoImp\n" );
    rw2_get_event_channel_info();
}

void RWM2GetEventInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetEventInfoImp\n" );
    rw2_get_event_info();
}

void RWM2GetNoteInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2GetNoteInfoImp\n" );
    rw2_get_note_info();
}

void RWM2IdleImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2IdleImp\n" );
    rw2_idle();
}

void RWM2IsCloseDeviceOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2IsCloseDeviceOKImp\n" );
    rw2_is_close_device_ok();
}

void RWM2IsCloseOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2IsCloseOKImp\n" );
    rw2_is_close_ok();
}

void RWM2IsPanelAppLaunchedImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2IsPanelAppLaunchedImp\n" );
    rw2_is_panel_app_lauched();
}

void RWM2LaunchPanelAppImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2LaunchPanelAppImp\n" );
    rw2_lauch_panel_app();
}

void RWM2OpenDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2OpenDeviceImp\n" );
    rw2_open_device();
}

void RWM2OpenImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2OpenImp\n" );
    rw2_open();
}

void RWM2QuitPanelAppImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2QuitPanelAppImp\n" );
    rw2_quit_panel_app();
}

void RWM2SetAudioInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWM2SetAudioInfoImp\n" );
    rw2_set_audio_info();
}

void RWMCloseDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMCloseDeviceImp\n" );
    rw_m_close_device();
}

void RWMCloseImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMCloseImp\n" );
    rw_m_close();
}

void RWMDriveAudioImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMDriveAudioImp\n" );
    rw_m_drive_audio();
}

void RWMGetDeviceCountImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMGetDeviceCountImp\n" );
    rw_m_get_device_count();
}

void RWMGetDeviceInfoByHandleImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMGetDeviceInfoByHandleImp\n" );
    rw_m_get_device_info_by_handle();
}

void RWMGetDeviceInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMGetDeviceInfoImp\n" );
    rw_m_get_device_info();
}

void RWMIdleImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMIdleImp\n" );
    rw_m_idle();
}

void RWMIsCloseDeviceOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMIsCloseDeviceOKImp\n" );
    rw_m_is_close_device_ok();
}

void RWMIsCloseOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMIsCloseOKImp\n" );
    rw_m_is_close_ok();
}

void RWMOpenDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMOpenDeviceImp\n" );
    rw_m_open_device();
}

void RWMOpenImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWMOpenImp\n" );
    rw_m_open();
}

void RWPCloseImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPCloseImp\n" );
    rw_p_close();
}

void RWPComBytesAvailableImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComBytesAvailableImp\n" );
    rw_p_com_bytes_available();
}

void RWPComCheckConnectionImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComCheckConnectionImp\n" );
    rw_p_com_check_connection();
}

void RWPComConnectImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComConnectImp\n" );
    rw_p_com_connect();
}

void RWPComDisconnectImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComDisconnectImp\n" );
    rw_p_com_disconnect();
}

void RWPComDoesMessageFitImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComDoesMessageFitImp\n" );
    rw_p_com_does_message_fit();
}

void RWPComReadImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComReadImp\n" );
    rw_p_com_read();
}

void RWPComSendImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPComSendImp\n" );
    rw_p_com_send();
}

void RWPIsCloseOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPIsCloseOKImp\n" );
    rw_p_is_close_ok();
}

void RWPLoadDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPLoadDeviceImp\n" );
    rw_p_load_device();
}

void RWPOpenImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPOpenImp\n" );
    rw_p_open();
}

void RWPRegisterDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPRegisterDeviceImp\n" );
    rw_p_register_device();
}

void RWPUnloadDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPUnloadDeviceImp\n" );
    rw_p_unload_device();
}

void RWPUnregisterDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "RWPUnregisterDeviceImp\n" );
    rw_p_unregister_device();
}

void SmugglerDLL_UnitTest_AllocTestNames(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "SmugglerDLL_UnitTest_AllocTestNames\n" );
    smuggler_dll_unittest_alloc_test_names();
}

void SmugglerDLL_UnitTest_FreeTestNames(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "SmugglerDLL_UnitTest_FreeTestNames\n" );
    smuggler_dll_unittest_free_test_names();
}

void SmugglerDLL_UnitTest_RunTests(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "SmugglerDLL_UnitTest_RunTests\n" );
    smuggler_dll_unittest_runtests();
}

void TopHatCloseDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatCloseDeviceImp\n" );
    top_hat_close_device();
}

void TopHatCloseImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatCloseImp\n" );
    top_hat_clsoe();
}

void TopHatDriveAudioImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatDriveAudioImp\n" );
    top_hat_drive_audio();
}

void TopHatGetDeviceCountImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatGetDeviceCountImp\n" );
    top_hat_get_device_count();
}

void TopHatGetDeviceInfoImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatGetDeviceInfoImp\n" );
    top_hat_get_device_info();
}

void TopHatIdleImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatIdleImp\n" );
    top_hat_idle();
}

void TopHatIsCloseDeviceOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatIsCloseDeviceOKImp\n" );
    top_hat_is_close_device_ok();
}

void TopHatIsCloseOKImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatIsCloseOKImp\n" );
    top_hat_is_close_ok();
}

void TopHatOpenDeviceImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatOpenDeviceImp\n" );
    top_hat_open_device();
}

void TopHatOpenImp(){
    if( !g_initialized ) load_entry_points();
    fprintf( g_log, "TopHatOpenImp\n" );
    top_hat_open();
}