home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv4.zip / VACPP / IBMCPP / HELP / GPI1.INF (.txt) < prev    next >
OS/2 Help File  |  1995-03-14  |  24KB  |  671 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
  3.  
  4. First Edition (October 1994) 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions, therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for technical information about IBM products should be made to your 
  27. IBM authorized reseller or IBM marketing representative. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
  31.  
  32. COPYRIGHT LICENSE: This publication contains printed sample application 
  33. programs in source language, which illustrate OS/2 programming techniques. You 
  34. may copy, modify, and distribute these sample programs in any form without 
  35. payment to IBM, for the purposes of developing, using, marketing or 
  36. distributing application programs conforming to the OS/2 application 
  37. programming interface. 
  38.  
  39. Each copy of any portion of these sample programs or any derivative work, which 
  40. is distributed to others, must include a copyright notice as follows: "(C) 
  41. (your company name) (year).  All rights reserved." 
  42.  
  43. (C) Copyright International Business Machines Corporation 1994. All rights 
  44. reserved. 
  45. Note to U.S. Government Users - Documentation related to restricted rights - 
  46. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  47. Schedule Contract with IBM Corp. 
  48.  
  49.  
  50. ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
  51.  
  52. References in this publication to IBM products, programs, or services do not 
  53. imply that IBM intends to make these available in all countries in which IBM 
  54. operates. Any reference to an IBM product, program or service is not intended 
  55. to state or imply that only IBM's product, program, or service may be used. Any 
  56. functionally equivalent product, program, or service that does not infringe any 
  57. of IBM's intellectual property rights or other legally protectable rights may 
  58. be used instead of the IBM product, program, or service. Evaluation and 
  59. verification of operation in conjunction with other products, programs, or 
  60. services, except those expressly designated by IBM, are the user's 
  61. responsibility. 
  62.  
  63. IBM may have patents or pending patent applications covering subject matter in 
  64. this document. The furnishing of this document does not give you any license to 
  65. these patents. You can send license inquiries, in writing, to the IBM Director 
  66. of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood NY 10594, U.S.A. 
  67.  
  68.  
  69. ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
  70.  
  71. The following terms are trademarks of the IBM Corporation in the United States 
  72. or other countries: 
  73.  
  74. IBM
  75. PM
  76. Presentation Manager
  77. OS/2
  78. SAA
  79. System Application Architecture
  80. Workplace Shell
  81.  
  82. The following terms are trademarks of other companies: 
  83.  
  84.  C++                 AT&T, Inc. 
  85.  Helvetica           Linotype 
  86.  
  87.  
  88. ΓòÉΓòÉΓòÉ 1.4. Double-Byte Character Set (DBCS) ΓòÉΓòÉΓòÉ
  89.  
  90. Throughout this publication, you will see references to specific value for 
  91. character strings. The values are for single-byte character set (SBCS). If you 
  92. use the double-byte character set (DBCS), note that one DBCS character equals 
  93. two SBCS characters. 
  94.  
  95.  
  96. ΓòÉΓòÉΓòÉ 2. How to Use the GPI Guide and Reference ΓòÉΓòÉΓòÉ
  97.  
  98. This reference is a detailed technical guide and reference for application 
  99. programmers. It gives reference information and code examples to enable you to 
  100. write source code using Graphical Programming Interface functions. 
  101.  
  102. Before you begin to use this information, it would be helpful to understand how 
  103. you can: 
  104.  
  105.    o  Expand the Contents to see all available topics 
  106.    o  Obtain additional information for a highlighted word or phrase 
  107.    o  Use action bar choices 
  108.    o  Use the programming information. 
  109.  
  110.  How to Use the Contents 
  111.  
  112.  When the Contents window first appears, some topics have a plus (+) sign 
  113.  beside them. The plus sign indicates that additional topics are available. 
  114.  
  115.  To expand the Contents if you are using a mouse, click on the plus sign. If 
  116.  you are using the keyboard, use the Up or Down Arrow key to highlight the 
  117.  topic, and press the plus (+) key. For example, Code Pages has a plus sign 
  118.  beside it. To see additional topics for that heading, click on the plus sign 
  119.  or highlight that topic and press the plus (+) key. 
  120.  
  121.  To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  122.  to highlight the topic, and then press the Enter key). 
  123.  
  124.  How to Obtain Additional Information 
  125.  
  126.  After you select a topic, the information for that topic appears in a window. 
  127.  Highlighted words or phrases indicate that additional information is 
  128.  available. You will notice that certain words and phrases are highlighted in 
  129.  green letters, or in white letters on a black background. These are called 
  130.  hypertext terms. If you are using a mouse, double-click on the highlighted 
  131.  word. If you are using a keyboard, press the Tab key to move to the 
  132.  highlighted word, and then press the Enter key. Additional information then 
  133.  appears in a window. 
  134.  
  135.  How to Use Action Bar Choices 
  136.  
  137.  Several choices are available for managing information presented in the 
  138.  Graphics Programming Interface Programming Reference. There are three 
  139.  pull-down menus on the action bar:  the Services menu, the Options menu, and 
  140.  the Help menu. 
  141.  
  142.  The actions that are selectable from the Services menu operate on the active 
  143.  window currently displayed on the screen. These actions include the following: 
  144.  
  145.  Bookmark 
  146.     Allows you to set a placeholder so you can retrieve information of interest 
  147.     to you. 
  148.  
  149.     When you place a bookmark on a topic, it is added to a list of bookmarks 
  150.     you have previously set. You can view the list, and you can remove one or 
  151.     all bookmarks from the list. If you have not set any bookmarks, the list is 
  152.     empty. 
  153.  
  154.     To set a bookmark, do the following: 
  155.  
  156.    1. Select a topic from the Contents. 
  157.  
  158.    2. When that topic appears, choose the Bookmark option from the Services 
  159.       pull-down. 
  160.  
  161.    3. If you want to change the name used for the bookmark, type the new name 
  162.       in the field. 
  163.  
  164.    4. Click on the Place radio button (or press the Up or Down Arrow key to 
  165.       select it). 
  166.  
  167.    5. Click on OK (or select it and press Enter). The bookmark is then added to 
  168.       the bookmark list. 
  169.  
  170.  Search 
  171.     Allows you to find occurrences of a word or phrase in the current topic, 
  172.     selected topics, or all topics. 
  173.  
  174.     You can specify a word or phrase to be searched. You can also limit the 
  175.     search to a set of topics by first marking the topics in the Contents list. 
  176.  
  177.     To search for a word or phrase in all topics, do the following: 
  178.  
  179.    1. Choose the Search option from the Services pull-down. 
  180.  
  181.    2. Type the word or words to be searched for. 
  182.  
  183.    3. Click on All sections (or press the Up or Down Arrow keys to select it). 
  184.  
  185.    4. Click on Search (or select it and press Enter) to begin the search. 
  186.  
  187.    5. The list of topics where the word or phrase appears is displayed. 
  188.  
  189.  Print 
  190.     Allows you to print one or more topics. You can also print a set of topics 
  191.     by first marking the topics in the Contents list. 
  192.  
  193.     To print the document Contents list, do the following: 
  194.  
  195.    1. Choose Print from the Services pull-down. 
  196.  
  197.    2. Click on Contents (or press the Up or Down Arrow key to select it). 
  198.  
  199.    3. Click on Print (or select it and press Enter). 
  200.  
  201.    4. The Contents list is printed on your printer. 
  202.  
  203.  Copy 
  204.     Allows you to copy a topic that you are viewing to the System Clipboard or 
  205.     to a file that you can edit. You will find this particularly useful for 
  206.     copying syntax definitions and program samples into the application that 
  207.     you are developing. 
  208.  
  209.     You can copy a topic that you are viewing in two ways: 
  210.  
  211.    o  Copy copies the topic that you are viewing into the System Clipboard. If 
  212.       you are using a Presentation Manager editor (for example, the System 
  213.       Editor) that copies or cuts (or both) to the System Clipboard, and pastes 
  214.       to the System Clipboard, you can easily add the copied information to 
  215.       your program source module. 
  216.  
  217.    o  Copy to file copies the topic that you are viewing into a temporary file 
  218.       named TEXT.TMP. You can later edit that file by using any editor. You 
  219.       will find TEXT.TMP in the directory where your viewable document resides. 
  220.  
  221.       To copy a topic, do the following: 
  222.  
  223.         1. Expand the Contents list and select a topic. 
  224.  
  225.         2. When the topic appears, choose Copy to file from the Services 
  226.            pull-down. 
  227.  
  228.         3. The system puts the text pertaining to that topic into the temporary 
  229.            file named TEXT.TMP. 
  230.  
  231.     For information on one of the other choices in the Services pull-down, 
  232.     highlight the choice and press the F1 key. 
  233.  
  234.  The actions that are selectable from the Options menu allow you to change the 
  235.  way your Contents list is displayed. To expand the Contents and show all 
  236.  levels for all topics, choose Expand all from the Options pull-down. You can 
  237.  also press the Ctrl and * keys together. For information on one of the other 
  238.  choices in the Options pull-down, highlight the choice and press the F1 key. 
  239.  
  240.  The actions that are selectable from the Help menu allow you to select 
  241.  different types of help information. You can also press the F1 key for help 
  242.  information about the Information Presentation Facility (IPF). 
  243.  
  244.  How to Use the Programming Information 
  245.  
  246.  This document consists of guide and reference information that provides a 
  247.  detailed description of each function, message, constant, and data type. It 
  248.  provides language-dependent information about the functions which enable the 
  249.  user to generate call statements in the C Language. 
  250.  
  251.  Graphical Programming Interface programming information is presented by 
  252.  component, such as Graphics Functions, Graphics Orders, and Data Types, for 
  253.  example: 
  254.  
  255.        ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  256.        Γöé            Contents                     Γöé
  257.        Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  258.        Γöé                                         Γöé
  259.        Γöé  + Graphics Functions                   Γöé
  260.        Γöé  + Graphics Orders                      Γöé
  261.        Γöé  + Data Types                           Γöé
  262.        Γöé                                         Γöé
  263.        ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  264.  
  265.  By clicking on the plus sign beside "Graphics Functions", you see an 
  266.  alphabetic list of the Graphical Programming Interface functions. Selecting a 
  267.  function takes you directly into the reference information for that function. 
  268.  
  269.  Units of reference information are presented in selectable multiple windows or 
  270.  viewports. A viewport is a Presentation Manager window that can be sized, 
  271.  moved, minimized, maximized, or closed. By selecting a unit (in this case, an 
  272.  entry on the Contents list), you will see two windows displayed: 
  273.  
  274.      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  275.      Γöé Unit Title         Γöé      Selection Title     Γöé
  276.      Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  277.      Γöé Select an item     Γöé                          Γöé
  278.      Γöé                    Γöé                          Γöé
  279.      Γöé Syntax             Γöé                          Γöé
  280.      Γöé Returns            Γöé                          Γöé
  281.      Γöé Notes              Γöé                          Γöé
  282.      Γöé Example Code       Γöé                          Γöé
  283.      Γöé Related Functions  Γöé                          Γöé
  284.      Γöé Glossary           Γöé                          Γöé
  285.      Γöé                    Γöé                          Γöé
  286.      ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  287.  
  288.  The window on the left is the primary window. It contains a list of items that 
  289.  are always available to you. The window on the right is the secondary window. 
  290.  It contains a "snapshot" of the unit information. For reference units (that 
  291.  is, function descriptions), this window contains the Function Syntax. 
  292.  
  293.  All of the information needed to understand a reference unit (or topic) is 
  294.  readily available to you through the primary window. The information is 
  295.  divided into discrete information groups, and only the appropriate information 
  296.  group appears for the topic that you are viewing. 
  297.  
  298.  The information groups for a reference unit (that is, a function description) 
  299.  can include all or some of the following: 
  300.  
  301.    o  Syntax 
  302.    o  Parameters 
  303.    o  Returns 
  304.    o  Errors 
  305.    o  Notes 
  306.    o  Example Code 
  307.    o  Related Functions 
  308.    o  Graphic Elements and Orders 
  309.    o  Glossary 
  310.  
  311.  This list may vary. Some topics may be omitted when they do not apply. 
  312.  
  313.  Information groups are displayed in separate viewports that are stacked in a 
  314.  third window location that overlaps the secondary window. By selecting an item 
  315.  (information group) in the primary window, the item is displayed in the third 
  316.  window location, as follows: 
  317.  
  318.    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  319.    Γöé Unit Title     Γöé   Selection Γöé   Glossary       Γöé
  320.    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  321.    Γöé Select an item Γöé             Γöé Select a startingΓöé
  322.    Γöé                Γöé             Γöé letter of        Γöé
  323.    Γöé    .           Γöé             Γöé glossary terms   Γöé
  324.    Γöé    .           Γöé             Γöé                  Γöé
  325.    Γöé    .           Γöé             Γöé A    N           Γöé
  326.    Γöé    .           Γöé             Γöé B    O           Γöé
  327.    Γöé    .           Γöé             Γöé C    P           Γöé
  328.    Γöé Glossary       Γöé             Γöé .    .           Γöé
  329.    Γöé                Γöé             Γöé .    .           Γöé
  330.    Γöé                Γöé             Γöé .    .           Γöé
  331.    Γöé                Γöé             Γöé M    Z           Γöé
  332.    ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  333.  
  334.  By selecting successive items from the primary window, additional windows are 
  335.  displayed on top of the previous windows displayed in the third window 
  336.  location. For example, in a function description, Parameters and Return Values 
  337.  are items listed in the primary window. When selected, they appear one on top 
  338.  of the other in the third window location. Because of this, you may move the 
  339.  first selected (topmost) window to the left before selecting the next item. 
  340.  This allows simultaneous display of two related pieces of information from the 
  341.  "stack" of windows in the third window location, as follows: 
  342.  
  343.    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  344.    Γöé Unit Title     Γöé  Parameters  Γöé  Return Values  Γöé
  345.    Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  346.    Γöé Select an item Γöé              Γöé                 Γöé
  347.    Γöé    .           Γöé              Γöé                 Γöé
  348.    Γöé    .           Γöé              Γöé                 Γöé
  349.    Γöé    .           Γöé              Γöé                 Γöé
  350.    Γöé Returns        Γöé              Γöé                 Γöé
  351.    Γöé Errors         Γöé              Γöé                 Γöé
  352.    Γöé    .           Γöé              Γöé                 Γöé
  353.    Γöé    .           Γöé              Γöé                 Γöé
  354.    Γöé    .           Γöé              Γöé                 Γöé
  355.    Γöé                Γöé              Γöé                 Γöé
  356.    ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  357.  
  358.  Each window can be individually closed from its system menu. All windows are 
  359.  closed when you close the primary window. 
  360.  
  361.  Some secondary windows may have the appearance of a split screen. For example, 
  362.  an illustration may appear in the left half of the window, and scrollable, 
  363.  explanatory information may appear in the right half of the window. Because 
  364.  illustrations may not necessarily fit into the small window size on your 
  365.  screen, you may maximize the secondary window for better readability. 
  366.  
  367.  
  368. ΓòÉΓòÉΓòÉ 2.1. Conventions Used in this Reference ΓòÉΓòÉΓòÉ
  369.  
  370. The purpose of this reference is to give information about functions, 
  371. constants, and data types. It provides information about the functions which 
  372. enables the user to call functions in the C programming language. 
  373.  
  374. The following information is provided: 
  375.  
  376.    o  The syntax and parameters for each function. 
  377.    o  The syntax of each data type and structure 
  378.  
  379.  
  380. ΓòÉΓòÉΓòÉ 2.2. Notation Conventions ΓòÉΓòÉΓòÉ
  381.  
  382. The following notation conventions are used in this reference: 
  383.  
  384.  NULL                  The term NULL applied to a parameter is used to indicate 
  385.                        the presence of the pointer parameter, but with no 
  386.                        value. 
  387.  
  388.  NULLHANDLE            The term NULLHANDLE applied to a parameter is used to 
  389.                        indicate the presence of the handle parameter, but with 
  390.                        no value. 
  391.  
  392.  Implicit Pointer      If no entry for a data type "Pxxxxxxx" is found in Data 
  393.                        Types, then it is implicitly a pointer to the data type 
  394.                        "xxxxxxx". See Implicit Pointer Data Types for more 
  395.                        information about implicit pointers. 
  396.  
  397.  Constant Names        All constants are written in uppercase to match the 
  398.                        header files. Where applicable, constant names have a 
  399.                        prefix derived from the name of a function, message, or 
  400.                        idea associated with the constant. For example: 
  401.  
  402.       WM_CREATE     Window message 
  403.       SV_CXICON     System value 
  404.       CF_TEXT       Clipboard format. 
  405.  
  406.                        In this reference, references to a complete set of 
  407.                        constants with the same prefix is written as shown in 
  408.                        the following examples: 
  409.  
  410.       Window message  WM_* 
  411.       System value    SV_* 
  412.  
  413.  Parameters and Fields Function parameters and data structure fields are shown 
  414.                        in italics. 
  415.  
  416.  
  417. ΓòÉΓòÉΓòÉ 2.3. Conventions Used in Function Descriptions ΓòÉΓòÉΓòÉ
  418.  
  419. The documentation of each function contains the following sections: 
  420.  
  421.  Syntax 
  422.       The function syntax describes the C-language calling syntax of the 
  423.       function and gives a brief description. 
  424.  
  425.       Programming Note 
  426.                         The functions in this book are spelled in mixed-case 
  427.                         for readability but are known to the system as 
  428.                         uppercase character strings. For example, the function 
  429.                         "GPIBeginArea" is actually the external name 
  430.                         "GPIBEGINAREA". 
  431.  
  432.       If you are using a compiler that generates a mixed-case external name, 
  433.       you should code the functions in uppercase. 
  434.  
  435.  Parameters 
  436.       Each parameter is listed with its C-language data type, parameter type, 
  437.       and a brief description. 
  438.  
  439.    o  All data types are written in uppercase to match the header files. A data 
  440.       type of "Pxxxxxxx" implicitly defines a pointer to the data type 
  441.       "xxxxxxx". 
  442.  
  443.       The term NULL applied to a parameter indicates the presence of the 
  444.       parameter, with no value. 
  445.  
  446.       Refer to Data Types for a complete list of all data types and their 
  447.       descriptions. 
  448.  
  449.    o  There are three parameter types: 
  450.  
  451.            Input         Specified by the programmer. 
  452.            Output        Returned by the function. 
  453.            Input/Output  Specified by the programmer and modified by the 
  454.                          function. 
  455.  
  456.    o  A brief description is provided with each parameter. Where appropriate, 
  457.       restrictions are also included. In some cases, the parameter points to a 
  458.       structure. 
  459.  
  460.  Returns 
  461.       A list of possible return codes or errors (when appropriate) is included 
  462.       in this section. Some functions do not have return codes. Refer to Error 
  463.       Number and Name for a list of error codes and their numerical values, and 
  464.       Error Name and Explanation for a list of error codes and their 
  465.       descriptions. 
  466.  
  467.  Remarks 
  468.       This section contains additional information about the function, when 
  469.       required. 
  470.  
  471.  Related Functions 
  472.       This list shows the functions (if any) that are related to the function 
  473.       being described. 
  474.  
  475.  Example Code 
  476.       An example of how the function can be used is shown in C language. 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 2.4. Error Severities ΓòÉΓòÉΓòÉ
  480.  
  481. Each of the error conditions given in the list of errors for each function 
  482. falls into one of these areas: 
  483.  
  484.  Warning 
  485.     The function detected a problem, but took some remedial action that enabled 
  486.     the function to complete successfully. The return code in this case 
  487.     indicates that the function completed successfully. 
  488.  
  489.  Error 
  490.     The function detected a problem for which it could not take any sensible 
  491.     remedial action. The system has recovered from the problem, and the state 
  492.     of the system, with respect to the application, remains the same as at the 
  493.     time when the function was requested. The system has not even partially 
  494.     executed the function (other than reporting the error). 
  495.  
  496.  Severe Error 
  497.     The function detected a problem from which the system could not reestablish 
  498.     its state, with respect to the application, at the time when that function 
  499.     was requested; that is, the system partially executed the function. This 
  500.     necessitates the application performing some corrective activity to restore 
  501.     the system to some known state. 
  502.  
  503.  Unrecoverable Error 
  504.     The function detected some problem from which the system could not 
  505.     re-establish its state, with respect to the application, at the time when 
  506.     that call was issued. It is possible that the application cannot perform 
  507.     some corrective action to restore the system to some known state. 
  508.  
  509.  The WinGetLastError and WinGetErrorInfo functions can be used to find out more 
  510.  about an error (or warning) that occurs as a result of executing a call. 
  511.  
  512.  
  513. ΓòÉΓòÉΓòÉ 2.5. Header Files ΓòÉΓòÉΓòÉ
  514.  
  515. All functions require an "#include" statement for the system header file OS2.H: 
  516.  
  517.  
  518. #include  <OS2.H>
  519.  
  520. Most functions also require a "#define" statement to select an appropriate 
  521. (conditional) section of the header file, and hence, the required prototype. 
  522. Where this is necessary, it is shown at the head of the function definition in 
  523. the form: 
  524.  
  525.  
  526. #define   INCL_name
  527.  
  528. Note:  These "#define" statements must precede the "#include <OS2.H>" 
  529.        statement. 
  530.  
  531.  
  532. ΓòÉΓòÉΓòÉ 2.6. Addressing Elements in Arrays ΓòÉΓòÉΓòÉ
  533.  
  534. Constants defining array elements are given values that are zero-based in C; 
  535. that is, the numbering of the array elements starts at zero, not one. 
  536.  
  537. For example, in the DevQueryCaps function, the sixth element of the alArray 
  538. parameter is CAPS_HEIGHT, which is equated to 5. 
  539.  
  540. Count parameters related to such arrays always mean the actual number of 
  541. elements available; therefore, again using the DevQueryCaps function as an 
  542. example, if all elements up to and including CAPS_HEIGHT are provided for, 
  543. lCount could be set to (CAPS_HEIGHT+1). 
  544.  
  545. In functions for which the starting array element can be specified, this is 
  546. always zero-based, and so the C element number constants can be used directly. 
  547. For example, to start with the CAPS_HEIGHT element, the DevQueryCaps parameter 
  548. can be set to CAPS_HEIGHT. 
  549.  
  550.  
  551. ΓòÉΓòÉΓòÉ 2.7. Implicit Pointer Data Types ΓòÉΓòÉΓòÉ
  552.  
  553. A data type name beginning with "P" (for example, PERRORCODE) is likely to be a 
  554. pointer to another data type (in this instance, ERRORCODE). 
  555.  
  556. In the data type summary, Data Types, no explicit "typedefs" are shown for 
  557. pointers; therefore, if no data type definition can be found in the summary for 
  558. a data type name "Pxxxxxx", it represents a pointer to the data type "xxxxxx", 
  559. for which a definition should be found in the reference. 
  560.  
  561. The implicit type definition needed for such a pointer "Pxxxxxx" is: 
  562.  
  563.  
  564. typedef xxxxxx *Pxxxxxx;
  565.  
  566. Such definitions are provided in the header files. OS2.H. 
  567.  
  568.  
  569. ΓòÉΓòÉΓòÉ 2.8. Storage Mapping of Data Types ΓòÉΓòÉΓòÉ
  570.  
  571. The storage mapping of the data types is dependent on the machine architecture. 
  572. To be portable, applications must access the data types using the definitions 
  573. supplied for the environment in which they will execute. 
  574.  
  575.  
  576. ΓòÉΓòÉΓòÉ 2.9. Double-Byte Character Set (DBCS) ΓòÉΓòÉΓòÉ
  577.  
  578. Throughout this publication, you will see references to specific value for 
  579. character strings. The values are for single-byte character set (SBCS). If you 
  580. use the double-byte character set (DBCS), note that one DBCS character equals 
  581. two SBCS characters. 
  582.  
  583.  
  584. ΓòÉΓòÉΓòÉ 2.10. Programming Considerations ΓòÉΓòÉΓòÉ
  585.  
  586. This section provides information you need to consider before you begin 
  587. programming with GPI functions. 
  588.  
  589.  
  590. ΓòÉΓòÉΓòÉ 2.10.1. Stack Size ΓòÉΓòÉΓòÉ
  591.  
  592. Existing 16-bit applications (small and tiny models) must have a 4KB stack 
  593. available when they enter system calls; otherwise, the stack can overflow into 
  594. the data area. 
  595.  
  596.  
  597. ΓòÉΓòÉΓòÉ 2.10.2. Presentation Manager ΓòÉΓòÉΓòÉ
  598.  
  599. The Presentation Manager component of the OS/2* operating system is based on 
  600. the IBM Systems Application Architecture* (SAA*) Common Programming Interface-a 
  601. an architecture for the design and development of applications. 
  602.  
  603. The Presentation Manager component implements the Common User Access* (CUA*) 
  604. interface, which you can use to attain consistency in the appearance and 
  605. behavior of your applications. 
  606.  
  607.  
  608. ΓòÉΓòÉΓòÉ 2.10.3. C++ Considerations ΓòÉΓòÉΓòÉ
  609.  
  610. This section contains several topics you should take into consideration if you 
  611. are using C++ **. 
  612.  
  613.  
  614. ΓòÉΓòÉΓòÉ 2.10.3.1. C++ Header Files ΓòÉΓòÉΓòÉ
  615.  
  616. OS/2 functions that used to take a PSZ as a parameter, and that do not modify 
  617. the contents of the passed string, have been updated in the C++ header files to 
  618. take a PCSZ data type parameter. The use of PCSZ allows for better optimization 
  619. by the compiler and is more semantically compatible with C++. Existing code 
  620. that calls functions that use PSZ will continue to work correctly. 
  621.  
  622. Several of the typedefs have been changed in the C++ header files. For example, 
  623. many items that are unsigned char in the C header files are char in the C++ 
  624. header files. For instance, 
  625.  
  626.  
  627. typedef unsigned char BYTE;
  628.  
  629. has changed to 
  630.  
  631.  
  632. typedef char BYTE;
  633.  
  634. The existing samples that are included in the IBM Developer's Toolkit for OS/2 
  635. Warp, Version 3 can be used with either set of the header files. 
  636.  
  637.  
  638. ΓòÉΓòÉΓòÉ 2.10.3.2. PCSZ Data Type ΓòÉΓòÉΓòÉ
  639.  
  640. Note:  The PCSZ data type is defined in the C++ header files included with this 
  641.        product. The use of the "const" keyword is not necessarily specific to 
  642.        C++. Certain C compilers support it as well. 
  643.  
  644.  If a function takes as a parameter a string that is not changed by the 
  645.  function, the string parameter can be declared as a "const" string, or a PCSZ. 
  646.  PCSZ is defined in the C++ header files as a "const" pointer to a 
  647.  NULL-delimited string. The "const" means that the function will not change the 
  648.  contents of the string. 
  649.  
  650.  Declaring the parameter as PCSZ informs the C++ compiler that the function 
  651.  will not change the string. Therefore, the compiler simply passes a pointer to 
  652.  the string in the function parameter list. If the parameter is declared as a 
  653.  normal PSZ (not "const"), the compiler assumes that the function might change 
  654.  the string. Under these circumstances the compiler will add code to make a 
  655.  copy of the string then pass a pointer to the copy, rather than pass a pointer 
  656.  to the original string. 
  657.  
  658.  A smaller, faster executable is often produced if the data item passed in a 
  659.  parameter list is declared as "const". 
  660.  
  661.  If the data item is declared as "const" then it must not be changed by the 
  662.  function. 
  663.  
  664.  
  665. ΓòÉΓòÉΓòÉ 2.10.3.3. LINK386 ΓòÉΓòÉΓòÉ
  666.  
  667. The C++ compiler will provide a dynamic link library which is be used by 
  668. LINK386 when generating error messages. This DLL will convert a compiler 
  669. generated mangled name into the function prototype. If the DLL is not present, 
  670. an error message will be displayed and LINK386 will display the 
  671. compiler-generated mangled name in error messages.