none
"cannot register dll code=-2147024891" RRS feed

  • Question

  • Hi,

    While running a visual studio 2008 SP1 app, I get this error.

    Any ideas? 



    • Edited by Ivgenik Sunday, August 12, 2018 3:47 PM
    • Moved by Baron Bi Thursday, August 23, 2018 7:06 AM Not about c++ development
    Sunday, August 12, 2018 3:46 PM

All replies

  • Hi,

    While running a visual studio 2008 SP1 app, I get this error.

    Any ideas? 



    We're not clairvoyant.  You should provide more information about your dll and how you are trying to register it.

    The -2147024891 (0x8007005)  error means "Access denied."  Are you trying to register a COM dll in HKLM but are not running as an Administrator?

    Sunday, August 12, 2018 4:12 PM
  • Hi,

    The visual studio 2008 app works well on another computer with O.S (win7). 

    The app tries to register <g class="gr_ gr_26 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="26" id="26">dlls</g> which are located at project dir. c:/project/target/bin .

    I am the administrator on this PC. I have shared the project dir to everyone for <g class="gr_ gr_43 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="43" id="43">read</g> and write. 



    • Edited by Ivgenik Tuesday, August 14, 2018 11:34 AM
    Tuesday, August 14, 2018 11:32 AM
  • Hi,

    The visual studio 2008 app works well on another computer with O.S (win7). 

    The app tries to register <g class="gr_ gr_26 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="26" id="26">dlls</g> which are located at project dir. c:/project/target/bin .

    I am the administrator on this PC. I have shared the project dir to everyone for <g class="gr_ gr_43 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="43" id="43">read</g> and write. 



    Are you attempting to register from an elevated command prompt?  Just being a member of the Administrator's group is not sufficient since when UAC is enabled.

    Show the code that you are using.

    Tuesday, August 14, 2018 12:49 PM
  • 1. how to register from an elevated command prompt? "regsvr32.exe /c:/*.dll" ? 

    The code activates a <g class="gr_ gr_79 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="79" id="79">gui</g> (EchoPac). On the other computer, all the <g class="gr_ gr_234 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="234" id="234">dll</g> registration was OK.  I will check what I can upload here. 

    Tuesday, August 14, 2018 12:59 PM
  • Well:

    so just because you are administrator, doesn't mean you will automatically have full access to the registry all the time.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Tuesday, August 14, 2018 1:08 PM
  • First thing as other mentioned try to launch your visual studio in admin mode and try it again.  Same for command prompt run the command prompt in admin mode and try using regsvr32 dll name . to register your dll. based on the library whether it is 32 or 64 bit use regsvr32 from corresponding folder /system32 or syswow64 etc. One last thing if you have any existing dll is registered with same clsid , unregistr it by using regsvr32 /u dll name and then try your solution again.

    Thanks


    Rupesh Shukla


    Tuesday, August 14, 2018 1:48 PM