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. COM
  4. Class not registered

Class not registered

Scheduled Pinned Locked Moved COM
helpcomsysadmin
3 Posts 3 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.
  • S Offline
    S Offline
    subhabasu
    wrote on last edited by
    #1

    Hi all, I am trying to instantiate a COM object of class GPM (gpmgmt.h and gpmgmt.dll) using CoCretateInstance. It returns "0x80040154 Class not registerd" error. The code snippet is - ::CoCreateInstance( __uuidof(GPM), // CLSID_GPM NULL, CLSCTX_LOCAL_SERVER, __uuidof(IGPM), // IID_IGPM (void **)&m_IGPMObj); , where m_IGPMObj is a IGPM pointer. I am building my code with VS2005 in XP Professional SP2. The required header file and idl file are present in my machine, but not the dll (I dont know why). MSDN suggests that the dll is available in vista and 2008 server and redistributable for 2003 server and XP SP1. I have searched the dll in 2008 server and vista, it is not there also. I also tried to install GPMC in a XP SP3 machine, it simply fails saying that - LoadLibray fails. Any help is appriciated.

    S M 2 Replies Last reply
    0
    • S subhabasu

      Hi all, I am trying to instantiate a COM object of class GPM (gpmgmt.h and gpmgmt.dll) using CoCretateInstance. It returns "0x80040154 Class not registerd" error. The code snippet is - ::CoCreateInstance( __uuidof(GPM), // CLSID_GPM NULL, CLSCTX_LOCAL_SERVER, __uuidof(IGPM), // IID_IGPM (void **)&m_IGPMObj); , where m_IGPMObj is a IGPM pointer. I am building my code with VS2005 in XP Professional SP2. The required header file and idl file are present in my machine, but not the dll (I dont know why). MSDN suggests that the dll is available in vista and 2008 server and redistributable for 2003 server and XP SP1. I have searched the dll in 2008 server and vista, it is not there also. I also tried to install GPMC in a XP SP3 machine, it simply fails saying that - LoadLibray fails. Any help is appriciated.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      If the DLL's not present then no, the class won't be registered. Big surprise. So, your problem boils down to 'why can't you install GPMC'? You could use Dependency Walker[^] (specifically its 'Profile' feature) to see what LoadLibrary call is failing - open msiexec with Dependency walker, then in the Profile options, set the gpmc MSI file as a command line argument and run it.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      1 Reply Last reply
      0
      • S subhabasu

        Hi all, I am trying to instantiate a COM object of class GPM (gpmgmt.h and gpmgmt.dll) using CoCretateInstance. It returns "0x80040154 Class not registerd" error. The code snippet is - ::CoCreateInstance( __uuidof(GPM), // CLSID_GPM NULL, CLSCTX_LOCAL_SERVER, __uuidof(IGPM), // IID_IGPM (void **)&m_IGPMObj); , where m_IGPMObj is a IGPM pointer. I am building my code with VS2005 in XP Professional SP2. The required header file and idl file are present in my machine, but not the dll (I dont know why). MSDN suggests that the dll is available in vista and 2008 server and redistributable for 2003 server and XP SP1. I have searched the dll in 2008 server and vista, it is not there also. I also tried to install GPMC in a XP SP3 machine, it simply fails saying that - LoadLibray fails. Any help is appriciated.

        M Offline
        M Offline
        Md Marufuzzaman
        wrote on last edited by
        #3

        Hi, Try the following.... Go to the .Net command prompt & enter the command below: RegAsm api_name.dll /tlb:api_Name.tlb /codebase Note: It will register into GAC & export a tlb file. Thanks

        Md. Marufuzzaman

        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