Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Pohlmeyer
> > {===} > > program contest; > > uses windows; > > > > var > > info:tSTARTUPINFO; > > > > begin > > GetStartupInfo(@info); > > if ( info.hStdInput = 0 ) > > then {Started from Explorer} > > else {Started from Console} > > end. > > {===} >

Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Miller
> > > > Is it possible for a program to tell whether it was started > > > > from the command line or started by double-clicking on the > > > > application icon? > If you want to use Win API calls, I think > this would be a better (and simpler) way to do it: > > > {===

Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Jeff Pohlmeyer
> > > Is it possible for a program to tell whether it was started > > > from the command line or started by double-clicking on the > > > application icon? > > {=} > > program envtest; > > uses Dos; > > var > > F:text; > > i:LongInt; > > begin > > assign(F, 'envlist.txt

Re: [fpc-pascal] Re: Can a program find out how it was started?

2005-08-03 Thread Marco van de Voort
> > Under Win98, there are some subtle differences in the output of the program > below, when run from a DOS window vs. double-clicking the icon. > I don't know if this will work for NT-based OS, though > > {=} > program envtest; > uses Dos; > var > F:text; > i:LongI

Re: [fpc-pascal] mmsystem unit : errors

2005-08-03 Thread Michael Van Canneyt
On Wed, 3 Aug 2005, Jean-Marc Chourot wrote: Hi all, Could someone help to understand what happens with this piece of code : When I call the following function, I very very often receive an error :MCIERR_PARAM_OVERFLOW: writeln(err,' The output string was not long enough.'); Does anybody know