Newbie Question on osCall Windows 7

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie Question on osCall Windows 7

Mark-2
Newbie to SmallTalk (using 7.5), so please be gentle! 

Say I am running a program out of Smalltalk called "myprog.exe".  I am using the code below and it works well.

(OSCall new) createProcess: nil 
        lpszCommandLine: 'c:\myfolder\myprog.exe' 
        lpsaProcess: 0 
        lpsaThread: 0 
        fInheritHandles: false 
        fdwCreate: 0 
        lpvEnvironment: 0 
        lpszCurDir: 'c:\myfolder\' 
        lpsiStartInfo: (OSStartupinfo new) 
        lppiProcInfo: (OSProcessInformation new). 

However, it looks like it is creating a new instance of OS and the environment variables are being defaulted.
Is there a way to [re]set an environment variable for use by "myprog.exe"?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question on osCall Windows 7

Marten Feldtmann-2
I would guess, that lpvEnvironment is a good way to achieve, what you want to do ... actually I have not done this by myself yet

Marten

Am Dienstag, 8. Oktober 2013 15:42:11 UTC+2 schrieb Mark:
Newbie to SmallTalk (using 7.5), so please be gentle! 

Say I am running a program out of Smalltalk called "myprog.exe".  I am using the code below and it works well.

(OSCall new) createProcess: nil 
        lpszCommandLine: 'c:\myfolder\myprog.exe' 
        lpsaProcess: 0 
        lpsaThread: 0 
        fInheritHandles: false 
        fdwCreate: 0 
        lpvEnvironment: 0 
        lpszCurDir: 'c:\myfolder\' 
        lpsiStartInfo: (OSStartupinfo new) 
        lppiProcInfo: (OSProcessInformation new). 

However, it looks like it is creating a new instance of OS and the environment variables are being defaulted.
Is there a way to [re]set an environment variable for use by "myprog.exe"?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question on osCall Windows 7

John O'Keefe-3
 
John
On Tuesday, October 8, 2013 10:13:51 AM UTC-4, Marten Feldtmann wrote:
I would guess, that lpvEnvironment is a good way to achieve, what you want to do ... actually I have not done this by myself yet

Marten

Am Dienstag, 8. Oktober 2013 15:42:11 UTC+2 schrieb Mark:
Newbie to SmallTalk (using 7.5), so please be gentle! 

Say I am running a program out of Smalltalk called "myprog.exe".  I am using the code below and it works well.

(OSCall new) createProcess: nil 
        lpszCommandLine: 'c:\myfolder\myprog.exe' 
        lpsaProcess: 0 
        lpsaThread: 0 
        fInheritHandles: false 
        fdwCreate: 0 
        lpvEnvironment: 0 
        lpszCurDir: 'c:\myfolder\' 
        lpsiStartInfo: (OSStartupinfo new) 
        lppiProcInfo: (OSProcessInformation new). 

However, it looks like it is creating a new instance of OS and the environment variables are being defaulted.
Is there a way to [re]set an environment variable for use by "myprog.exe"?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.