DBM_PORT module routines - WIN32

Company Information Software Products TDF Market Reports Download Area take me Home

dbm_port.c - DeBug Message PORT routines

These routines allow a Windows app to send debug messages out transparently to its own operation. The messages are LAN broadcasted via UDP. The code supports four classes of debug messages and it is runtime configurable. If the debug level == 0 then the routines will do nothing but just return so this code can be left in final product code and activated on the customer box for tech support problem calls.

Warning about db_printf - it uses wvsprintf() which does not support floats & doubles. So if you need to output a floating point number you must first use sprintf to write it to a char buffer then you can dump the str from db_printf (sorry - but don't blame me - blame Bill and the boys).

Function init_debug_port_subsystem
Include file DBM_PORT.H
Prototype void init_debug_port_subsystem( int debug_flag , int debug_port_num )
Remarks Init the subsystem default values that will be used for the automatic port open.

Function free_debug_port
Include file DBM_PORT.H
Prototype void free_debug_port( void )
Remarks Force the debugg port closed and reset the global subsystem vars.

Function open_debug_port
Include file DBM_PORT.H
Prototype void open_debug_port( void )
Remarks Allocate and open a udp port to write the debug output to.

Function db_printf
Include file DBM_PORT.H
Prototype void db_printf( int req_debug_level , const char *szFormat , ... )
Remarks db_printf is a printf that outputs to a udp port if the requested debug level is set in the current debug_level. It will also handle the opening of the udp port if necessary.

Table of Contents Function Index

generated on 22 September 1998 - 12:54:43
© 1998 Tierra del Fuego Ltd.