-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbpq32.h
595 lines (339 loc) · 19.1 KB
/
bpq32.h
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
/*
Declarations of BPQ32 API funtions
There are two sets of definitions, one for static linking against bpq32.lib, and one for
dynamic linking using LoadLibrary/GetProcAddress
Define symbol DYNLOADBPQ before including this file to use the dynamic form.
If you are writing an External Driver, rather than an application,
you must use Dynamic Linking, and you must also define symbol EXTDLL, which will
make the code use GetProcAddress rather than LoadLibrary. Without this the reference
count on BPQ32.dll gets messed up, and the code will not unload cleanly.
*/
#ifndef DYNLOADBPQ
// Definitions for Statically Linked DLL
struct PORTCONTROL * APIENTRY GetPortTableEntryFromPortNum(int portslot);
struct PORTCONTROL * APIENTRY GetPortTableEntryFromSlot(int portslot);
// Returns number of free buffers
// (BPQHOST function 7 (part)).
int APIENTRY GetFreeBuffs();
// Returns count of packets waiting on stream
// (BPQHOST function 7 (part)).
int APIENTRY RXCount(int Stream);
// Returns number of packets on TX queue for stream
// (BPQHOST function 7 (part)).
int APIENTRY TXCount(int Stream);
// Returns number of monitor frames available
// (BPQHOST function 7 (part)).
int APIENTRY MONCount(int Stream);
// Returns call connecten on stream (BPQHOST function 8 (part)).
int APIENTRY GetCallsign(int stream, char * callsign);
// Returns connection info for stream (BPQHOST function 8).
int APIENTRY GetConnectionInfo(int stream, char * callsign,
int * port, int * sesstype, int * paclen,
int * maxframe, int * l4window);
int APIENTRY GetStreamPID(int Stream);
// Returns Path of BPQDirectroy
UCHAR * APIENTRY GetBPQDirectory();
UCHAR * APIENTRY GetProgramDirectory();
UCHAR * APIENTRY GetLogDirectory();
HKEY APIENTRY GetRegistryKey();
char * APIENTRY GetRegistryKeyText();
UCHAR * APIENTRY GetSignOnMsg();
UCHAR * APIENTRY GetVersionString();
// Returns number of prcess attached to BPQ32
int APIENTRY GetAttachedProcesses();
// Send Session Control command (BPQHOST function 6)
// Command = 0 Connect using APPL MASK IN param
// Command = 1 Connect
// Command = 2 Disconect
// Command = 3 Return to Node
int APIENTRY SessionControl(int stream, int command, int param);
// Sets Application Flags and Mask for stream. (BPQHOST function 1)
// Top bit of flags enables monitoring
int APIENTRY SetAppl(int stream, int flags, int mask);
int APIENTRY GetApplMask(int Stream);
int APIENTRY GetApplFlags(int Stream);
BOOL APIENTRY GetAllocationState(int Stream);
// Get current Session State. Any state changed is ACK'ed
// automatically. See BPQHOST functions 4 and 5.
int APIENTRY SessionState(int stream, int * state, int * change);
// Get current Session State. Dont Ack state change
// See BPQHOST function 4.
int APIENTRY SessionStateNoAck(int stream, int * state);
// Send message to stream (BPQHOST Function 2)
int APIENTRY SendMsg(int stream, char * msg, int len);
// Send Raw (KISS mode) frame to port (BPQHOST function 10)
int APIENTRY SendRaw(int port, char * msg, int len);
// Get message from stream. Returns length, and count of frames
// still waiting to be collected. (BPQHOST function 3)
int APIENTRY GetMsg(int stream, char * msg, int * len, int * count );
// Perl Version - I couldn't get bpq32.pm to call GetMsg. Returns Lenth
int APIENTRY GetMsgPerl(int stream, char * msg);
// Get Raw (Trace) data (BPQHOST function 11)
int APIENTRY GetRaw(int stream, char * msg, int * len, int * count );
// This is not an API function. It is a utility to decode a received
// monitor frame into ascii text.
int APIENTRY DecodeFrame(char * msg, char * buffer, int Stamp);
// Sets the tracing options for DecodeFrame. Mask is a bit
// mask of ports to monitor (ie 101 binary will monitor ports
// 1 and 3). MTX enables monitoring on transmitted frames. MCOM
// enables monitoring of protocol control frames (eg SABM, UA, RR),
// as well as info frames.
int APIENTRY SetTraceOptions(long mask, int mtxparam, int mcomparam);
int APIENTRY SetTraceOptionsEx(long mask, int mtxparam, int mcomparam, int monUIOnly);
// Returns number of first unused BPQHOST stream. If none available,
// returns 255. See API function 13.
int APIENTRY FindFreeStream();
// Allocate stream. If stream is already allocated, return nonzero.
// Otherwise allocate stream, and return zero
int APIENTRY AllocateStream(int stream);
// Release stream.
int APIENTRY DeallocateStream(int stream);
// Get number of ports configured
int APIENTRY GetNumberofPorts();
// Get port number (ports aren't necessarily numbered 1 to n)
int APIENTRY GetPortNumber(int portslot);
UCHAR * APIENTRY GetPortDescription(int portslot, char * Desc);
// Enable async operation - new to Win32 version of API
int APIENTRY BPQSetHandle(int Stream, HWND hWnd);
int ConvFromAX25(unsigned char * incall, unsigned char * outcall);
BOOL ConvToAX25(unsigned char * callsign, unsigned char * ax25call);
char * APIENTRY GetNodeCall();
int APIENTRY ChangeSessionCallsign(int Stream, unsigned char * AXCall);
int APIENTRY ChangeSessionPaclen(int Stream, int Paclen);
int APIENTRY GetApplNum(int Stream);
char * APIENTRY GetApplCall(int Appl);
char * APIENTRY GetApplAlias(int Appl);
long APIENTRY GetApplQual(int Appl);
char * APIENTRY GetApplNabe(int Appl);
BOOL APIENTRY SetApplCall(int Appl, char * NewCall);
BOOL APIENTRY SetApplAlias(int Appl, char * NewCall);
BOOL APIENTRY SetApplQual(int Appl, int NewQual);
// Routines to support "Minimize to Tray"
BOOL APIENTRY GetMinimizetoTrayFlag();
int APIENTRY AddTrayMenuItem(HWND hWnd, char * Label);
int APIENTRY DeleteTrayMenuItem(HWND hWnd);
BOOL APIENTRY StartMinimizedFlag();
// Log a message to the bpq32 console.
int APIENTRY WritetoConsole(char * buff);
// CheckTimer should be called regularly to ensure BPQ32 detects if an application crashes
int APIENTRY CheckTimer();
// CloseBPQ32 is used if you want to close and restart BPQ32 while your application is
// running. This is only relevant of you have Dynamically linked BPQ32
int APIENTRY CloseBPQ32();
int APIENTRY GETBPQAPI();
UINT APIENTRY GETMONDECODE();
VOID APIENTRY RelBuff(VOID * Msg);
//VOID *APIENTRY GetBuff();
VOID APIENTRY CreateOneTimePassword(char * Password, char * KeyPhrase, int TimeOffset);
BOOL APIENTRY CheckOneTimePassword(char * Password, char * KeyPhrase);
VOID APIENTRY md5 (char *arg, unsigned char * checksum);
int APIENTRY SetupTrayIcon();
BOOL APIENTRY SaveReg(char * KeyIn, HANDLE hFile);
VOID APIENTRY SendChatReport(UINT_PTR ChatReportSocket, char * buff, int txlen);
int APIENTRY CountFramesQueuedOnStream(int Stream);
#else
struct PORTCONTROL * (FAR WINAPI * GetPortTableEntryFromPortNum) (int portnum);
struct PORTCONTROL * (FAR WINAPI * GetPortTableEntryFromSlot) (int portslot);
// API Definitions for Dynamic Load of BPQ32.dll
ULONG (FAR WINAPI * GETBPQAPI)();
ULONG (FAR WINAPI * GETMONDECODE)();
UCHAR * (FAR WINAPI * GetBPQDirectory)();
UCHAR * (FAR WINAPI * GetProgramDirectory)();
UCHAR * (FAR WINAPI * GetRegistryKeyText)();
HKEY (FAR WINAPI * GetRegistryKey)();
UCHAR * (FAR WINAPI * GetSignOnMsg)();
UCHAR * (FAR WINAPI * GetVersionString)();
// Returns number of free buffers
// (BPQHOST function 7 (part)).
int (FAR WINAPI * GetFreeBuffs)();
// Returns count of packets waiting on stream
// (BPQHOST function 7 (part)).
int (FAR WINAPI * RXCount) (int Stream);
// Returns number of packets on TX queue for stream
// (BPQHOST function 7 (part)).
int (FAR WINAPI * TXCount)(int Stream);
// Returns number of monitor frames available
// (BPQHOST function 7 (part)).
int (FAR WINAPI * MONCount) (int Stream);
// Returns call connecten on stream (BPQHOST function 8 (part)).
int (FAR WINAPI * GetCallsign)(int stream, char * callsign);
// Returns connection info for stream (BPQHOST function 8).
int (FAR WINAPI * GetConnectionInfo) (int stream, char * callsign,
int * port, int * sesstype, int * paclen,
int * maxframe, int * l4window);
int (FAR WINAPI * GetStreamPID) (int Stream);
// Returns Path of BPQDirectroy
UCHAR * (FAR WINAPI * GetBPQDirectory)();
// Returns number of prcess attached to BPQ32
int (FAR WINAPI * GetAttachedProcesses) ();
// Send Session Control command (BPQHOST function 6)
// Command = 0 Connect using APPL MASK IN param
// Command = 1 Connect
// Command = 2 Disconect
// Command = 3 Return to Node
int (FAR WINAPI * SessionControl) (int stream, int command, int param);
// Sets Application Flags and Mask for stream. (BPQHOST function 1)
// Top bit of flags enables monitoring
int (FAR WINAPI * SetAppl) (int stream, int flags, int mask);
int (FAR WINAPI * GetApplMask) (int Stream);
int (FAR WINAPI * GetApplFlags)(int Stream);
BOOL (FAR WINAPI * GetAllocationState) (int Stream);
// Get current Session State. Any state changed is ACK'ed
// automatically. See BPQHOST functions 4 and 5.
int (FAR WINAPI * SessionState) (int stream, int * state, int * change);
// Get current Session State. Dont Ack state change
// See BPQHOST function 4.
int (FAR WINAPI * SessionStateNoAck) (int stream, int * state);
// Send message to stream (BPQHOST Function 2)
int (FAR WINAPI * SendMsg) (int stream, char * msg, int len);
// Send Raw (KISS mode) frame to port (BPQHOST function 10)
int (FAR WINAPI * SendRaw) (int port, char * msg, int len);
// Get message from stream. Returns length, and count of frames
// still waiting to be collected. (BPQHOST function 3)
int (FAR WINAPI * GetMsg) (int stream, char * msg, int * len, int * count );
// Perl Version - I couldn't get bpq32.pm to call GetMsg. Returns Lenth
int (FAR WINAPI * GetMsgPerl) (int stream, char * msg);
// Get Raw (Trace) data (BPQHOST function 11)
int (FAR WINAPI * GetRaw) (int stream, char * msg, int * len, int * count );
// This is not an API function. It is a utility to decode a received
// monitor frame into ascii text.
int (FAR WINAPI * DecodeFrame) (char * msg, char * buffer, int Stamp);
// Sets the tracing options for DecodeFrame. Mask is a bit
// mask of ports to monitor (ie 101 binary will monitor ports
// 1 and 3). MTX enables monitoring on transmitted frames. MCOM
// enables monitoring of protocol control frames (eg SABM, UA, RR),
// as well as info frames.
int (FAR WINAPI * SetTraceOptions) (long mask, int mtxparam, int mcomparam);
// Returns number of first unused BPQHOST stream. If none available,
// returns 255. See API function 13.
int (FAR WINAPI * FindFreeStream) ();
// Allocate stream. If stream is already allocated, return nonzero.
// Otherwise allocate stream, and return zero
int (FAR WINAPI * AllocateStream) (int stream);
// Release stream.
int (FAR WINAPI * DeallocateStream) (int stream);
// Get number of ports configured
int (FAR WINAPI * GetNumberofPorts) ();
// Get port number (ports aren't necessarily numbered 1 to n)
int (FAR WINAPI * GetPortNumber) (int portslot);
// Enable async operation - new to Win32 version of API
int (FAR WINAPI * BPQSetHandle) (int Stream, HWND hWnd);
int (FAR * ConvFromAX25) (unsigned char * incall, unsigned char * outcall);
BOOL (FAR * ConvToAX25) (unsigned char * callsign, unsigned char * ax25call);
char * (FAR WINAPI * GetNodeCall) ();
int (FAR WINAPI * ChangeSessionCallsign) (int Stream, unsigned char * AXCall);
int (FAR WINAPI * GetApplNum) (int Stream);
char * (FAR WINAPI * GetApplCall) (int Appl);
char * (FAR WINAPI * GetApplAlias) (int Appl);
char * (FAR WINAPI * GetApplName) (int Appl);
long (FAR WINAPI * GetApplQual) (int Appl);
BOOL (FAR WINAPI * SetApplCall) (int Appl, char * NewCall);
BOOL (FAR WINAPI * SetApplAlias) (int Appl, char * NewCall);
BOOL (FAR WINAPI * SetApplQual) (int Appl, int NewQual);
// Routines to support "Minimize to Tray"
BOOL (FAR WINAPI * GetMinimizetoTrayFlag)();
//int APIENTRY AddTrayMenuItem();
int (FAR WINAPI * AddTrayMenuItem)(HWND hWnd, char * Label);
//int APIENTRY DeleteTrayMenuItem();
int (FAR WINAPI * DeleteTrayMenuItem)(HWND hWnd);
int (FAR WINAPI * SetupTrayIcon)();
BOOL (FAR WINAPI * GetStartMinimizedFlag)();
// Log a message to the bpq32 console.
//int APIENTRY WritetoConsole();
int (FAR WINAPI * WritetoConsole)(char * buff);
int (FAR WINAPI * CheckTimer)();
int (FAR WINAPI * CloseBPQ32)();
HMODULE ExtDriver;
BOOL GetAPI()
{
// This procedure must be called if you are using Dynamic Linking. It loads BPQ32
// if necessary, and get the addresses of the API routines
int err;
char Msg[256];
#ifdef EXTDLL
ExtDriver=GetModuleHandle("bpq32.dll");
#else
ExtDriver=LoadLibrary("bpq32.dll");
#endif
if (ExtDriver == NULL)
{
err=GetLastError();
wsprintf(Msg,"Error loading bpq32.dll - Error code %d",err);
MessageBox(NULL,Msg,"BPQDEMO",MB_ICONSTOP);
return(FALSE);
}
GetPortTableEntryFromPortNum = (struct PORTCONTROL * (__stdcall *)(int PortSlot))GetProcAddress(ExtDriver,"_GetPortTableEntryFromPortNum@4");
GetPortTableEntryFromSlot = (struct PORTCONTROL * (__stdcall *)(int PortSlot))GetProcAddress(ExtDriver,"_GetPortTableEntryFromSlot@4");
GETBPQAPI = (ULONG(__stdcall *)())GetProcAddress(ExtDriver,"_GETBPQAPI@0");
GETMONDECODE = (ULONG(__stdcall *)())GetProcAddress(ExtDriver,"_GETMONDECODE@0");
GetFreeBuffs = (int (__stdcall *)(int stream))GetProcAddress(ExtDriver,"_GetFreeBuffs@0");
TXCount = (int (__stdcall *)(int stream))GetProcAddress(ExtDriver,"_RXCount@4");
RXCount = (int (__stdcall *)(int stream))GetProcAddress(ExtDriver,"_RXCount@4");
MONCount = (int (__stdcall *)(int stream))GetProcAddress(ExtDriver,"_MONCount@4");
GetCallsign = (int (__stdcall *)(int stream, char * callsign))GetProcAddress(ExtDriver,"_GetCallsign@8");
GetBPQDirectory = (UCHAR *(__stdcall *)())GetProcAddress(ExtDriver,"_GetBPQDirectory@0");
GetProgramDirectory = (UCHAR *(__stdcall *)())GetProcAddress(ExtDriver,"_GetProgramDirectory@0");
GetRegistryKey = (HKEY(__stdcall *)())GetProcAddress(ExtDriver,"_GetRegistryKey@0");
GetRegistryKeyText = (UCHAR *(__stdcall *)())GetProcAddress(ExtDriver,"_GetRegistryKeyText@0");
GetSignOnMsg = (UCHAR *(__stdcall *)())GetProcAddress(ExtDriver,"_GetSignOnMsg@0");
GetVersionString = (UCHAR *(__stdcall *)())GetProcAddress(ExtDriver,"_GetVersionString@0");
GetConnectionInfo = (int (__stdcall *)(int, char *,int *, int *, int *,int *, int *))GetProcAddress(ExtDriver,"_GetConnectionInfo@28");
GetStreamPID = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_GetStreamPID@4");
GetAttachedProcesses = (int (__stdcall *)())GetProcAddress(ExtDriver,"_GetAttachedProcesses@0");
SessionControl = (int (__stdcall *)(int stream, int command, int param))GetProcAddress(ExtDriver,"_SessionControl@12");
SetAppl = (int (__stdcall *)(int stream, int flags, int mask))GetProcAddress(ExtDriver,"_SetAppl@12");
GetApplMask = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_GetApplMask@4");
GetApplFlags = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_GetApplFlags@4");
GetAllocationState = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_GetAllocationState@4");
SessionState = (int (__stdcall *)(int, int *, int *))GetProcAddress(ExtDriver,"_SessionState@12");
SessionStateNoAck = (int (__stdcall *)(int, int *))GetProcAddress(ExtDriver,"_SessionStateNoAck@8");
SendMsg = (int (__stdcall *)(int stream, char * msg, int len))GetProcAddress(ExtDriver,"_SendMsg@12");
SendRaw = (int (__stdcall *)(int port, char * msg, int len))GetProcAddress(ExtDriver,"_SendRaw@12");
GetMsg = (int (__stdcall *)(int stream, char * msg, int * len, int * count ))GetProcAddress(ExtDriver,"_GetMsg@16");
GetMsgPerl = (int (__stdcall *)(int stream, char * msg))GetProcAddress(ExtDriver,"_GetMsgPerl@8");
GetRaw = (int (__stdcall *)(int stream, char * msg, int * len, int * count))GetProcAddress(ExtDriver,"_GetRaw@16");
DecodeFrame = (int (__stdcall *)(char * msg, char * buffer, int Stamp))GetProcAddress(ExtDriver,"_DecodeFrame@12");
SetTraceOptions = (int (__stdcall *)(long mask, int mtxparam, int mcomparam))GetProcAddress(ExtDriver,"_SetTraceOptions@12");
FindFreeStream = (int (__stdcall *)())GetProcAddress(ExtDriver,"_FindFreeStream@0");
AllocateStream= (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_AllocateStream@4");
DeallocateStream = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_DeallocateStream@4");
GetNumberofPorts = (int (__stdcall *)())GetProcAddress(ExtDriver,"_GetNumberofPorts@0");
GetPortNumber = (int (__stdcall *)(int))GetProcAddress(ExtDriver,"_GetPortNumber@4");
BPQSetHandle = (int (__stdcall *)(int Stream, HWND hWnd))GetProcAddress(ExtDriver,"_BPQSetHandle@8");
ConvFromAX25 = (int ( *)(unsigned char * incall, unsigned char * outcall))GetProcAddress(ExtDriver,"ConvFromAX25");
ConvToAX25 = (BOOL ( *)(unsigned char * callsign, unsigned char * ax25call))GetProcAddress(ExtDriver,"ConvToAX25");
GetNodeCall = (char * (__stdcall *) ())GetProcAddress(ExtDriver,"_GetNodeCall@0");
ChangeSessionCallsign = (int (__stdcall *) (int Stream, unsigned char * AXCall))GetProcAddress(ExtDriver,"_ChangeSessionCallsign@8");
GetApplNum = (int (__stdcall *)(int Stream))GetProcAddress(ExtDriver,"_GetApplNum@4");
GetApplCall = (char * (__stdcall *) (int Appl))GetProcAddress(ExtDriver,"_GetApplCall@4");
GetApplAlias = (char * (__stdcall *) (int Appl))GetProcAddress(ExtDriver,"_GetApplAlias@4");
GetApplQual = (long (__stdcall *)(int Appl))GetProcAddress(ExtDriver,"_GetApplQual@4");
GetApplName = (char * (__stdcall *) (int Appl))GetProcAddress(ExtDriver,"_GetApplName@4");
SetApplCall = (BOOL (__stdcall *)(int Appl, char * NewCall))GetProcAddress(ExtDriver,"_SetApplCall@8");
SetApplAlias = (BOOL (__stdcall *)(int Appl, char * NewCall))GetProcAddress(ExtDriver,"_SetApplAlias@8");
SetApplQual = (BOOL (__stdcall *)(int Appl, int NewQual))GetProcAddress(ExtDriver,"_SetApplQual@8");
GetMinimizetoTrayFlag = (BOOL (__stdcall *)())GetProcAddress(ExtDriver,"_GetMinimizetoTrayFlag@0");
AddTrayMenuItem = (int (__stdcall *)(HWND hWnd, char * Label))GetProcAddress(ExtDriver,"_AddTrayMenuItem@8");
DeleteTrayMenuItem = (int (__stdcall *)(HWND hWnd))GetProcAddress(ExtDriver,"_DeleteTrayMenuItem@4");
SetupTrayIcon = (BOOL (__stdcall *)())GetProcAddress(ExtDriver,"_SetupTrayIcon@0");
GetStartMinimizedFlag = (BOOL (__stdcall *)())GetProcAddress(ExtDriver,"_GetStartMinimizedFlag@0");
WritetoConsole = (int (__stdcall *)(char *))GetProcAddress(ExtDriver,"_WritetoConsole@4");
CheckTimer = (int (__stdcall *)(char *))GetProcAddress(ExtDriver,"_CheckTimer@0");
CloseBPQ32 = (int (__stdcall *)(char *))GetProcAddress(ExtDriver,"_CloseBPQ32@0");
return TRUE;
}
#endif
//
// Constants and equates for async operation
//
#ifndef BPQWINMSG
#define BPQWINMSG
static char BPQWinMsg[] = "BPQWindowMessage";
UINT BPQMsg;
//
// Values returned in lParam of Windows Message
//
#define BPQMonitorAvail 1
#define BPQDataAvail 2
#define BPQStateChange 4
#endif