Share via


Writing A Readlog Extension To View Custom Events (Windows CE 5.0)

Send Feedback

To have the Readlog Viewing Tool read custom events, and print the data in the way you want, you can create a Readlog extension. If you prefer, you can modify sample code for a Readlog plug-in to create the extension DLL for Readlog.exe.

To create a Readlog extension DLL to parse your data into a string

  1. Open a command-line window on your development workstation, and type

    set _WINCEROOT=<your root Windows CE directory>
    %_WINCEROOT%\public\common\oak\misc\wince.bat NT cebase DESKTOP
    

    This creates a desktop build window.

  2. Navigate to %_WINCEROOT%\PUBLIC\COMMON\SDK\SAMPLES\CELOG. Locate the sample plug-in in the READERPLUGIN\DEMO subdirectory. Use this sample as a model to create your own readlog plug-in.

  3. To return the whole list of events from the GetEvents function, set NUM_EVENTS and then fill the buffer with your list.

  4. Add a case for each event to the GetEventString function.

    This function takes the buffer of your data and fills a string with your user-readable interpretation of the data.

  5. For each case you created in step 4, copy the clauses in the sample that read from pInBuf and write to szMsg.

    The sample code sets szMsg to MAX_PATH, but this value can be enlarged to suit your requirements.

  6. Set dwMsgLen to the length, in characters, of the string output message*.*

  7. When you are done implementing your plug-in, at a command-line window, type

    build
    

After you make these changes to the sample plug-in, the rest of the sample code handles any other standard requirements.

The Readlog executable noted in step 2 builds to a file named cplgdemo.dll in %_WINCEROOT%\release\DESKTOP\NT\. If you build a custom extension, the extension is also stored in %_WINCEROOT%\release\DESKTOP\NT\.

To use the extension you created, you must add it to the registry of your development workstation. For information about configuring Readlog to use the output from your extension, see Viewing Output from a Readlog Extension.

See Also

CeLog Event Tracking Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.