Online help (KPrint Message Monitor)
The archive file is compressed in zip format.
Please make a suitable folder, and place all files in the folder you created with the same folder structure.
File organization
kpmmon.exe | "KPrint Message Monitor" Application file. |
---|---|
kprint.dll | A DLL for printing messages from your application to kpmmon.exe. |
kprintf.c | C language source file of API that outputs a message to the application. |
kprintf.h | C language header file of API that outputs a message to the application. |
Please delete each folder where the application exists.
File
Start Saving Log File | |
---|---|
Stop Saving Log File | Suspends saving the debug message file and closes the file. |
Setting | |
Exit | Exit the application. |
Edit
Copy | Copy the selected range and save it to the clipboard. |
---|---|
All Select | Keeps all displayed messages selected. |
All Copy | Copy all the displayed messages and save them to the clipboard. |
All Erase | Clears all displayed messages. |
View
Toolbar | Shows or hides the toolbar. |
---|---|
Status Bar | Shows or hides the status bar. |
Help
Help Topics | Open the online help page. |
---|---|
Choose Language |
Select the display language of the application as "English" or "Japanese". |
About KPrint Message Monitor |
Displays application version information. |
Save the debug message to a file.
(1) | Filename | Specify the file name to save the debug message. |
(2) | [...]Button | Select the file name to save the debug message from the file selection dialog. |
(3) | Save the displayed text as well | The message currently displayed on the screen is also saved in a file. |
Make various settings on the screen that displays debug messages.
Console
Make various settings for the screen that displays the message.
(1) | Vertical scrollbar | The display and non-display of a vertical scrollbar are set. |
(2) | Horizontal scrollbar | The display and non-display of the horizontal scrollbar are set. |
(3) | Show control code by hexadecimal |
When the control code(0x00-0x1F) is displayed, it displays it as a hexadecimal number of two digits in the form of |
(4) | Auto scroll | When displaying a message on the screen, scroll the screen display so that the last received message is always displayed on the screen. |
(5) | Font name,Size | The font name of the font used for the display of the console screen and the height of the character are specified. |
(6) | TAB size | The number of characters of TAB codes(0x09 '\t') included in the data displayed on the console screen is specified. |
(7) | By return |
The number of turn characters of one line is specified. |
(8) | Text buffer | The size of the buffer where the text displayed on the console screen is stored is specified. |
Color
(9) | Normal text | The character color(TEXT) and the background color(BG.) of the text displayed on the console screen are specified. |
(10) | Hexadecimal | When "Show control code by hexadecimal" is effective, the character color and the background color of the control code(0x00 - 0x1F) are specified. |
(11) | Select Text | The character color and the background color of the text under the selection are specified. |
Set the display language of the application.
(1) | Choose Language |
Select the display language of the application from the following languages.
|
This section describes how to display debug messages from an application using "KPrint Message Monitor".
note: The language of your application is assumed to be C / C ++. If you use another language, please modify it by referring to the attached kprintf.c process.
-
DLL preparation
Copy the attachment kprint.dll to the same directory as your application.
note: It can be the directory specified in the environment variable PATH.
-
Add initial processing and termination processing to the application
Loads / unloads the DLL for sending debug messages to the "KPrint Message Monitor".
The sample code is shown below.
int WINAPI WinMain( HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show ) { MSG msg; // Initial processing for using "KPrint Message Monitor". kprint_init(); while( GetMessage( &msg, (HWND)NULL, 0, 0 ) ){ TranslateMessage( &msg ); DispatchMessage( &msg ); } // Termination process for using "KPrint Message Monitor". kprint_exit(); return msg.wParam; }
-
Debug message output from application
Use kprintf () from anywhere in your application to print debug messages to the KPrint Message Monitor.
The format of kprintf () is as follows.
int kprintf( const char *fmt, ... ); 1st argument ... A pointer to a formatted string. (The format is the same as printf ().) The second and subsequent arguments are arbitrary variable arguments. Return value ... The number of bytes in the output message.
The sample code is shown below.
: : kprintf( "debug message = %d\n", i ); : :
-
Compile & link
Compile and link the attachments kprintf.c and kprintf.h with your application.