ZenWINX Logo ZenWINX

Architecture - Reference Manual - Guides

Debug

Functions

int __stdcall winx_debug_print (char *string)
 Delivers a message to the DbgView program.
void winx_init_synch_objects (void)
 Initializes the synchronization objects used in the debugging routines.
void winx_destroy_synch_objects (void)
 Destroys the synchronization objects used in the debugging routines.
void __cdecl winx_dbg_print (char *format,...)
 DbgPrint() native equivalent.
char *__stdcall winx_get_error_description (unsigned long status)
 Retrieves a human readable explaination of the NT status code.
void __cdecl winx_dbg_print_ex (unsigned long status, char *format,...)
 Delivers an error message to the DbgView program.

Function Documentation

int __stdcall winx_debug_print ( char *  string  ) 

Delivers a message to the DbgView program.

Parameters:
[in] string the string to be delivered.
Returns:
Zero for success, negative value otherwise.
Note:
Internal use only.

Definition at line 116 of file dbg.c.

Referenced by winx_dbg_print().

void winx_init_synch_objects ( void   ) 

Initializes the synchronization objects used in the debugging routines.

Note:
Internal use only.

Definition at line 46 of file dbg.c.

References winx_create_event().

Referenced by zenwinx_native_init().

void winx_destroy_synch_objects ( void   ) 

Destroys the synchronization objects used in the debugging routines.

Note:
Internal use only.

Definition at line 70 of file dbg.c.

References winx_destroy_event().

Referenced by zenwinx_native_unload().

void __cdecl winx_dbg_print ( char *  format,
  ... 
)

DbgPrint() native equivalent.

Note:
DbgPrint() exported by ntdll library cannot be captured by DbgPrint loggers, therefore we are using our own routine for debugging purposes.

Definition at line 81 of file dbg.c.

References winx_debug_print(), winx_virtual_alloc(), and winx_virtual_free().

char* __stdcall winx_get_error_description ( unsigned long  status  ) 

Retrieves a human readable explaination of the NT status code.

Parameters:
[in] status the NT status code.
Returns:
A pointer to string containing the status explaination.
Note:
This function returns explainations only for well known codes. Otherwise it returns an empty string.
Example:
 printf("%s\n",winx_get_error_description(STATUS_ACCESS_VIOLATION));
 // prints "Access violation".

Definition at line 266 of file dbg.c.

Referenced by kb_open_internal(), kb_read_internal(), and winx_dbg_print_ex().

void __cdecl winx_dbg_print_ex ( unsigned long  status,
char *  format,
  ... 
)

Delivers an error message to the DbgView program.

The error message includes NT status and its explaination.

Parameters:
[in] status the NT status code.
[in] format the format string.
[in] ... the parameters.
Example:
 NTSTATUS Status = NtCreateFile(...);
 if(!NT_SUCCESS(Status)){
     winx_dbg_print_ex(Status,"Cannot create %s file",filename);
 }

Definition at line 293 of file dbg.c.

References winx_get_error_description(), winx_heap_alloc(), and winx_heap_free().


Generated on Sat May 29 23:06:45 2010 for ZenWINX by doxygen 1.6.2