none
"Cannot create ActiveX component" / Win8 / VB 2012 RRS feed

  • Question

  • This is not a question but rather a finding of something in case any one else runs across the same problem.

    When using "CreateObject" in VB 2012 of an unmanaged com object on a system that was configured with a fresh install of Win8 / VS 2012, the "Cannot create ActiveX component" error will be encountered when the targeted framework is 4.0 or earlier. Targeting 4.5 results in a VSHost32.exe error. Not an issue specific to a single system since it occurs on multiple systems starting with complete clean installs of Win8/VS2012 (issue may or may not apply to VS 2010 on Win8 - didn't bother testing that given time involved to repeatedly install everything)

    The above error applies only when running the code in debug mode via the IDE. If the code is compiled and then run, no error occurs and everything works correctly.

    Occurs on both 32 and 64 bit Win8 systems.

    Running the identical code on a Win7 / VS 2012 system - no problems are encountered

    The problem does not occur on a Win8 system which was upgraded from a Win7/VS 2012 (32 or 64 bit) indicating that something is being carried over that is not getting included on a clean Win8 install (which includes any new system using Win8 on which VS 2012 is being installed)

    Just to avoid needless suggestions, there is no question the component was properly registered and project settings were identical in all cases. Method of registration used for the component was both using a setup installer for an app that uses the component as well as Regsvr32 when only registering the component on its own.


    Karl Timmermans - The Claxton Group
    Outlook Import/Export Hints/Tips
    Contact import/export/data management tools for Outlook '2000/2010 - ContactGenie.com

    Thursday, May 2, 2013 7:31 AM

Answers

  • Thanks but only posted this as an information item for an error that shouldn't be raised when invoking the VB "CreateObject" method for a registered class in the VB 2012 IDE on the configuration described.

    Will leave it to a moderator to move this post to whatever forum is deemed more appropriate (or delete it entirely if they so choose). I would tend to agree that this is ultimately an underlying Win8 issue related to a new Win8 system versus a Win8 upgrade but the error is encountered exclusively from within the VB IDE (but NOT when executing compiled code on the same system). This is not an issue any longer for me personally since have the option of using registry free com in this particular case.


    Karl Timmermans - The Claxton Group
    Outlook Import/Export Hints/Tips
    Contact import/export/data management tools for Outlook '2000/2010 - ContactGenie.com

    Thursday, May 2, 2013 11:04 AM

All replies

  • Karl,


    Maybe better to post no needles questions about something which runs on W7 but not on W8 in the VB forum. You cannot affect with VB11 (2012) the OS so the question is not a VB question.

    However, maybe somebody in the forum for which I give you a link bellow can help you with your problem.

    http://social.msdn.microsoft.com/Forums/en-US/clr/threads


    Success
    Cor


    Thursday, May 2, 2013 9:25 AM
  • Thanks but only posted this as an information item for an error that shouldn't be raised when invoking the VB "CreateObject" method for a registered class in the VB 2012 IDE on the configuration described.

    Will leave it to a moderator to move this post to whatever forum is deemed more appropriate (or delete it entirely if they so choose). I would tend to agree that this is ultimately an underlying Win8 issue related to a new Win8 system versus a Win8 upgrade but the error is encountered exclusively from within the VB IDE (but NOT when executing compiled code on the same system). This is not an issue any longer for me personally since have the option of using registry free com in this particular case.


    Karl Timmermans - The Claxton Group
    Outlook Import/Export Hints/Tips
    Contact import/export/data management tools for Outlook '2000/2010 - ContactGenie.com

    Thursday, May 2, 2013 11:04 AM
  • Hi Karl,

    >>This is not an issue any longer for me personally since have the option of using registry free com in this particular case.

    Thanks for sharing your experience.

    And would you like to post this issue on connect site: https://connect.microsoft.com/visualstudio  ?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 3, 2013 5:25 AM
    Moderator