none
Windows PE UI development

    Question

  • Hi there,


    I'm developing for Windows PE using C++.
    According to "Windows PE Developer’s Guide" UI development is supported:

    "Windows PE uses MFC42.dll, but does not support other versions of MFC. Therefore, applications based on MFC are not supported on Windows PE. Likewise, Windows PE does not support ATL."

    So, I started a new Visual C++>Win32>Win 32 Project, the I compiled and got an EXE.
    When I run that EXE on the WinPE enviroment I get this error:

    "the appllication has failed to start because its side-by-side configuration is incorrect. please see the application event log for mor detail".

    What's the problem? What Am I missing?


    Thank you so much.


    Javier Andrés Cáceres Alvis

    Tuesday, January 19, 2010 2:16 PM

Answers

  • It is a third party library, but be careful. WinPE by nature is minimalist so things that you take for granted in an install of Vista or 7 may not exist. The best thing I can suggest is to just try it out, if it works then fine if it doesn't then you will be stuck using the Win32 API.
    Visit my (not very good) blog at http://c2kblog.blogspot.com/
    Wednesday, January 20, 2010 10:26 PM
  • Hello Javier,

    >But now I have another question, can I use wxWidgets to build C++ GUI's in WinPE?

    Not sure wxWidgets dll use the Msvcrt.dll and other Windows .dll, if it use, you cannot use it on WinPE.

    Regards,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    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.
    Thursday, January 21, 2010 7:14 AM

All replies

  • Well, the simplest thing, you are trying to use a VC2005 or VC2008 application and the VC redist is not installed. The exact same thing which happens on a clean install of any other version of Windows which supports side by side assemblies. If you were using Windows XP, Vista or 7 I would suggest installing the VC redist, but since i'm not sure that would work here then I will give you your three options.
    First use static linking (/MT compiler option)
    Second use private assemblies
    Third, don't rely on the CRT


    Visit my (not very good) blog at http://c2kblog.blogspot.com/
    Tuesday, January 19, 2010 5:07 PM
  • Hello Javier,

    Please try to use the static C/C++ runtime library. Set your project options to link to the static C/C++ runtime libraries, not the .dll version of Msvcrt.dll. As said in the Windows PE Developer’s Guide document

    "Your application can use customized .dll files that you write or license from a third party. Add these .dll files to your application for Windows PE. However, do not use Msvcrt.dll and do not include additional Windows .dll files that are not part of Windows PE."

    Regards,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    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.
    Wednesday, January 20, 2010 8:17 AM
  • Hello Rong, crescens2k,


    I tried by linked statically and it worked thank you both.
    But now I have another question, can I use wxWidgets to build C++ GUI's in WinPE?

    Thank you,


    Javier Andrés Cáceres Alvis
    Wednesday, January 20, 2010 10:10 PM
  • It is a third party library, but be careful. WinPE by nature is minimalist so things that you take for granted in an install of Vista or 7 may not exist. The best thing I can suggest is to just try it out, if it works then fine if it doesn't then you will be stuck using the Win32 API.
    Visit my (not very good) blog at http://c2kblog.blogspot.com/
    Wednesday, January 20, 2010 10:26 PM
  • Hello Javier,

    >But now I have another question, can I use wxWidgets to build C++ GUI's in WinPE?

    Not sure wxWidgets dll use the Msvcrt.dll and other Windows .dll, if it use, you cannot use it on WinPE.

    Regards,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    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.
    Thursday, January 21, 2010 7:14 AM
  • Hey, Thank you guys.

    Javier Andrés Cáceres Alvis
    Thursday, January 21, 2010 2:50 PM
  • Yes you can use wxWidgets in Windows PE and I have seen it work.  

    The main problem people have is that they are using Muti-threaded DLL runtime library instead of multi-threaded.

    If you keep it at multi-threaded DLL you will run into errors like this:

     

    "the appllication has failed to start because its side-by-side configuration is incorrect. please see the application event log for more detail".

     

    Here's how you can get it to work:

    1) Right click on your project(s) (you can do many at once)

    2) Select properties

    3) Go to the C/C++ in the left tree

    4) Go to Code generation in the left tree

    5) On the right in the Runtime Library select Multi-threaded.

    6) Repeat this for all wx libraries and your application libraries and your application.  Note: You can select all wxlibraries at once to apply the setting faster.

     

    Note: Even if you make a normal win32 EXE or console EXE with multi threaded DLL runtime, it will have the same error.


     

    Thursday, May 06, 2010 2:11 PM