Jump to content

Search the Community

Showing results for tags 'wmiservice'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. THI. I have the piece of code show below. when it gets to the line FWMIService := FSWbemLocator.ConnectServer it simply opwns the CPU window and does never get tot except section. Running Delphi 12.1 on win 64bit. (The second piece of code shows how the procedure is called). Any idea anybody? procedure GetWin32_PrintJobInfo; const WbemUser =''; WbemPassword =''; WbemComputer = 'localhost'; wbemFlagForwardOnly = $00000020; var FSWbemLocator : OLEVariant; FWMIService : OLEVariant; FWbemObjectSet: OLEVariant; FWbemObject : OLEVariant; oEnum : IEnumvariant; iValue : LongWord; str:String; begin; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); try FWMIService := FSWbemLocator.ConnectServer('192.168.1.70', 'root\CIMV2', WbemUser, WbemPassword); except on E:EOleException do writeln(e.message); on E:sysutils.Exception do writeln(e.message); end; begin try CoInitialize(nil); try GetWin32_PrintJobInfo; finally CoUninitialize; end; except on E:EOleException do Writeln(Format('EOleException %s %x', [E.Message,E.ErrorCode])); on E:Exception do Writeln(E.Classname, ':', E.Message); end;
×