(SST) ShlWAPI.pas Version 1.08

Developer Reference
(SST)ShlWAPI WhichPlatform Function
Returns information on the level of integeration of the browser into the shell.
Global (i.e. this function can be called/accessed from code in any unit that includes/uses (SST)ShlWAPI.pas).
function WhichPlatform() : UINT;  
Return Values
Returns an usinged, 32-bit integer value that can be tested against one of the following constants:
PLATFORM_UNKNOWN (= 0) The function could not establish if the operating system has an integerated shell.
PLATFORM_IE3 (= 1) Obsolete constant/symbolic name that denotes the installed browser is Internet Explorer 3, implying that this is a pre-integrated shell Windows installation/system.
PLATFORM_BROWSERONLY (= 1) The browser and shell are wholly separate and independent programs/applications, neither incorpoarting the functionality of the other. This symbolic name is synonymous with, and its use should be preferred to that of the PLATFORM_IE3 constant.
PLATFORM_INTEGRATED (= 2) The shell has builtin browser support (i.e. the shell incorporates substantial functionality typically found in browsers).
The function is exported by name as of ShlWAPI.dll version 6.0 under Vista, but according to the declaration and documentation in Ms SDK 6.1 it is available as of ShlWAPI.dll 5.0 under Windows 2000. Unfortunately, neither source provided (any) information on an ordinal by which the function can be accessed in ShlWAPI.dll versions prior to those that were installed with Windows Vista. However, the reference to Win 9x systems in the same article and the purpose of the function make it unlikely that it was/is not supported prior to Windows 2000.
This assumption was confirmed by elementary tests (conducted by SST), based on which, the function appears to be accessible by means of ordinal 276, going back at least to Windows NT 4.0 (with an IE 5.0 update).
The function is presumably a relict of the dispute between Microsoft and EU (European Union) institutions about the market dominance of Microsoft's Internet Explorer in the mid to late 1990s. This dispute ultimately forced Microsoft to implement user friendly functionality (e.g. configuration dialogs, etc.) allowing users to install and use browsers other than Internet Explorer.
For developers other than those who intend to develop an application that targets legacy Windows versions (with and without updates), such as NT 4.0 and 95, the function is unlikely to be of much practical use. Furthermore, it is unlikely to gain (any) significance in the forseeable future, as all successor versions have an integerated shell.
Typical examples for the functionality of the integrated shell are the capability to customize a folder's appearance by means of .htt (i.e. HTML with JavaScript) "config" files under Windows 9x and the Windows Sidebar in Windows Vista and 7.
PROCEDURE TForm4.TestShlWAPIWhichPlatform(Sender : TObject); VAR apiretval : UINT; VAR newinfoline : STRING; BEGIN apiretval := 0; newinfoline := ''; apiretval := WhichPlatform(); newinfoline := 'Function WhichPlatform returned : ' + IntToStr(apiretval); CASE apiretval OF PLATFORM_UNKNOWN : newinfoline := newinfoline + ' (PLATFORM_UNKNOWN)'; PLATFORM_BROWSERONLY : newinfoline := newinfoline + ' (PLATFORM_BROWSERONLY)'; PLATFORM_INTEGRATED : newinfoline := newinfoline + ' (PLATFORM_INTEGRATED)'; END; Memo1.Lines.Add(newinfoline); Memo1.Lines.Add(''); END;
Under Windows Vista (with SP 1 & IE 8) the above code snippet produces the following output:
Function WhichPlatform returned : 2 (PLATFORM_INTEGRATED)
Unit: Declared and imported in (SST)ShlWAPI.pas
Library: (SST)ShlWAPI.dcu/(SST)ShlWAPI.obj
Unicode: Not applicable.
Min. ShlWAPI.dll version according to MS SDK doc.: 5.0
Min. ShlWAPI.dll version based on SST research: 5.0, but possibly 4.72
Min. OS version(s) according to Microsoft SDK doc.: Windows 2000, Windows 2000 Server, Windows Server 2003, Windows XP
Min. OS version(s) according to SST research.: Windows 95/Windows 98/Windows NT 4.0 with IE 5.0 or later.
See Also
Windows APIs: WhichPlatform, IsOs.

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