> > {===========================} > > program contest; > > uses windows; > > > > var > > info:tSTARTUPINFO; > > > > begin > > GetStartupInfo(@info); > > if ( info.hStdInput = 0 ) > > then {Started from Explorer} > > else {Started from Console} > > end. > > {===========================}
> This looks really attractive, but it doesn't work. > I get the same value of info.hStdInput (4294967295) > whether I run the program from the console or explorer. Sorry, I tested in Win98 and it works fine, but Win2k is a whole different animal. > So far I have been unable to find any information on > the fields of STARTUPINFO, so I can't figure out how > to elaborate on this idea. > If you have any further guidance on that, I'd appreciate it. Maybe this will help: http://msdn.microsoft.com/library/en-us/dllproc/base/startupinfo_str.asp http://msdn.microsoft.com/library/en-us/dllproc/base/getstartupinfo.asp _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal