Le réseau pour les développeurs > Forums - Accueil > Visual Basic General > ATL COMC++ VB deplyoment error System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory..due to the following error: 80040154.
Poser une questionPoser une question
 

TraitéeATL COMC++ VB deplyoment error System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory..due to the following error: 80040154.

  • jeudi 2 juillet 2009 23:02giacomo76 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hi,
    I 've build a com  unmaneged c++ using atl. I used it in excel and all is fine.

    I created an application in vbnet ,, and added the com dll as reference to the project.

    THe project works fine both in debug and release mode.

    Today I have added to a setup project  and added the primary output of the vbnet application.

    If I install the app in other machines the application start, and works but when there is a call to the com dll function
    I receive the error
    system.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory..due to the following error: 80040154.

    How can I distribute the app?
    ( i tried to reg dll, adding the tlb file... and so on) . The projects are x32

    VS2008 framework 3.5 all machines xp sp3  32bit.

    I am a newbye and I should resolve this problem  by the next week!


    thanks in advance
    g.
    giacomo

Réponses

  • mercredi 8 juillet 2009 07:28Riquel_DongModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Hi Giacomo,

    Did you install that C++ COM component in target computer? You need to install that COM component and register that COM component in target computer.

    Or you can use Registration-Free COM to deploy your application without registering COM component in target computer. Registration-free COM interop activates a component without using the Windows registry to store assembly information. Instead of registering a component on a computer during deployment, you create Win32-style manifest files at design time that contain information about binding and activation. These manifest files, rather than registry keys, direct the activation of an object.http://msdn.microsoft.com/en-us/library/fh1h056h(VS.80).aspx

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • lundi 10 août 2009 05:58giacomo76 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Installed VC redistributable 2008 on the target machine... now all is working1

    giacomo

Toutes les réponses

  • lundi 6 juillet 2009 08:16YiChun ChenMSFT, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Hi Giacomo76,

    I am moving this thread from Base ".Net Framework Setup" forum to the "Visual Basic General" forum, since the issue is related to VB programming. There are more VB experts in the "Visual Basic General" forum.

    Thanks
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • mercredi 8 juillet 2009 07:28Riquel_DongModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Hi Giacomo,

    Did you install that C++ COM component in target computer? You need to install that COM component and register that COM component in target computer.

    Or you can use Registration-Free COM to deploy your application without registering COM component in target computer. Registration-free COM interop activates a component without using the Windows registry to store assembly information. Instead of registering a component on a computer during deployment, you create Win32-style manifest files at design time that contain information about binding and activation. These manifest files, rather than registry keys, direct the activation of an object.http://msdn.microsoft.com/en-us/library/fh1h056h(VS.80).aspx

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • lundi 10 août 2009 05:58giacomo76 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    Installed VC redistributable 2008 on the target machine... now all is working1

    giacomo