(SST) ShlWAPI.pas Version 1.08

Developer Reference
(SST)ShlWAPI OutputDebugStringWrapW Function
Induces the debugger (if the application/code is executed while linked to, or run under, a debugger) to write the specified string to the debugger's console or log.
Global (i.e. this function can be called/accessed from code in any unit that includes/uses (SST)ShlWAPI.pas).
procedure OutputDebugStringWrapW(lpOutputString : LPCWSTR);  
lpOutputString [in] Pointer to the zero terminated, Unicode (= wide character) string for the debugger to write to its console or log.
Return Values
This function does not return a value.
This function appears to have been first described (in documents available to the public) in the documentation accompanying Ms SDK version 6.1. However, it is not declared in any of that SDK's header files.
Unlike in the Microsoft SDK's header files (up to and including version 6.1), this function/procedure is declared and imported directly by (SST) ShlWAPI.pas Version 1.08 and can therefore be called without the declaration of a procedural type and acquiring a pointer to the function's entry point.
OutputDebugStringWrapW does not introduce any new paramenters or functionality to the (kernel) OutputDebugStringW function, for which it is, as indicated by its name, merely a wrapper function.
As we did not have systems with shell/IE version 4.0 (i.e. ShlWAPI.dll version 4.71) at our disposal and the Microsoft documentation on the function was/is somewhat ambiguous, it is not entirely clear as of which ShlWAPI.dll version (exactly) the function is exported by ordinal 115. We have therefore decided to specify the earliest version we were able to determine, in the Requirements section, below. This happens to be the version also documented by Microsoft in the documentation accompanying Ms SDK 6.1. However, based on the fact that OutputDebugStringW is supported by Windows 95 and that is mentioned in the Microsoft article on OutputDebugStringWrapW, it is not only conceivable but probable, that the function is also supported in the earliest ShlWAPI.dll version, 4.71 (i.e. as of IE 4.0).
The function is still available under Windows Vista and 7.
PROCEDURE TForm4.TestShlWAPIOutputDebugStringWrapW(Sender : TObject); VAR lastrecerr : INTEGER; VAR dbginfo : WideString; BEGIN lastrecerr := 0; dbginfo := ''; lastrecerr := INTEGER(GetLastError()); dbginfo := 'GetLastError returned ' + IntToStr(lastrecerr); OutputDebugStringWrapW(PWChar(dbginfo)); END;
When run in the Delphi SDK's Integerated Development Environmnet (IDE), the above example will produce an output in the IDE's Event Log window that is comparable to that below, provided the Output Messages check box in the Debugger Event Log Properties dialog is checked.
GetLastError returned 0
Unit: Declared and imported in (SST)ShlWAPI.pas
Library: (SST)ShlWAPI.dcu/(SST)ShlWAPI.obj
Unicode: Implemented as Unicode (OutputDebugStringWrapW) function only.
Min. ShlWAPI.dll version according to MS SDK doc.: 5.0
Min. ShlWAPI.dll version based on SST research: 5.0
Min. OS version(s) according to Microsoft SDK doc.: Windows 2000, Windows XP
Min. OS version(s) according to SST research.: Windows 95/Windows 98/Windows NT 4.0 with IE 5.0
See Also
Windows APIs: OutputDebugStringWrapW, OutputDebugString.

Document/Contents version 1.00
Page/URI last updated on 07.12.2023
Copyright © Stoelzel Software Technologie (SST) 2010 - 2017
Suggestions and comments mail to: