Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / July 2006

Tip: Looking for answers? Try searching our database.

MFC exe Crashes with /clr option

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jacquie - 14 Jul 2006 18:50 GMT
I have a MFC app that was developed with VC++ 2003 7.1 . I have now
upgraded to VC++ 2005 8.0. Eventually I plan on using a Windows Form
Control and hosting it on existing dialog.

1) First I compiled the project in 2005 and fixed a few errors and am
able to compile/run with seemingly no problems

2) I turned on the /clr option and fixed what ever problems and now am
able to compile with no errors

2a)  now when I run I get a crash. My project settings are:

            <Tool
                Name="VCCLCompilerTool"
                Optimization="0"

AdditionalIncludeDirectories="&quot;$(SolutionDir)\common\include&quot;;&quot;$(SolutionDir)\DataRecorder&quot;;&quot;$(BOOST_INC_MSVC)&quot;"
                PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_SCL_SECURE_NO_DEPRECATE;"
                GeneratePreprocessedFile="0"
                BasicRuntimeChecks="0"
                RuntimeLibrary="3"
                RuntimeTypeInfo="true"
                UsePrecompiledHeader="1"
                PrecompiledHeaderThrough="stdafx.h"
                PrecompiledHeaderFile=".\Debug/pdr2.pch"
                AssemblerListingLocation=".\Debug/"
                ObjectFile=".\Debug/"
                ProgramDataBaseFileName=".\Debug/"
                BrowseInformation="1"
                WarningLevel="4"
                SuppressStartupBanner="true"
                DebugInformationFormat="3"
            />

The error from the crash is:

First-chance exception at 0x7c81eb33 in Data Recorder.exe: Microsoft
C++ exception: [rethrow] at    memory location 0x00000000

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

Additional information: Could not load file or assembly 'Data Recorder,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Failed to grant minimum permission requests. (Exception
from HRESULT: 0x80131417)

I have tried placing try/catch blocks around the CWinApp::InitInstance,
CWinApp::InitApplication, and CWinApp::Run and I don't think the
program ever reaches any of these functions.

If anyone can help me, please do.
Thanks in advance for the help.
Jacqui - 14 Jul 2006 19:09 GMT
I forgot to mention that my MFC app is located on a remote computer
(intranet) and I'm running it from my computer.

> I have a MFC app that was developed with VC++ 2003 7.1 . I have now
> upgraded to VC++ 2005 8.0. Eventually I plan on using a Windows Form
[quoted text clipped - 49 lines]
> If anyone can help me, please do.
> Thanks in advance for the help.
Jochen Kalmbach [MVP] - 15 Jul 2006 12:31 GMT
Hi Jacqui!
> I forgot to mention that my MFC app is located on a remote computer
> (intranet) and I'm running it from my computer.
>
>>Failed to grant minimum permission requests. (Exception

As the error message mentions: You have no permission to execute this
EXE/DLL from a network share.

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.