Error after calling System.Diagnostics.Process.GetCurrentProcess().StartTime  
Author Message
Pietro





PostPosted: Wed Feb 21 04:29:58 CST 2007 Top

Visual C#.Net >> Error after calling System.Diagnostics.Process.GetCurrentProcess().StartTime Hello,
I get some strange behaviour after calling a method on a third party
library when I call:
System.Diagnostics.Process.GetCurrentProcess().StartTime

If I run the following code it works as expected:

try
{
MapInfo.Engine.Session.Current.Catalog.OpenTable(@"C:
\MapApplication\Data\ecw.tab");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}

But if I call:

System.Diagnostics.Process
p=System.Diagnostics.Process.GetCurrentProcess();
string time= p.StartTime.ToShortTimeString();

before the above code I get 2 errors:

Form1: MXWinForm.exe - Unable To Locate Component

This application has failed to start because ncsecwex.dll was not
found. Re-installing the application may fix this problem.


Why would making a call to
System.Diagnostics.Process.GetCurrentProcess().StartTime cause
internal errors to be thrown in my third party library?

Regards,
Matthew Lock

DotNet186  
 
 
CiaranODonnell





PostPosted: Wed Feb 21 04:29:58 CST 2007 Top

Visual C#.Net >> Error after calling System.Diagnostics.Process.GetCurrentProcess().StartTime You should probably take this up with the vendor of the 3rd party control.


--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com


"Matthew Lock" wrote:

> Hello,
> I get some strange behaviour after calling a method on a third party
> library when I call:
> System.Diagnostics.Process.GetCurrentProcess().StartTime
>
> If I run the following code it works as expected:
>
> try
> {
> MapInfo.Engine.Session.Current.Catalog.OpenTable(@"C:
> \MapApplication\Data\ecw.tab");
> }
> catch(Exception ex)
> {
> MessageBox.Show(ex.Message);
> }
>
> But if I call:
>
> System.Diagnostics.Process
> p=System.Diagnostics.Process.GetCurrentProcess();
> string time= p.StartTime.ToShortTimeString();
>
> before the above code I get 2 errors:
>
> Form1: MXWinForm.exe - Unable To Locate Component
>
> This application has failed to start because ncsecwex.dll was not
> found. Re-installing the application may fix this problem.
>
>
> Why would making a call to
> System.Diagnostics.Process.GetCurrentProcess().StartTime cause
> internal errors to be thrown in my third party library?
>
> Regards,
> Matthew Lock
>
>