{█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
{█ █}
{█ Virtual Pascal Examples Version 1.10 █}
{█ LISTCLS command line utility. █}
{█ ─────────────────────────────────────────────────█}
{█ Copyright (C) 1995 fPrint UK Ltd █}
{█ █}
{▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
{$I-,D-}
{ Displays a list of all object classes registered with }
{ the Workplace Shell }
Program ListCls;
Uses
Use32, Os2Def, Os2PmApi;
{$PMTYPE VIO}
{$IFDEF VPDEMO}
{&Dynamic VP11Demo.Lib}
{$ENDIF}
Var
p,q : pObjClass;
Size : ULong;
begin
WriteLn('Virtual Pascal ObjClass Demo Version 1.10 Copyright (C) 1996 fPrint UK Ltd');
p := nil;
{ Return number of bytes needed to hold class list }
If WinEnumObjectClasses( p, Size ) then
begin
GetMem( p, Size );
{ Get list of objects }
If WinEnumObjectClasses( p, Size ) then
begin
{ Output list of objects to screen }
Writeln( 'Classes registered with WPS: ');
q := p;
While ( q <> nil ) do
begin
Writeln( q^.pszClassName:20, ' in ', q^.pszModName, '.DLL' );
q := q^.pNext;
end;
Writeln;
end
else
Writeln( 'WinEnumObjectClasses reports failure!' );
FreeMem( p, Size );
end
else
Writeln( 'WinEnumObjectClasses reports failure!' );
end.