Look What I Found On Warp Connect

From EDM2
Jump to: navigation, search

By Richard K. Goran

Hidden and Obscured .inf Files in Warp Connect

I have noticed that there are .inf files installed as part of Warp Connect that don't show up in the OS/2 System Information folder (the folder with an object ID of <WP_INFO>). Some of these .inf files are included in the OS/2 Peer/Books folder, <LS_BOOK>, while others do not appear in any icon view at all.

Since there are many new .inf files with Warp Connect, I thought it would be a good idea to include a reference to each of these other files in the WP_INFO folder. At the same time, I wanted to create a new folder which would contain a reference to the .hlp files associated with Warp Connect. The complete REXX program, 9603ls01.cmd, is too large to include within this column; however, it can be downloaded as [9603ls01.zip]. The ZIP file includes the program source code as well as [wptool.dll], a freeware API from Henk Kelder of the Netherlands which is used to interrogate the contents of Workplace Shell objects from a REXX program. The sequence numbers, surrounded by square brackets, are also included where appropriate in the description of the program.

Figure 1 contains a copy of the OS/2 System Information folder after this program is run. The .inf files which were added by this program can be identified with the book logo containing a question mark.

Figure 1

The first thing that needs to be done is to identify those .inf files that were already referenced in <WP_INFO>. Table 1 contains a list of these .inf files on my system prior to running this program. Of course, those objects identified by a handle will differ by system. Table 2 contains a list of all of the .inf files installed by Warp Connect. The objects contained in <WP_INFO> are not references to the actual .inf files. Rather, they are WPProgram objects that launch the VIEW program and pass it the name of the .inf file to be viewed. Similarly, the program VIEWHELP can be used to view .hlp files. Since there is no built-in way in REXX to query the contents of a folder (WPFolder object), I used the wptools.dll (from Henk Kelder of the Netherlands) which is available free for download. (I have used WPTools in examples in previous columns.) WPTOOLS contains two functions that meet our needs here. WPToolsQueryFolderContent() builds a stem, or compound, variable that contains the identity of each abstract object within the specified folder. WPTools provides the object ID for those objects that were created with one; otherwise it provides the object's handle (a term more familiar to C++ programmers) for those objects that do not have an object ID. Object IDs are defined as any string bounded by a less than character (<) and greater than character (>). Object handles are returned as a hexadecimal string preceded with a # character [0109-0120]. The WPToolsQueryObject() function allows us to query each of the WPProgram objects so that we can check the setup string used to create the object. Any of the objects that do not launch view.exe or viewhelp.exe will be ignored.

Once we have built a list of all of the WPProgram objects in <WP_INFO> we can then interrogate each of these to obtain a list of the .inf files that they reference. The WPProgram objects we are concerned with all contain a setup string value of EXENAME= indicating that the VIEW program is to be launched for .inf files and VIEWHELP is to be launched for .hlp files. Unfortunately, there was no consistency used in defining the program to be used. Various combinations of view and view.exe appear both with and without a path. The same is true for viewhelp.exe. The SysSearchPath() function will return the full file system name for these programs that we can use as a reference [0104-0107]. Once the program name is determined, the .inf or .hlp file name can be extracted from the PARAMETERS=file_name setup string [0165-0190].

Each .inf and .hlp file will be added to an associative array which was initialized to nulls [0198-0208]. An associative array is a compound variable whose indices (tails) are not sequential and not in any given order. Associative arrays are unique to REXX (see OS/2 Magazine - The REXX Column, December, 1994). The index of each element of this array is the full file system name (drive, path, and file name) of the .inf or .hlp file. Any non-null value can be assigned to each of these array elements since the array was initialized to a nulls. Special attention must be paid to using non-numeric tails. By definition, REXX treats all variable names and stem names as if they were written in uppercase. Tails, on the other hand, are processed in the case they were written. Therefore, when a variable containing non-numeric data is used as a tail in a compound variable, it must be written un uppercase [0202, 0385].

Since our purpose is to include the .inf and .hlp files included with the Warp Connect install, the next task is to build a stem variable containing all of these files contained in the Connect-related directories. These directories in grpware, ibmcom, ibmlan, lanlk, mptn, muglib, nsc, tcpip, and wal. The SysFileTree() function in REXXUTIL is used to build a temporary array of the files in each of these directories. The contents of the temporary array is cumulatively copied to a combined array. This task must be done by element unless Object REXX or an external API is used that permits copying arrays in their entirety [0218-0223].

Each of the .inf and .hlp files in the compound array is checked against the associative array built from the contents of the <WP_INFO> folder. Entries whose associate array value are non-null (indicating that they are already referenced) are ignored. New .inf file objects are added to the <WP_INFO> folder and new .hlp objects are added to the new folder created for this exclusive purpose [0228-0240]. Depending upon your installation, you should find that four to six new entries will be added to <WP_INFO> and over 60 .hlp file objects will be added to the Connect Related HLP Files folder.

Many of the .hlp files will produce some insight into the workings of the Connect-related programs. Generally you would not see these .hlp files without previously having launched the respective program. This is a Catch 22 situation if you don't know that the program exists. For example, the Connection Manager (\ibmlan\netprog\conman.exe) program is not referenced in any of the Connect folders. I didn't even know about it until I built the new folder. I will leave it to you, the reader, to see what Connection Manager is all about.

Some of the .hlp files have titles and others do not. Where a title could be extracted from the .hlp file [0278-0309], it was used as the first of a two-line title for the WPProgram object with the file system name used as the second line. Where no .hlp file title could be found, the WPProgram object title is just the file system name.

Many bits of wisdom can be gleaned from the .hlp files. Take a look at \tcpip\help\tcpguide.hlp. It contains the only source of information I have found about the netrc file capability. NETRC can also be used as an environment variable to point to a file of your choice to be used by the NETRC facility for controlling FTP and REXEC clients. You can read this information by searching in the tcpguide.hlp file for netrc.