Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@Brian , you just use the <a href="http://www.activexperts.com/activmonitor/windowsmanagement/wmi/samples/hw/#Win32_ParallelPort.htm" rel="nofollow noreferrer">Win32_parallelPort</a> class to get the info .</p> <p>check this code.</p> <pre><code>program GetWMI_ParallelPortInfo; {$APPTYPE CONSOLE} uses Windows, Classes, ActiveX, Variants, SysUtils, WbemScripting_TLB in '..\..\Documents\RAD Studio\5.0\Imports\WbemScripting_TLB.pas'; procedure GetWMIParallelPortInfo; var WMIServices : ISWbemServices; WMILocator : ISWbemLocator; Root : ISWbemObjectSet; SWbemObject : ISWbemObject; Item : IEnumVariant; rgVar : OleVariant; pCelFetched : Cardinal; begin WMILocator := CoSWbemLocator.Create(); WMIServices := WMILocator.ConnectServer('.', 'root\cimv2','', '', '', '', 0, nil); // Root := WMIServices.ExecQuery('Select * From Win32_ParallelPort','WQL', 0, nil); Item := (Root._NewEnum) as IEnumVariant; while (Item.Next(1, rgVar, pCelFetched) = S_OK) do begin SWbemObject := IUnknown(rgVar) as ISWBemObject; if (SWbemObject &lt;&gt; nil) then begin SWbemObject.Properties_;//Load the Properties to read Writeln(SWbemObject.GetObjectText_(0));//The GetObjectText_ method of the SWbemObject object returns a textual rendering of the object in MOF format end; end; end; begin try CoInitialize(nil); try GetWMIParallelPortInfo; Readln; finally CoUninitialize; end; except on E:Exception do Begin Writeln(E.Classname, ': ', E.Message); Readln; End; end; end. </code></pre> <p><a href="http://i48.tinypic.com/2e67wxz.png" rel="nofollow noreferrer">alt text http://i48.tinypic.com/2e67wxz.png</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload