The Magazine for C/S and Internet-Programming 01/2000 US$ 25.00 SOFTWARE DEVELOPMENT TECHNIQUES Support VO meets Flagship Owner Drawn Menus Database: Compound Storage Xbase++: WEB Application Adapter II INHALTSVERZEICHNIS Ralf Saborowski Michael Zech OLE Compound Storage 4 From relational to object- OLE Structured Storage or “How to keep oriented data structures 34 all DBFs and indexes of an application Since most developers today must con- within one file” sider existing data, converting relational data structures to an object-oriented approach has significant meaning for Jan V. Balek those converting to Jasmine. This article discusses conversion considerations, E-Mails with FlagShip 9 beginning with the well-known and loved Everyone wants the ability to send individ- DBF files. ual and group eMail directly from the existing database programs.. Michael Zech Jasmine Script Utility Uwe Holz 40 The Jasmine Script Utility is intended to CGI-Applikationen for Linux 12 support developers during the conversion More and more developers of Internet of existing data structures to an object-ori- applications are confronted by their cus- ented class design. tomers with the demand for a Linux ver- Traps, Tips n’ Tricks sion. That is, since Linux is a modified 41 version of UNIX, this is the sturdiest plat- form for Internet servers Erik Wynn Georg S. Lorrig Xbase++ SL 2 – eMail in Ihrer Applikation 43 first taste 19 This paper describes how to add auto- Shortly before this issue was sent to the matic email capabilities to your applica- press, Service Level 2 for Xbase++ was tion. SMTP will be presented, and we will released. It brings in new functionality as discuss how to build an ActiveX server well as substantial performance gains. which communicates with SMTP servers. Dieter Stelzner Ivo Wessel Web Application Adaptor CA-VO:Projekt “VO-SDT” 51 (2. Teil) 21 After the article on SplitWindows, ListView The WAA of Alaska provides classes to and TreeView controls in the last issue, create dynamic HTML pages with forms this article is dedicated to advanced tech- and edit controls. niques for programming of the two later- mentioned control classes. These play Rod da Silva an even larger role in modern applica- tions, but they also must be correctly Undocumented VO 27 implemented, so that they demonstrate 5333, Heeelllllppp their complete efficiency and usefulness. Dieter Crispien Cool new Menues(2) 32 In this issue, I want to demonstrate how one can display both text and bitmaps in a menu entry. One is then fully prepared for the fashionable innovations, which Office97 has made familiar. INHALTSVERZEICHNIS Preview 2/2000 Dear Reader For this issue of "Software Development Techniques", we have reworked the layout of the magazine to fit changing times. We hope that you will find SDT easier read because of these chan- ges. At this point, I would like to thank our GUI Pope, Ivo SQL Wessel, who, through long and heart-felt discussions, convinced ClassMate hands on us of the need for some changes. TreeListView CAYMan Techniques Keyword Changes: Windows-Filesystem Clandestinely, quietly, service releases of CA-Visual Objects are Clipper still appearing. While other world-shaking companies of every size and color sing an anthem with every minor product adjust- ment, Computer Associates goes their own way. A quick mes- sage in their new WEB-Forum announced the availability of the Impressum 2.5a1 patch, which can be downloaded from ftp://ftp.cai.com/pub/vo. Editors and Publisher: VOCA GmbH Keyword Web-Forum: Grossviehbergstr. 48A Controversially, Computer Associates cut their association with 91213 Hersbruck CompuServe last year. Many of our readers suddenly lost their Germany most important source of information and support.. Computer Tel.: +49-9151-8181-41 Associates reacted to the situation and setup a peer-to-peer solu- Fax: +49-151-8181-42 tion. Aware users threw themselves on this new forum, which is quite easily reached from the Internet, and the culture shock began. Http://www.vocager.de Say what one will about CompuServe, its organization and accessibility were extremely good when compared with this somewhat exotic solution, which Computer Associates has cre- Authors 1/2000: ated for us. VOCA attacked this problem immediately, and as of Jan V. Balek December had begun development of the CAYMan OffLine Dieter Crispien Reader. The first release now lies behind us, and VOCA quite Uwe Holz excited about how the users are responding to it. Georg S. Lorrig This issue's CD includes a free 30-day trial version. With Ralf Saborowski Computer Associates-World and C.A.R.E. approaching, we Rod da Silva wanted to report our new SDT concept and the development of Dieter Stelzner CAYMan. Ivo Wessel Erik Wynn Finally, heart-felt congratulations to Mr. Jürgen Goschke, as Michael Zech the winner of the trip to CA-World. Please, enjoy reading your SDT, Titlepage: Meinhard Schnoor-Matriciani C. Leithold [VOCA GmbH, Germany] N. Pfleger [ WAM Dortmund ] Ralf Saborowski Working with Compound files The functions to create and manipulate Compound files are con- OLE Structured Storage or “How to keep tained in dynamic link libraries Ole2.dll and Storage.dll. all DBFs and indexes of an application wit- Functions to create and open a Compound File are StgCreateDocfile() and StgOpenstorage(). Both functions expect hin one file” a set of parameters including the name of the Compound File. A typical call to create a new Compound File looks as follows: StgCreateDocFile(; OLE Structured Storage with CA-Visual PTR(_CAST,; Multi2Wide(cStorage)),; Objects was not given much attention _OR(STGM_READWRITE,STGM_SHARE_EXCLUSIVE),; until now. It is a very good example of 0,; native COM programming with CA- @pStg) Visual Objects and it opens quite intere- sting programming solutions. This arti- The first parameter is the name of the file to be created. Note cle explains the concept behind OLE that this parameter has to be passed not as a character string or Structured Storage and has an example PSZ but as a pointer to a wide character (Unicode) string. This of how to ‘twist’ the CA-Visual Objects applies to all file names used with Compound Files. Runtime RDDs to make them store database files functions Multi2Wide() and Wide2Multi() in the system library in OLE Compound Files. A Compound provide conversion between wide character (Unicode) and single File Viewer that enables to view the character strings. The second parameter specifies the mode, in structure of OLE Compound Files will be which the created file has to be opened. In this case we open it presented. for exclusive read and write access. Compound files can also be opened for shared access and in a so-called transaction mode. There are actually two motives behind this article. On one hand The last two modes are hardly recommended with the current I wanted to be able to keep all DBF and index files of an appli- implementation of the Storage.dll. The Compound File specifi- cation in one large file since the time I was a Clipper developer, cation allows shared file access, however with the current imple- thus for more then ten years. The mere sight of a directory with mentation it is only possible to open components of a dozens of DBF and NTX files (composite indexes were not Compound File exclusively, even if the Compound File itself is available with Clipper Summer 87) felt like cold shower running opened in shared mode. So in reality a Compound File opened down my back. This accumulation of files somehow appeared in shared mode will only permit several users to have simultane- more vulnerable to me than a single file. First it was possible to ous exclusive access to different components within the file. overlook a missing file during application backup or transfer. If a Compound File is opened for shared access, the trans- Second end users could easily open and manipulate files with action mode can be indicated in addition. It allows to roll back tools like dBase and even corrupt data. to the initial state after a set of operations. Since contents of the The concept of OLE Structured Storage exists since the Compound File are copied to a TEMP directory during transac- introduction of OLE 2.0 in Windows 3.1. What hides behind tions and there are no mechanisms for conflict recovery during this term? One of the central characteristics of OLE 2.0 is the a commit, this mode has little practical importance. ability to embed documents in other documents. For example The third parameter of the StgCreateDocFILE() call is reser- Excel table can be embedded in a Word document. The Excel ved and set to a NULL_POINTER. The fourth parameter final- table in turn can contain further documents like sound files or a ly takes us closer to the true nature of the storage API. It is pas- complete PowerPoint presentation. sed by reference and receives a COM interface for the created This kind of complex document (also called Compound storage object if the function call was successful (return value is Document) organization required a new persistent storage S_OK = 0). All further access to the compound file has to be mechanism. You can hardly expect the user to keep track of all done through this COM interface. individual embedded document components to safely transfer The function to open an existing compound file looks simi- the document. We only deal with embedded documents here, lar: you still have to do this with the so-called Linked documents. StgOpenStorage( Multi2Wide(cStorage),; The goal was to keep all components of a complex document in NULL_PTR, _OR(STGM_READWRITE,STGM_SHARE_EXCLUSIVE),; a single file and leave the format of the embedded files intact NULL, 0, @pStg) whenever possible.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages69 Page
-
File Size-