C# .NET - run external Application (serious )
Asked By Tamer Hatoum
04-Feb-12 02:41 AM

It is really strange and I want to solve it :
I have 2 application built by C# ,
Scanner :
Is for scanning documents using special Dll Files built by c language .
The Second application built by C# also :
Runner Application :
is to run the Scanner application .
The Strange issue is :
IF I luanch the scanner app from the runner app an error will be generated because it doesn't find the Dll files .
So I try to copy and paste the dll files from Scanner/bin/Debug to runner/bin/debug
so the scanner runs correctly without any problems.
So I notice that the problem is Dll registration or dll link .
I tried to register the dll it fails , I tried to copy the dll to windows/system32 also it doesnot work.
I think the issue will be solved if I link the dll files while importing it>
[DllImport("ScanDll.dll")]
public static extern int IO_GetIDImage_File(int lImageType, int lCardType, int lCompressRet, string szFileOutPut);
Why if I start the scanner app from the runner app it search for the dll file inside runner/bin/debug not in scanner/bin/debug ????
Please need your expert to help me in that issue...
D Company replied to Tamer Hatoum
DllImport C++ dll produces exception .NET Framework Hello everyone, I really need some help on this: I have a C# console application. I use DllImport to access a c++ dll. In an extra thread I poll a method in this the problem: I use the same code and put it in the simplest windows forms application and then the application crashes. I get an StackOverflowException in my c++ dll. How can that be? Thanks. bye juergen C# Discussions StackOverflowException (1) DllImport (1) Stack (1) Nemtsev (1) D55b7f0e53d623dc (1) Windows (1) Juergen (1) Laflour (1) No idea thread / d55b7f0e53d623dc / - - WBR, Michael Nemtsev [.NET / C# MVP]. Blog: http: / / spaces.live.com / laflour keywords: DllImport, C++, dll, produces, exception description: Hello everyone, I really need some help on this: I have a C# console application. I use DllImport to access a c++ dll. In an extra thread I poll a
VB Hello Strange things happen inside of my own C++ DLL: My Windows Mobile 6 application is written in C# using the compact framework 3.5. Inside this application I call the following procedure Test() of my own unmanaged C++ DLL "PPPExtDLL" using DllImport: [DllImport("PPPExtDLL")] public static extern void Test(); Inside of Test() I make use of an object are only possible if a second native debugger is attached to the running smart device application. Are there any suggestions or hints I can do to solve these troubles? Chris VC description: Hello Strange things happen inside of my own C++ DLL: My Windows Mobile 6 application is written in C# using the compact framework 3.5. Inside this app
Relationship between Application.Exit() and AppDomain .NET Framework Hi, Does Application.Exit() apply only to the AppDomain in which it is called? Is it the same as in WPF – a single Application object per AppDomain? Generally speaking, what is the relationship between an Application object and AppDomain objects? Regards, Sunny S. .NET CLR Discussions System.Windows.Threading.Dispatcher.PushFrameImpl GetMessage (1) System.Windows.Threading.Dispatcher.PushFrame (1) System.Windows.Threading.DispatcherFrame (1) System.Windows.Application.RunInternal (1) DoCLRToCOMCall (1) System.Windows.Threading.Dispatcher (1) CannotUnloadAppDomainException (1) One AppDomain per application. One or more AppDomains in a Process. WPF doesn't change this as WPF is still a .NET application and is still run by the CLR. Application.Exit will kill the application you are calling it on and therefore the AppDomain it
Creating Console application in C# .NET Framework I have an application where if the user calls the program with command line, I want the program to run as a console application and when called with out parameters it need to launch the windows application. So I created a windows application and the in the main method I did a check to see if args has display the message in the dos box in WinForm program?? Thanks a lot. C# Discussions Application.SetCompatibleTextRenderingDefault (1) System.Runtime.InteropServices (1) Environment.GetCommandLineArgs (1) Application.EnableVisualStyles (1) Constants.Request.Inspect (1) Constants.Request.Create (1) Constants.Request.Update (1) System Windows.Forms (1) Please post your application's main form load event code. The problem is most likely in the startup code
How to open the already running application .NET Framework Hi, I have a windows form application, where the requirement is as follows. . . If the application is already running, and the user tries to open another instance of the application, the already running instance of the application should be activated. Also my application can be in the system tray (and not be present in the taskbar), so even in this condition the application should be activated (i.e. application's main screen should be displayed) Any help in this regard is appreciated. Regards, Ankit