Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. RSOP Collection Com/WMI errer

RSOP Collection Com/WMI errer

Scheduled Pinned Locked Moved C#
helpcomtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Planker
    wrote on last edited by
    #1

    using
    GPMGMTLib;

    GPM myGPM = null
    ;
    GPMConstants gpmc = null
    ;
    GPMRSOP myRSOP = null
    ;
    myGPM = new
    GPMClass();
    gpmc = (GPMConstants)myGPM.GetConstants();
    myRSOP = myGPM.GetRSOP(gpmc.RSOPModeLogging, ""
    , 0);
    myRSOP.LoggingComputer = computername;
    myRSOP.LoggingFlags = gpmc.RsopLoggingNoUser;
    myRSOP.CreateQueryResults();
    myRSOP.GenerateReportToFile(GPMReportType.repXML, outputfilename);

    the above code gives the following error System.Runtime.InteropServices.COMException was unhandled by user code Message="Exception from HRESULT: 0x80041003" Source="Interop.GPMGMTLib" ErrorCode=-2147217405 this is my first time programing with COM objects and not really sure how to fix this error, I see that could be a permission issue, I gave myself Domain admin rights and I still can not run the code on the local machine.

    R 1 Reply Last reply
    0
    • P Planker

      using
      GPMGMTLib;

      GPM myGPM = null
      ;
      GPMConstants gpmc = null
      ;
      GPMRSOP myRSOP = null
      ;
      myGPM = new
      GPMClass();
      gpmc = (GPMConstants)myGPM.GetConstants();
      myRSOP = myGPM.GetRSOP(gpmc.RSOPModeLogging, ""
      , 0);
      myRSOP.LoggingComputer = computername;
      myRSOP.LoggingFlags = gpmc.RsopLoggingNoUser;
      myRSOP.CreateQueryResults();
      myRSOP.GenerateReportToFile(GPMReportType.repXML, outputfilename);

      the above code gives the following error System.Runtime.InteropServices.COMException was unhandled by user code Message="Exception from HRESULT: 0x80041003" Source="Interop.GPMGMTLib" ErrorCode=-2147217405 this is my first time programing with COM objects and not really sure how to fix this error, I see that could be a permission issue, I gave myself Domain admin rights and I still can not run the code on the local machine.

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Could be a rights issue.  Does this[^] thread help? /ravi

      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups