Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vhost(PCI) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isvirtual(PCI)

vdrive(PCI)


 vhost(PCI)                     6 January 1993                     vhost(PCI)


 Name

    vhost - return the name of a currently connected host

 Syntax


    #include  <pcilib.h>


    #include  <memmdl.h>

    char* vhost( drvnum )
    int drvnum;


 Description

    vhost is a DOS function call that returns the name of the host attached
    to the virtual drive specified by drvnum.

    drvnum is the drive number of the host whose name is being requested.
    Drive letters and numbers correspond in the following way: A: = 1, B: =
    2, and so forth.

 Return value

    If drvnum corresponds to a logged-in virtual drive, vhost returns the
    name of the host attached to the virtual drive specified by drvnum.

    If drvnum is out of range, or the drive that was selected is currently
    not connected to a host (not logged in), then vhost returns NULL.

 Example


               :
               :
       char hostName[15];
       char *hostPtr;
       int  driveNum;
               :
               :
       /* Get the Host name for virtual drive D: (driveNum = 4) */
       driveNum = 4;
       if ( (hostPtr = vhost(driveNum)) == NULL )
               errorHandler();
       else {
               /* Save a copy of host name */
               strcpy(hostName, hostPtr);
               printf("Host name for Drive %c: is %s", driveNum+'A'-1, hostName);
       }
               :
               :


 See also

    isvirtual(PCI), vdrive(PCI)

 Bugs

    The name returned is stored in a static buffer.  Subsequent calls to
    vhost overwrites this buffer.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026