Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
Brief design note on utilities DLL (utilsub.dll)
By John Richardson CITRIX Systems, 1993.
A large part of the library are functions for processing command lines, strings, etc. ported from the OS/2 product on an as needed basis. The only unique part here is a complete UNICODE version of ParseCommandLine(), and the many subroutines it calls upon to handle file name expansion and such.
The more interesting part are the "helper" functions that do a lot of the work that was in MumProc() on OS/2. This allows querying NT and CITRIX supplied system objects such as users, winstations, processes, etc. A lot of time was spent chasing down various ways of doing things, as well as implementation of base support (such as winsta.dll). The functions in the library handle common needs that come up in the implementation of system programs.
CACHES:
In order to be efficient, the DLL makes use of caching of various information gotten from the system and objects. For "one shot" command line utilities, this cache does not pose any problems. But for monitoring utilities that do not exit, there is a need to flush these caches whenever up to date system information is needed. IE: The top of its monitoring loop after an interval wakeup, or event. The main flush function is RefreshAllCaches(), but specific caches may be dumped by calling refresh routines specific to the group of routines. See the tail end of utils\citrix\inc\utilsub.h for the various cache dumping routines.
Universal Object Name Matching:
The current OS/2 product makes use of techniques in which the user can supply the name of a user, workstation, or id to the various utilities and the system will try to match this against a valid name. In order to be consistent, as well as make maintanence easier, this DLL provides Object name match functions that adhere to the lookup rules in the system. Currently, the name is validated as a workstation, and if not, it is checked as a workstation integer id. If this is still invalid, it is checked as a valid user name.
For the ProcessObjectMatch routine, an additional flag is supplied to specify whether to treat an integer identifier as an NT process, or a CITRIX WinStation.
|