Click here to Skip to main content
15,920,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how can I close .exe in multiple forms? Pin
Lisana5-Aug-04 6:45
Lisana5-Aug-04 6:45 
GeneralRe: how can I close .exe in multiple forms? Pin
Lisana5-Aug-04 8:01
Lisana5-Aug-04 8:01 
GeneralRe: how can I close .exe in multiple forms? Pin
Colin Angus Mackay5-Aug-04 10:15
Colin Angus Mackay5-Aug-04 10:15 
GeneralRe: how can I close .exe in multiple forms? Pin
Lisana5-Aug-04 10:44
Lisana5-Aug-04 10:44 
GeneralRe: how can I close .exe in multiple forms? Pin
Colin Angus Mackay5-Aug-04 10:56
Colin Angus Mackay5-Aug-04 10:56 
GeneralRe: how can I close .exe in multiple forms? Pin
Lisana5-Aug-04 11:04
Lisana5-Aug-04 11:04 
GeneralRe: how can I close .exe in multiple forms? Pin
Colin Angus Mackay5-Aug-04 13:29
Colin Angus Mackay5-Aug-04 13:29 
Generalmore on environment variables Pin
madfiddlerchris5-Aug-04 4:18
madfiddlerchris5-Aug-04 4:18 
Some of you may have read my postings on this recently

http://www.codeproject.com/script/comments/forums.asp?msg=880420&forumid=1646&XtraIDs=1646&searchkw=environment+variable&sd=5%2F7%2F2004&ed=8%2F5%2F2004#xx880420xx


However, I am still having issues.

If I start my windows application and then define some environment variables, then propagate them up to the system level - then I start a commans prompt window for example and use the SET command I can see the new/changed environment variables.

My applciation then loads an unmanaged DLL (written in C which performs a JNI function). The first function call to this attempts to read environment variables that I have set in the my .NET windows application but they do not seem to be inherited.

What appears to happen is that the unmanaged DLL (even though I load it dynamically only just before using its functions) inherits the environment that was available when the .NET windows application first started.

So if I shut down my applicaiton, manually declare environment variables in Windows, run my .NET app again and this time skip over the code that sets the environment variables, the unmanaged DLL functions are able to read the environment variables no problem!

Does this make sense?
I also found reference to this problem here in some archived usenet stuff, but no solution Blush | :O (
http://usenet.best-buy-online.com/Dir8/File985.html


I am not a C programmer and the unmanaged DLL has been written by someone else. Could there be anything in the compilation of the DLL that affects how the environment is inherited. I believe the DLL is written using Visual Studio C++ v6

Unfortunately I HAVE to set the variables in the .NET windows application. Can anyone think of a way around this or does anyone know of an alternative solution?

thanks
GeneralRe: more on environment variables Pin
Dave Kreskowiak5-Aug-04 7:29
mveDave Kreskowiak5-Aug-04 7:29 
GeneralRe: more on environment variables Pin
madfiddlerchris25-Aug-04 0:31
madfiddlerchris25-Aug-04 0:31 
GeneralRe: more on environment variables Pin
Dave Kreskowiak26-Aug-04 1:33
mveDave Kreskowiak26-Aug-04 1:33 
GeneralRe: more on environment variables Pin
madfiddlerchris26-Aug-04 2:10
madfiddlerchris26-Aug-04 2:10 
GeneralRe: more on environment variables Pin
Dave Kreskowiak27-Aug-04 17:56
mveDave Kreskowiak27-Aug-04 17:56 
GeneralRemoving Flicker in an scrolling image Pin
VVision5-Aug-04 3:48
VVision5-Aug-04 3:48 
GeneralRe: Removing Flicker in an scrolling image Pin
Gary Shel18-Aug-04 12:07
Gary Shel18-Aug-04 12:07 
GeneralUnspecified Error using .NET System.DirectoryServices on Windows NT Pin
Rahsas5-Aug-04 3:20
Rahsas5-Aug-04 3:20 
GeneralRe: Unspecified Error using .NET System.DirectoryServices on Windows NT Pin
Rahsas5-Aug-04 8:51
Rahsas5-Aug-04 8:51 
GeneralCreating multiple forms Pin
Simon Kearn5-Aug-04 0:19
sussSimon Kearn5-Aug-04 0:19 
GeneralRe: Creating multiple forms Pin
Jim Matthews5-Aug-04 3:49
Jim Matthews5-Aug-04 3:49 
GeneralRe: Creating multiple forms Pin
Simon Kearn5-Aug-04 4:21
sussSimon Kearn5-Aug-04 4:21 
GeneralRe: Creating multiple forms Pin
Dave Kreskowiak5-Aug-04 5:33
mveDave Kreskowiak5-Aug-04 5:33 
GeneralRe: Creating multiple forms Pin
Simon Kearn5-Aug-04 6:07
sussSimon Kearn5-Aug-04 6:07 
GeneralRe: Creating multiple forms Pin
Dave Kreskowiak5-Aug-04 7:14
mveDave Kreskowiak5-Aug-04 7:14 
GeneralRe: Creating multiple forms Pin
Jim Matthews5-Aug-04 7:33
Jim Matthews5-Aug-04 7:33 
GeneralRe: Creating multiple forms Pin
Anonymous6-Aug-04 1:04
Anonymous6-Aug-04 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.