Problems with 32 bit api call.

Hi,
    I am trying to run a dos command from my powerbuilder app, which zips a
db file and copies it to a network drive. i want my powerbuilder app to wait
till the dos command is done. the way i was doing this in windows 3.1 was to
open a response window and use the run command in the open event of the
response window to fire off a PIF file, which ran the dos batch file. I then
started a timer event. In the timer event, i used the Findwindow api
function to check whether the dos window was still open. if it wasn't, then
i closed the response window and continued. In windows 95 however, the name
of the dos command i am running, pkzip and zcopy is appended into the name
of the dos window. Hence the FindWindowA 32 bit api function is unable to
find the window name i have specified and continues. does anyone see a
solution to this?
Any help will be greatly appreciated.
Thanks,

Rohit


0
Rohit
11/19/1998 1:02:50 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

8 Replies
514 Views

Similar Articles

[PageSpeed] 36

The start command has a command line parameter that allows you to wait for
the operation to finish.

On NT4, it's the "WAIT" parameter as documented below:

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B] [command/program]
[parameters]

You can verify this in Win95 by typing "Start /?" at the command line.

Roy

Rohit Sankholkar wrote in message ...
>Hi,
>    I am trying to run a dos command from my powerbuilder app, which zips a
>db file and copies it to a network drive. i want my powerbuilder app to
wait
>till the dos command is done. the way i was doing this in windows 3.1 was
to
>open a response window and use the run command in the open event of the
>response window to fire off a PIF file, which ran the dos batch file. I
then
>started a timer event. In the timer event, i used the Findwindow api
>function to check whether the dos window was still open. if it wasn't, then
>i closed the response window and continued. In windows 95 however, the name
>of the dos command i am running, pkzip and zcopy is appended into the name
>of the dos window. Hence the FindWindowA 32 bit api function is unable to
>find the window name i have specified and continues. does anyone see a
>solution to this?
>Any help will be greatly appreciated.
>Thanks,
>
>Rohit
>
>


0
Roy
11/19/1998 2:40:51 PM
Roy,
How about CreateProcess() API ? Which one is better in Start and
CreateProcess ?

--
Mahendra Dhamdhere, CPDA
Email:mahendrad@hotmail.com
Pl. Remove nospam_ from email id

Roy Kiesler wrote:

> The start command has a command line parameter that allows you to wait
> for
> the operation to finish.
>
> On NT4, it's the "WAIT" parameter as documented below:
>
> START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
>       [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B]
> [command/program]
> [parameters]
>
> You can verify this in Win95 by typing "Start /?" at the command line.
>
> Roy
>
> Rohit Sankholkar wrote in message ...
> >Hi,
> >    I am trying to run a dos command from my powerbuilder app, which
> zips a
> >db file and copies it to a network drive. i want my powerbuilder app
> to
> wait
> >till the dos command is done. the way i was doing this in windows 3.1
> was
> to
> >open a response window and use the run command in the open event of
> the
> >response window to fire off a PIF file, which ran the dos batch file.
> I
> then
> >started a timer event. In the timer event, i used the Findwindow api
> >function to check whether the dos window was still open. if it
> wasn't, then
> >i closed the response window and continued. In windows 95 however,
> the name
> >of the dos command i am running, pkzip and zcopy is appended into the
> name
> >of the dos window. Hence the FindWindowA 32 bit api function is
> unable to
> >find the window name i have specified and continues. does anyone see
> a
> >solution to this?
> >Any help will be greatly appreciated.
> >Thanks,
> >
> >Rohit
> >
> >





0
Mahendra
11/19/1998 3:13:51 PM
Mahendra,

Start gives you almost everything CreateProcess does, including the control
over the process priority. The only reasons I see for going with
CreateProcess are:
1. You need to set the security attributes for the process under NT.
2. You need to create a separate environment block for the process.
3. You need to create a UNICODE environment block (anyone running PB Unicode
version).
4. You really hate to see the DOS box icon on the taskbar as your process is
executing.

Roy

Mahendra Dhamdhere wrote in message <365435AF.2E7DF108@hotmail.com>...
>Roy,
>How about CreateProcess() API ? Which one is better in Start and
>CreateProcess ?
>
>--
>Mahendra Dhamdhere, CPDA
>Email:mahendrad@hotmail.com
>Pl. Remove nospam_ from email id
>
>Roy Kiesler wrote:
>
>> The start command has a command line parameter that allows you to wait
>> for
>> the operation to finish.
>>
>> On NT4, it's the "WAIT" parameter as documented below:
>>
>> START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
>>       [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B]
>> [command/program]
>> [parameters]
>>
>> You can verify this in Win95 by typing "Start /?" at the command line.
>>
>> Roy
>>
>> Rohit Sankholkar wrote in message ...
>> >Hi,
>> >    I am trying to run a dos command from my powerbuilder app, which
>> zips a
>> >db file and copies it to a network drive. i want my powerbuilder app
>> to
>> wait
>> >till the dos command is done. the way i was doing this in windows 3.1
>> was
>> to
>> >open a response window and use the run command in the open event of
>> the
>> >response window to fire off a PIF file, which ran the dos batch file.
>> I
>> then
>> >started a timer event. In the timer event, i used the Findwindow api
>> >function to check whether the dos window was still open. if it
>> wasn't, then
>> >i closed the response window and continued. In windows 95 however,
>> the name
>> >of the dos command i am running, pkzip and zcopy is appended into the
>> name
>> >of the dos window. Hence the FindWindowA 32 bit api function is
>> unable to
>> >find the window name i have specified and continues. does anyone see
>> a
>> >solution to this?
>> >Any help will be greatly appreciated.
>> >Thanks,
>> >
>> >Rohit
>> >
>> >
>
>
>
>
>


0
Roy
11/19/1998 4:06:31 PM
I think the start command on win95 has no wait opion ;-(
For those things I use the StartProcess API.
I have this in a separate PB object. If you want it, just send me an email.

Geert 'Darling' Van Damme


Roy Kiesler wrote in message ...
>The start command has a command line parameter that allows you to wait for
>the operation to finish.
>
>On NT4, it's the "WAIT" parameter as documented below:
>
>START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
>      [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B] [command/program]
>[parameters]
>
>You can verify this in Win95 by typing "Start /?" at the command line.
>
>Roy
>
>Rohit Sankholkar wrote in message ...
>>Hi,
>>    I am trying to run a dos command from my powerbuilder app, which zips
a
>>db file and copies it to a network drive. i want my powerbuilder app to
>wait
>>till the dos command is done. the way i was doing this in windows 3.1 was
>to
>>open a response window and use the run command in the open event of the
>>response window to fire off a PIF file, which ran the dos batch file. I
>then
>>started a timer event. In the timer event, i used the Findwindow api
>>function to check whether the dos window was still open. if it wasn't,
then
>>i closed the response window and continued. In windows 95 however, the
name
>>of the dos command i am running, pkzip and zcopy is appended into the name
>>of the dos window. Hence the FindWindowA 32 bit api function is unable to
>>find the window name i have specified and continues. does anyone see a
>>solution to this?
>>Any help will be greatly appreciated.
>>Thanks,
>>
>>Rohit
>>
>>
>
>


0
Geert
11/19/1998 11:26:27 PM
Roy,
    thanks for the reply.
    how do i implement the START command? do i have to put it into the dos
batch file that i am running or can i just kick off the start command from
within the run command?
Thanks,
Rohit


Roy Kiesler wrote in message ...
>Mahendra,
>
>Start gives you almost everything CreateProcess does, including the control
>over the process priority. The only reasons I see for going with
>CreateProcess are:
>1. You need to set the security attributes for the process under NT.
>2. You need to create a separate environment block for the process.
>3. You need to create a UNICODE environment block (anyone running PB
Unicode
>version).
>4. You really hate to see the DOS box icon on the taskbar as your process
is
>executing.
>
>Roy
>


0
Rohit
11/20/1998 12:58:09 PM
win95 does have a /wait option and it works.

Geert Van Damme wrote:

> I think the start command on win95 has no wait opion ;-(
> For those things I use the StartProcess API.
> I have this in a separate PB object. If you want it, just send me an email.
>
> Geert 'Darling' Van Damme
>
> Roy Kiesler wrote in message ...
> >The start command has a command line parameter that allows you to wait for
> >the operation to finish.
> >
> >On NT4, it's the "WAIT" parameter as documented below:
> >
> >START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
> >      [/LOW | /NORMAL | /HIGH | /REALTIME] [/WAIT] [/B] [command/program]
> >[parameters]
> >
> >You can verify this in Win95 by typing "Start /?" at the command line.
> >
> >Roy
> >
> >Rohit Sankholkar wrote in message ...
> >>Hi,
> >>    I am trying to run a dos command from my powerbuilder app, which zips
> a
> >>db file and copies it to a network drive. i want my powerbuilder app to
> >wait
> >>till the dos command is done. the way i was doing this in windows 3.1 was
> >to
> >>open a response window and use the run command in the open event of the
> >>response window to fire off a PIF file, which ran the dos batch file. I
> >then
> >>started a timer event. In the timer event, i used the Findwindow api
> >>function to check whether the dos window was still open. if it wasn't,
> then
> >>i closed the response window and continued. In windows 95 however, the
> name
> >>of the dos command i am running, pkzip and zcopy is appended into the name
> >>of the dos window. Hence the FindWindowA 32 bit api function is unable to
> >>find the window name i have specified and continues. does anyone see a
> >>solution to this?
> >>Any help will be greatly appreciated.
> >>Thanks,
> >>
> >>Rohit
> >>
> >>
> >
> >

0
Robert
11/20/1998 2:13:29 PM
In your own words, you can "just kick off the start command from within the
run command".

Roy

Rohit Sankholkar wrote in message ...
>Roy,
>    thanks for the reply.
>    how do i implement the START command? do i have to put it into the dos
>batch file that i am running or can i just kick off the start command from
>within the run command?
>Thanks,
>Rohit
>
>
>Roy Kiesler wrote in message ...
>>Mahendra,
>>
>>Start gives you almost everything CreateProcess does, including the
control
>>over the process priority. The only reasons I see for going with
>>CreateProcess are:
>>1. You need to set the security attributes for the process under NT.
>>2. You need to create a separate environment block for the process.
>>3. You need to create a UNICODE environment block (anyone running PB
>Unicode
>>version).
>>4. You really hate to see the DOS box icon on the taskbar as your process
>is
>>executing.
>>
>>Roy
>>
>
>


0
Roy
11/20/1998 3:11:41 PM
> Start in win95 does have a /wait option and it works.
> 
> Geert Van Damme wrote:

	Hello,

	yes, Start from Win95 has a /wait option but this does'n help
you to wait for exe's end in your PB code. Command.com really waits for
the end of your exe but the Run() command DOESN'T wait for the end
of the COMMAND.COM !


			Ivo Dostal (gordion@cbnet.cz)
0
Ivo
12/5/1998 6:39:17 AM
Reply:

Web resources about - Problems with 32 bit api call. - sybase.powerbuilder.general

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

Serious fox problem near Yass Gorge
Residents seek help, saying fox epidemic is threatening the native biodiversity. &nbsp;

STEM Crisis: NSW Education Minister Adrian Piccoli to focus on STEM's image problem
They are seen as domains for &quot;geniuses&quot;, &quot;geeks&quot;, &quot;nerds&quot; and &quot;not for girls&quot;. And it's holding the nation ...

Recharge Wrap-up: Formula E battery award, Tesla NOx problem
Filed under: Government/Legal , Green , Motorsports , Plants/Manufacturing , Tesla , Emissions , Fuel Efficiency , Technology , Electric Williams ...

"Old-timers, guys that are 60-plus, have no problem with a gang shower and whatever."
"The Gen X-ers are a little bit more sensitive to what they’re spending and what they’re expecting. And the millennials, these are the special ...

Apple's App Store has a copyright problem
... then made more apps — all of which are paid-for — and Raub says Apple is unwilling to help this time. 9to5Mac points out that this problem ...

Rahm Emanuel op-ed: I own the problem of police brutality, and I'll fix it
Chicago is facing a defining moment on the issues of crime and policing and the even larger issues of truth and justice. To meet this moment, ...

Out-Of-Town Trip In The Nissan LEAF — No Problem
... driving to St. Petersburg, to Tampa, or south to Venice or Englewood is gone. The [&hellip Out-Of-Town Trip In The Nissan LEAF — No Problem ...

Michigan GOPer Blames School Problems On Black Children
Michigan state Senator Marty Knollenberg decided he'd be a wise guy and blame failing school districts on African-American kids during a debate. ...


Resources last updated: 12/6/2015 5:10:49 AM