Windows 95, 98 and NT Registry, Loading and Executing VBA applications
Traditionally DOS and early versions of Windows (3.X) applications stored essential startup information in initialization (.INI) files. Initialization files are ASCII based text files that are limited in length to 64K. This created a problem; because these files were ASCII text files they were considered low security and could be edited using any text editor. It wasn't until the introduction of Windows NT that Microsoft began addressing these problems by developing a system of database files (collective known as the registry). These files are stored in a centralized location house important startup information used by Windows and other Windows based applications. The registry is a system of proprietary binary database files who's primary purpose is to ensure the integrity of the computer's operating system and applications. The registry uses a hierarchical structure to store information. The structure is comprised of six main components called subtrees (HKEY_LOCAL_MACHINE, HKEY_CLASS_ROOT, HKEY_CURRENT_USER, HKEY_USERS and HKEY_DYN_DATA). Each subtree is made up of subkeys. The subkeys contained in each subtree may also contain subkeys or they may contain active keys. It is the active keys that store the actual values associated with a particular application.
Out of the six subtrees located in the Windows registry, just two contain 90% of the data used by the registry (HKEY_LOCAL_MACHINE and HKEY_USER). The remaining subtrees (with the exception of the HKEY_DYN_DATA) are actually aliases that contain a copy of the contents of the other two keys. All information stored in the registry by an AutoLISP application should be done so in either the HKEY_LOCAL_MACHINE or HKEY_USER.
In addition to the Visual LISP IDE integrated into the AutoCAD environment, Autodesk has also provided the AutoCAD application developer with a second IDE (VBA) for developing applications. Although, AutoLISP is a powerful programming language for developing AutoCAD applications, VBA has the ability to create GUI interfaces much easier and faster than DCL. Because of Visual LISP's ability to incorporate other programming languages, the developer can create the GUI portion of an application with VBA and exchange data between VBA and AutoLISP components.
No comments:
Post a Comment