WSOCKAID.DLL Version 2.0b December 21, 1994 This DLL contains functions that are currently missing in the Windows Sockets 1.1 specification, but which are needed for some networking applications. Currently this DLL supports only FTP Software's PC/TCP Version 2.1 and above. For this TCP/IP stack, all information that WSOCKAID.DLL can give is retrieved from the PCTCP.INI file (or whatever your PCTCP env. variable points to). If you want to use this DLL together with other stacks and get errors like "Could not resolve username" from network applications, look at the list of functions below. For each inquiry function the information returned to a program can also be defined in the WIN.INI file by creating a section named [WSOCKAID] and adding the appropriate entry. For setting the username a Control Panel Applet named WSAIDCNF.CPL is included. If you move this program to your WINDOWS/SYSTEM directory, you can set the username by double- clicking on the "question mark face" icon. See also the remarks on the WSAIDGetUsername function below. The following functions are exported by this DLL: WSAIDGetUsername This function retrieves the user name that a PC user has registered with the networking software. If the used networking software has a real Windows network driver (like PC/TCP 2.2 and later has) and this driver supports the WNetGetUser function, the return value of this function is given to the calling program instead of the username defined in the [WSOCKAID] section of WIN.INI. You can override this behaviour to always use the username in the [WSOCKAID] section by putting an entry like AlwaysUseWSAIDUsername=1 into this section, or checking the corresponding box in the Control Panel applet. To find out if your networking software has such a driver, look if the [boot] section in SYSTEM.INI contains a network.drv= entry that is not empty. If such a driver cannot be located, the DLL looks at various places to obtain a username. These places are (in search order ): the ”User=” entry of section [pctcp general] if the PCTCP env. variable is set to an existing configuration file for FTP Software’s PC/TCP the ”Username=” entry of section [Network] in SYSTEM.INI the ”Username=” entry of section [TcpGlobal] in TCPUTILS.INI the ”User=” entry of section [WSockAid] in WIN.INI [WSOCKAID]-Entry: User= WSAIDGetRealname This function returns the real name that a PC user has registered with the networking software. [WSOCKAID]-Entry: Full-Name= WSAIDGetHostname This function returns the locally defined host name for the PC (without any domain information appended). The following places are searched for a hostname definition in the given order: the ”Host-Name=” entry of section [pctcp general] if the PCTCP env. variable is set to an existing configuration file for FTP Software’s PC/TCP the ”ComputerName=” entry of section [Network] in SYSTEM.INI the ”Host-Name=” entry of section [WSockAid] in WIN.INI [WSOCKAID]-Entry: Host-Name= WSAIDGetDomain This function returns the Internet domain that the PC belongs to. [WSOCKAID]-Entry: Domain= WSAIDGetDefaultPrinter This function returns the default LPR network printer as separate queue and server name. [WSOCKAID]-Entry: LPRQueue= LPRServer= Change Log: Version 2.0a: WSOCKAID now searches in various other places for a username. The search order is: 1. See if a network driver is installed (see SYSTEM.INI section [boot], entry network.drv=). If present, call its function WNetGetUser(). 2. Look if the env. variable PCTCP is defined. If so, try to read the username from the relevant INI file. 3. Look if the SYSTEM.INI section [Network] contains an entry Username=. 4. Look if a file TCPUTILS.INI exists which has an entry Username= in the section [TCPGlobal] 5. Return an error value. Version 2.0b: Removed a small bug that caused the username set in the [WSockAid] section of WIN.INI not to be used although is should have been. Now the WSAIDGetHostname() function returns the ”ComputerName=” setting in the [Network] section of SYSTEM.INI if this is defined (under Windows for Workgroups). Copyright: This DLL is Copyright (C) 1993-94 by Thomas Heil. Redistribution of this DLL is allowed only together with the documentation (as PostScript file and as plain ASCII .ASC file). This software may not be sold by itself. Applications that use this DLL may be sold together with the DLL and its documentation included royalty free. If you are a network software vendor and think that your TCP/IP stack should be supported, please contact me. Author: Thomas Heil Hindenburgstr. 50 41352 Korschenbroich E-Mail: th.heil@kfa-juelich.de (Internet)