Thread: Deploying an MFC ActiveX component on WinXP Embedded

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    34

    Question Deploying an MFC ActiveX component on WinXP Embedded

    Hi,

    I have written an ActiveX control using MFC and I am having some trouble deploying it on an Industrial PC running Windows XP Embedded. When I run regsvr32 I get the error message "LoadLibrary("Control.ocx") failed. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem". I tried to open the OCX with Dependency Walker and found that two DLL files were missing, mfc90u.dll and msvcr90.dll. Putting those in C:\Windows\system32 made Dependency Walker happy, but I still get the same error message when trying to register the control. I have developed this using VS2008. This is my first time touching both MFC and COM so maybe I have made some beginners mistake. The control works fine on my development computer (not running it in an ActiveX container but actually in the software it is to be used).

    I have monitored the activity happening when trying to register it with both FileMon and RegMon, but for my untrained eye, I can't really spot what's going wrong. Let me know if you want dumps of this.

    Regards,
    Eirik

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    34
    Seems like I have solved the registering problem. The solution was to statically link all dependencies into the control. It may not be the best thing to do, but at least it works.

    Procedure, for anyone interested:
    1. Go to Project -> Properties
    2. Select Configuration -> General
    3. In the box for Use of MFC, select Use MFC in a Static Library


    Regards,
    Eirik

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I dont use embedded windows, but if its like normal windows then the dlls may need to be registered (if they are COM dlls)

    Microsoft Corporation

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best ActiveX Component?
    By WaterNut in forum C Programming
    Replies: 2
    Last Post: 01-29-2006, 09:07 PM
  2. How to Register an ActiveX Component?
    By Davros in forum Windows Programming
    Replies: 2
    Last Post: 05-05-2004, 04:36 PM
  3. Activex component
    By planet_abhi in forum Game Programming
    Replies: 1
    Last Post: 12-16-2003, 04:31 PM
  4. Using an activeX control without MFC
    By knutso in forum Windows Programming
    Replies: 0
    Last Post: 04-28-2003, 03:15 AM
  5. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM

Tags for this Thread