J
James Radke
Hello,
I am using some external functions supplied by an ERP vendor in a
windows.forms application (vb.net, visual studio.net 2003)
The functions are defined as follows:
' Max startup and shutdown functions
Declare Function InitMAXOrder Lib "MAXORDR2.DLL" (ByRef DataPath As
StringBuilder, ByRef MAXPath As StringBuilder) As Integer
Declare Function ShutdownMAXOrder Lib "MAXORDR2.DLL" (ByVal ObjectHandle
As Integer) As Short
If I never execute the functions, everything works fine....
Once I execute the initialization and shutdown however, the application
closed fine, but the process is still running when I look in Task Manager.
If I use a process.GetCurrentProcess.kill statement, which I assume forces
everything out of memory, the process is stopped.
My question is: Is there a more gracefull way to close down whatever
resource is being held, without using the process kill command? And, if I
have to use a process kill command, is there a way to set a return code to
be returned from the application?
Thanks!
Jim
I am using some external functions supplied by an ERP vendor in a
windows.forms application (vb.net, visual studio.net 2003)
The functions are defined as follows:
' Max startup and shutdown functions
Declare Function InitMAXOrder Lib "MAXORDR2.DLL" (ByRef DataPath As
StringBuilder, ByRef MAXPath As StringBuilder) As Integer
Declare Function ShutdownMAXOrder Lib "MAXORDR2.DLL" (ByVal ObjectHandle
As Integer) As Short
If I never execute the functions, everything works fine....
Once I execute the initialization and shutdown however, the application
closed fine, but the process is still running when I look in Task Manager.
If I use a process.GetCurrentProcess.kill statement, which I assume forces
everything out of memory, the process is stopped.
My question is: Is there a more gracefull way to close down whatever
resource is being held, without using the process kill command? And, if I
have to use a process kill command, is there a way to set a return code to
be returned from the application?
Thanks!
Jim