using Expression encoder 4 inside an 64 bit c++/clr Application

回答済み using Expression encoder 4 inside an 64 bit c++/clr Application

  • Wednesday, October 10, 2012 8:33 AM
     
      Has Code

    I Compiled and run this simple C++/CLR in win32 Configuration

    int _tmain(int argc, _TCHAR* argv[])
    {
    	ScreenCaptureJob^ job=gcnew ScreenCaptureJob();;
    	System::Drawing::Size monitorSize = SystemInformation::PrimaryMonitorSize;
    	System::Drawing::Rectangle capRect(0, 0, monitorSize.Width, monitorSize.Height);
    	job->CaptureRectangle = capRect;
    	job->OutputPath = "C:/output/ScreenCap1";
    	job->Start();
    	job->Stop();
    	return 0;
    }

    everything is OK but under X64  fails and throw an exception

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.

    Additional information: Could not load file or assembly 'Microsoft.Expression.Encoder, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    is it Microsoft.Expression.Encoder or one of its dependencies is incompatible with x64? 


    jalal sadeghy


All Replies

  • Thursday, October 11, 2012 3:31 PM
    Moderator
     
     Answered

    The EE4 SDK is x86 (32-bit) only and you need to set the platform to x86 when building your application.

    Trying to set the platform to "All" or "amd64" will result in either a compiling or runtime failure like you saw.

    EE4 SDK applications build with the x86 platform target are fully compatible with currently released 64-bit OSes, including Windows Server 2008 64-bit, Windows Vista 64-bit and Windows 7 64-bit.