Article 170502 of comp.os.vms:
fairfield@sldb4.slac.stanford.edu wrote:
: In article <3384cbc3.101623@news.demon.co.uk>, 
:     		geoff@lockdes.demon.co.uk (Geoff Kell) writes:
: > I have an application which needs to determine the server name from a
: > DECW$DISPLAY WS device. 
: > SHOW DISPLAY shows this information however I want to get it from a
: > C++ program. 

:         In principle, you can easily get it from any HLL though calls to
:     LIB$GET_SYMBOL _iff_ you did a  SHOW DISPLAY/SYMBOL prior to running
:     your  image.  Since that's not likely to be a constraint you want to
:     support, the other way is by using a QIO  with  the  (undocumented?)
:     item  IO$M_WS_DISPLAY.  A gentleman named Steve Garrett, probably of
:     Digital but there's no affiliation  listed  in the source, posted an
:     example  program in C that does just what you've requested.  Because
:     of the length, I won't post it here (but I'll forward  it  to  Geoff
:     and anyone else who'd like a copy).

A little more detail would be in order, I think (especially relative to
$QIO's P1 to P6 parameters):

  There are undocumented and unsupported itemcodes that one can `aim' at
  the `DECW$DEVICE' (WSAn:) device.  The core C code looks like this:

    #define IO$M_WS_DISPLAY         64
    #define DECW$C_WS_DSP_NODE       1
    #define DECW$C_WS_DSP_TRANSPORT  2
    #define DECW$C_WS_DSP_SERVER     3
    #define DECW$C_WS_DSP_SCREEN     4

    RetStat = sys$qiow( Ef, Chan, IO$_SENSEMODE|IO$M_WS_DISPLAY, IosbPtr,
      0, 0, NodeBufferPtr, NodeBufferSize, DECW$C_WS_DSP_NODE, 0, 0, 0 );

  The Digital Customer Support Centers (CSCs) should have one or more full
  example programs available online.

  Standard disclaimers apply: this interface is undocumented, unsupported
  and subject to change without notice, etc.
                                      [supplied by Stephen 'Hoff' Hoffman]

cu,
  Martin
--
                              |  Martin Vorlaender | WNT & VMS programmer
  "UNIX is user friendly.     |  work: mv@pdv-systeme.de
   It's just selective about  |  home: martin@radiogaga.harz.de
   who its friends are."      |        http://www.harz.de/~martin/


