
Microsoft .NET FAQ |
![]() |
| Q1: How does Pegasus Imaging build components for the .NET Platform? |
| Q2: I am using a previous version of a Pegasus .NET control and am having to place the control in the GAC (Global Assembly Cache) in order to get my application to run. How can I avoid this? |
| Q3: How do I stop memory leaks when using a Pegasus .NET control? |
| Q4: I am trying to run a Visual Studio .NET application using a Pegasus .NET control on a 64 bit machine and am seeing one of the messages outlined below being generated. Why is this happening and how do I resolve this issue? |
| Q5: When I use a Pegasus Imaging .NET control in Visual Studio .NET 2005, I get an App Domain Unloaded Exception or a LoaderLock was Detected message. Is there a way around this issue? |
Q1: How does Pegasus Imaging build components for the .NET Platform? |
| Read Pegasus Imaging’s "Building Robust Imaging Components for the Microsoft .NET Platform" white paper. |
Q2: I am using a previous version of a Pegasus .NET control and am having to place the control in the GAC (Global Assembly Cache) in order to get my application to run. How can I avoid this? |
| Please download the latest unsigned version of the appropriate .NET control from the link(s) below. These versions will resolve this issue. ImagXpress6Unsigned NotateXpress6Unsigned PrintPro2Unsigned.zip TwainPro3Unsigned.zip Smart3ICROCRunsigned.zip ScanXpressISISUnsigned |
Q3: How do I stop memory leaks when using a Pegasus .NET control? |
| The Dispose method of the appropriate Pegasus control needs to be called after using the control in your project. |
Q4: I am trying to run a Visual Studio .NET application using a Pegasus .NET control on a 64 bit machine and am seeing one of the messages outlined below being generated. Why is this happening and how do I resolve this issue? |
| Please note that these exceptions were generated with specific Pegasus .NET controls for demonstration purposes and the specific text of the message may differ slightly based on the control you are using. Exception Message #1 PegasusImaging.WinForms.ImagXpress8.ImagXpressException was unhandled Message="Could not initialize ImagXpress, are all of the correct files on this PC?" Source="PegasusImaging.WinForms.ImagXpress8" Number=0 StackTrace: at PegasusImaging.WinForms.ImagXpress8.WorkerImports.LoadWorkerDllFromResource() at PegasusImaging.WinForms.ImagXpress8.ImagXpress..ctor() at FormIdAndDropout.MainScreen.InitializeComponent() in C:\Program Files (x86)\Pegasus Imaging\FormFix\V3.0\Samples\DotNet\C#\FormIdAndDropout\Form1.cs:line 211 at FormIdAndDropout.MainScreen..ctor() in C:\Program Files (x86)\Pegasus Imaging\FormFix\V3.0\Samples\DotNet\C#\FormIdAndDropout\Form1.cs:line 88 at FormIdAndDropout.MainScreen.Main() in C:\Program Files (x86)\Pegasus Imaging\FormFix\V3.0\Samples\DotNet\C#\FormIdAndDropout\Form1.cs:line 595 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Exception Message #2 System.BadImageFormatException was unhandled Message=" is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)" Source="CircleCSharp" StackTrace: at CircleCSharp.FormMain..ctor() at CircleCSharp.FormMain.Main() in C:\Program Files (x86)\Pegasus Imaging\PrintPRO\V3.0\Samples\DotNet\C#\circlecsharp\FormMain.cs:line 187 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() The .NET control needs to run as a 32-bit application on a 64-bit machine. .Net will try to build code to run as fast as possible on the native hardware, unless you tell it otherwise. Essentially, projects built using the “Any CPU” setting for the CPU Target will run as 64-bit applications on a 64-bit machine. The solution is to change this setting to “x86” forcing the compiler to build a 32-bit application. The steps to do this are as follows: In VS2005: Select Project> (Project name) Properties. Select Build tab. At Platform Target, select x86. Save the project, build, and run. Your application should now run on the 64-bit machine. |
Q5: When I use a Pegasus Imaging .NET control in Visual Studio .NET 2005, I get an App Domain Unloaded Exception or a LoaderLock was Detected message. Is there a way around this issue? |
| This can be resolved by performing the following steps: 1) Access the Debug menu > Exceptions > Managed Debug Assistants and uncheck the checkbox in the column Thrown for the LoaderLock tree node entry. 2) Close Visual Studio 2005. 3) Open Visual Studio 2005 and re-add the Pegasus control. |