× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Chris,
thanks for you answer, it looks quite adequate.
Right now I'm at home for NewYear's eve, but will give it a try as soon as 
possible.
Thanks again, and Happy New Year!
Antonio

Chris Devous escribió:

> Under CA/Express's window setup dialog, set the window name to something 
>known,
> like "NTPRINTER" or some such.  The following example assumes this:
>
> (Assuming you're using vb)
>
> Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
> lpClassName As String, ByVal lpWindowName As String) As Long
> Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
> hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
> Long
> '
> Public Const WM_CLOSE = &H10
> '
>
> Private Sub EndProgram()
> Dim wHandle&
> Dim lRetval&
>
> wHandle = FindWindow(vbNullString, "NTPRINTER")
> If wHandle <> 0 Then
>    lRetval = SendMessage(wHandle, WM_CLOSE, 0, 0)
> End If
>
> End Sub
>
> Now, if you screw around with the express toolkit and learn how to check data
> queues, you could make this a service program, and have it read a dataqueue 
>on the
> 400.  When it finds a value, it shuts the program down.  On the 400, you 
>stuff the
> data queue you're monitoring just before you execute the pwrdwnsys command.
>
> I don't know if there's an exit point you can trap, but you could have a job 
>running in a
> subsystem that monitors for shutdown of the subsystem and stuffs the data 
>queue
> for you.
>
> HTH,
>
> --Chris
>
> > > Subject: How to "programmatically" end "pcsws.exe"
> > >
> > > Hi everybody, I've been looking thru the archives and could not find
> > > any thing related to following question: One of our NT Servers is
> > > configured with a ClientAccess (Express, in our case) printer
> > > session and works fine. The problem is: short before AS/400 will end
> > > ( PWRDWNSYS ) we would like to "programatically" end the "pcsws.exe"
> > > printer session. Obviously, I'm not talking of executing ENDPRTWTR
> > > in the AS/400, since pcsws.exe will keep running in the PC. Not
> > > either can relay on "programmed tasks" in the PC, since ending time
> > > for AS/400 changes from day to day under certain circunstances. I am
> > > thinking of some kind of  RUNRMTCMD or STRPCCMD stuff or the like
> > > that we can send asking the NT to "kill" the pcsws.exe task... Any
> > > idea how to build such an command ? Happy New Year to everybody in
> > > this list ! ------------------------- Antonio Fernandez-Vicenti
> > > afvaiv@wanadoo.es
> > >
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.

--
-------------------------
Antonio Fernandez-Vicenti
afvaiv@wanadoo.es




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.