Regsvr32 error 0x80040200
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Regsvr32 error 0x80040200

  1. #1
    Join Date
    Jan 2000
    Location
    Germany, Berlin
    Posts
    16

    Regsvr32 error 0x80040200

    Hallo
    is there anyone who can help me?
    If I try to register my *.ocx it always failed with the following message:
    DLLRegisterServer in PFBVMEModule.ocx failed. Return code was: 0x80040200
    What's the cause of this message and how can I repair this error?

    thanks in advance
    Monika Hemmschrot



  2. #2
    Join Date
    Mar 2000
    Location
    Bangalore,India
    Posts
    776

    Re: Regsvr32 error 0x80040200

    Hi
    In the error lookup u can find the error for this particular code as
    "Unable to impersonate DCOM client " .
    One problem might be unable to get the CLASSID for the client in ur registry. you can find the details abt this error in MSDN.

    Thanx and regards
    SKP


    I write code for reusability not for rating.

  3. #3
    Join Date
    Nov 1999
    Location
    Dresden / Germoney
    Posts
    1,402

    Re: Regsvr32 error 0x80040200

    Oh, you are very unlucky - This is the first user-defined error code, more detailed:

    ------
    HRESULTs consist of three parts: the "Severity" (the Most significant bit, the 8) indicate it's an error.
    Next is the "Facility", where the error comes from (e.g. Win32, OLE Storage, etc.), in you case it#s FACILITY_ITF, which are "interface-specific codes not defined by MS". More closely, the actual error code (the low 16 bits) 0x0000..0x01FF are reserved for standard codes in FACILITY_ITF, so typically you start with 0x80040200 if you need your own codes...
    ------

    What can you do: If this is not documented, you will have to debug the registration (hope you have sources....): load the ocx' project, set a breakpoint in DllMain and/or DllRegisterServer, specify regsvr32 <my>.ocx as executable for debug session, and step through until the error occurs.

    Alternatively you can provide the registration code on your own (it#s not too complicated, but you need some understanding of DLL's): LoadLibrary to load the DLL, GetProcAddr to get the DllRegisterServer function address, which you can call. Perhaps (but unlikely) the OCX sets the global error object (you can retrieve it using GetErrorInfo, which gives you an IErrorInfo) with additional information.

    ------

    If all this doesn't work, you have to start guessing.. Most common case of a failed registration are missing dependant DLL's; but since it#s a user defined error code, it will probably beexplicitely linked ones (i.e. Loaded with LoadLibrary, like COM components)

    Good luck
    Peter



  4. #4
    Join Date
    Jan 2000
    Location
    Germany, Berlin
    Posts
    16

    Re: Regsvr32 error 0x80040200

    Thanks to all.
    I found the error. I made a mistake during adjustment of the GUID (I permuted two parts of the ID). So at least it was my own stupidity.

    regards
    Monika


  5. #5
    Join Date
    Nov 1999
    Location
    Dresden / Germoney
    Posts
    1,402

    Re: Regsvr32 error 0x80040200

    Hi,
    what version of error lookup do you use? (I got the one of VC6, without service packs...)

    But, by MSDN, this error code should be reserved for itf-specific errors ?!!!

    Peter <puzzled>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)