WPP extended format specification strings

Discussion in 'Windows Vista Drivers' started by P., Mar 7, 2008.

  1. P.

    P. Guest

    According to this page:
    http://msdn2.microsoft.com/en-us/library/ms797195.aspx

    WPP natively supports "%!IPV6ADDR!"
    And WPP natively supports "!FLAGS!".

    But, the W2K8 DDK has no support for "%!IPV6ADDR!", nor "%!FLAGS!".
    In fact, several other types mentioned on the MSDN page is not supported,
    e.g. "%!time!", and according to the INI file several more types are
    supported that are not listed on MSDN.
    If I modify the INI file to include "!FLAGS!", TraceView is quite happy.
    DEFINE_SIMPLE_TYPE( FLAGS,,, "%!FLAGS!",,); // and %!FLAGS%

    I don't know how to define %!IPV6ADDR!?

    The two INI files, one for UNICODE and one for MBCS, are also incorrect in
    its handling of %s and %S.

    defaultwpp.ini (UNICODE):
    Incorrect: DEFINE_FLAVOR(s, ASTR,,);
    Correct: DEFINE_FLAVOR(s, WSTR,,);

    TCHARUNIwpp.ini (MBCS):
    Incorrect: DEFINE_CPLX_TYPE(ASTR, WPP_LOGWSTR, LPCWSTR,
    ItemWString, "s", s, 0);
    Correct: DEFINE_CPLX_TYPE(ASTR, WPP_LOGASTR, const char*, ItemString,
    "s", s, 0);
    Incorrect: DEFINE_CPLX_TYPE(WSTR, WPP_LOGASTR, const char *,
    ItemString, "s", S, 0);
    Correct: DEFINE_CPLX_TYPE(WSTR, WPP_LOGWSTR, LPCWSTR, ItemWString,
    "s", S, 0);
    Missing: DEFINE_CPLX_TYPE(ANSTR, WPP_LOGPCSTR, PCANSI_STRING,
    ItemPString, "s", aZ, 0, 2);


    Where can I find up to date information on what types are supported by the
    W2K8 DDK tools, and up to date, and accurate, INI files?

    Regards
    P.
     
    P., Mar 7, 2008
    #1
    1. Advertisements

  2. Can you please provide which build environment are you using (X86, X64)?

    for IPV6ADDR:

    Create a local localwpp.ini with:
    DEFINE_CPLX_TYPE(IPV6ADDR,WPP_LOGIPV6, in6_addr *,ItemIPV6Addr,"s", _IPV6_,
    0);
    WPP_FLAGS(-DWPP_LOGIPV6(x) WPP_LOGPAIR( (16), (x)));

    in your sources file in the RUN_WPP line you will need to
    add: -ini:localwpp.ini



    However I do not repro the problem with the FLAGS!".


    It does not repro in the build environment, or in WinDDK 6510 X86.


    Thanks,
    Jose Sua
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties and confers no rights.
     
    Jose Sua [MSFT], Mar 10, 2008
    #2
    1. Advertisements

  3. P.

    P. Guest

    Hi Jose

    I will try the IPv6 entry and report back when I get a chance to test it.

    Build environment is user-mode and kernel-mode and x86 and x64 and UNICODE
    and MBCS.
    Build OS is Vista Ultimate x64 SP1.
    Using Windows Server 2008 DDK, <Version>1.1.6001.000</Version>
    Config in: \bin\wppconfig\rev1
    TraceWPP.exe tools in: \bin\x86

    Regarding FLAGS, neither defaultwpp.ini nor TCHARUNIwpp.ini has FLAGS
    defined.
    The following code will fail to build with tracewpp.exe, but the MSDN
    documentation shays it should work:
    DoTraceLevelMessage(TRACE_LEVEL_VERBOSE, TRACE_FLAG_DEBUG, _T("!FLAGS! :
    %!FLAGS!"));
    If I manually addthe following line to the INI files, then the code compiles
    and works as expected:
    DEFINE_SIMPLE_TYPE( FLAGS,,, "%!FLAGS!",,);

    Please advise on up to date and working as documented WPP config files and
    tools.


    Regards
    P.
     
    P., Mar 11, 2008
    #3
  4. Build environment is user-mode and kernel-mode and x86 and x64 and ?
    I would forget MBCS forever. It is Win9x/Me only. NT OSes are Unicode.
     
    Maxim S. Shatskih, Mar 12, 2008
    #4
  5. P.

    P. Guest

    Maxim

    Compiling type T to char is not about the OS, it is about maintaining
    exisisting code, especially user-mode code.
    Well written code will compile and work equally well in MBCS, UNICODE, x86,
    and x64.
    Reality is some code only works if T is MBCS, and the effort to convert it
    is not justified, yet, WPP should still work.

    Regards
    P.
     
    P., Mar 15, 2008
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.