Thursday, 15 May 2014

c# - Why do I get this exception in WinPE 4.0 but not Windows 7/Windows 2012? -


I have a WPF .NET 4.0 application that is still running fine under WinPE 4.0, recently. I added the code shown below, and broke the app when it ran under WinPE 4.0. Note that the app is still running fine under Windows 7 X64 and Windows 2012. [Value Converion (typef (string), typef (boole)]] Folk Class HeadToTimeCenter: Ivalu Connewar {public static header converter instance = new header-type conveyor (); Public Object Convert (Object Value, Type Type Type, Object Parameter, CultureInfo Culture) {if ((Value as String). Contents ("corp.com")) {Uri Yuri = New Uri ("Pack: // Application : ,,, / images / DeployWiz_Network.png "); Bitmap image source = new bitmap image (); Source.BeginInit (); Source.UriSource = uri; Source.DecodePixelHeight = 40; Source.EndInit (); Return source; } Else {Uri uri = new Uri ("pack: // application: ,,, / images / ou2.png"); Bitmap image source = new bitmap image (); Source.BeginInit (); Source.UriSource = uri; Source.DecodePixelHeight = 20; Source.EndInit (); Return source; }} Public Object Convertback (Object Value, Type Type, Object Parameter, CultureInfo Culture) {New Notport Supported Expansion ("Can not Convert Back"); }}

This code allows me to use a different image in my treeway control based on the contents of the Tree View Control.

When it's running under WinPE, I get the following exception:

 Enter image details here

Therefore, I put the missing .DLL in the same folder as my .exe, and then I get this exception:

Enter image details here

What is something to watch about the WHO Is not it the reason to work in WinPE? Is there any other class I fulfill my goal and this? Can I use the Bitmap image in WPF to avoid Dll? There is also a bitmap image that requires this Dell. I think this is because it's the only new code I added that breaks my app.

Are you creating a 32 bit or 64 bit WinPI environment?

Seeing this, your WPF application is using "any CPU" as a platform, and so when the app runs, this 32 bit version of mscms.dll is run on a 64 bit platform. Be available while running on 32bit platform and 64 bit MSCMS DLL.

You need to make sure that you use mscms.dll to match the "beetle" winpe environment that you have decided to use.

WinPE x64 does not support WOW64 (Windows 32-bit Windows 64-bit) ... then compiling your application as "x86" (i.e. 32 bit) and a 32bit mscms.dll Not an option.

  • In this way, make sure you copy the correct 32 bit or 64 bit mscms.dll ... depending on your PE bkt.

    You may be able to add WinPE x64 to WOW64 (Windows 32-bit Windows 64-bit) by creating your own custom PE build / image by following some tips:



  • No comments:

    Post a Comment