home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / read.me < prev    next >
Encoding:
Text File  |  1993-03-11  |  40.1 KB  |  1,268 lines

  1.    Welcome to the IBM Developer's Toolkit for OS/2
  2.    2.1.  This information has been prepared to
  3.    assist you in your application development
  4.    activities.
  5.  
  6.  
  7.  
  8. ADDITIONAL DEVELOPER INFORMATION
  9. ________________________________
  10.  
  11.    IBM participates in CompuServe forums.  If you
  12.    are online as a CompuServe member, simply type
  13.    "GO IBMOS2" at the ! prompt and you will be
  14.    provided with a menu of the available OS/2
  15.    forums.
  16.  
  17.  
  18. TOOLKIT INSTALLATION
  19. ____________________
  20.  
  21.    The toolkit installation program has been
  22.    updated to take advantage of new features in
  23.    the Workplace Shell.  The Toolkit folder on the
  24.    desktop, illustrated by the toolbox icon,
  25.    contains three other folders.  These folders
  26.    are:
  27.  
  28.    o   PM Development Tools
  29.    o   Toolkit Information
  30.    o   Sample Programs
  31.  
  32.    You may install the Toolkit for OS/2 2.1 on a
  33.    1.3 system.  The installation program will
  34.    transfer your files and update the environment
  35.    variables; however, no programs will be
  36.    registered on the desktop.
  37.  
  38.  
  39. KWIKINF UTILITY
  40. _______________
  41.  
  42.    KwikINF provides a convenient method of
  43.    accessing information in OS/2 2.1 online
  44.    documents.  Once KwikINF starts, pressing a
  45.    hot-key sequence causes the program to pop up
  46.    and search for a text string of your choice.
  47.  
  48.    You can specify three KwikINF options from the
  49.    command line.  An example of the command line
  50.    syntax follows:
  51.  
  52.             KwikINF [/C] [/T] [/?]
  53.  
  54.    where:
  55.  
  56.  
  57.              Entering KwikINF at the command
  58.              prompt with no options starts
  59.              KwikINF.  After entering this
  60.              command, the default hot-key sequence
  61.              (ALT + Q) is enabled.
  62.  
  63.    /T        Entering the /T option will terminate
  64.              KwikINF and disable the hot-key
  65.              sequence.  KwikINF will be terminated
  66.              for all active sessions.
  67.    /C        Entering the /C option will display
  68.              the "Configure KwikINF" window.  Use
  69.              the "Configure KwikINF" window to
  70.              customize KwikINF values.
  71.    /?        entering the /? will display the
  72.              following information.
  73.  
  74.                       Usage: KwikINF [Option]
  75.                        Option    Description
  76.                          /C      Configure KwikINF
  77.                          /T      Terminate KwikINF
  78.                          /?      This short help list
  79.  
  80.  
  81.    Pressing the hot-key sequence brings to the
  82.    foreground KwikINF's "Search" window.  KwikINF
  83.    will work in any of the OS/2 sessions types:
  84.    full screen, AVIO window, and PM window.  If
  85.    your application is running in a full-screen
  86.    session, an AVIO window, or an active PM window
  87.    is a multi-line entry (MLE) field, KwikINF will
  88.    retrieve the word the cursor is on and
  89.    automatically place it in the entry field of
  90.    the "Search" window.  In PM windows, you can
  91.    use the hot-key sequence to display the search
  92.    window; however, you must enter the search
  93.    string manually.  KwikINF does not pre-fill the
  94.    search string field for PM windows.  KwikINF
  95.    cannot determine the word under the cursor in
  96.    this session because it is a graphics session
  97.    and the characters are stored as bit maps
  98.    rather than as characters.
  99.  
  100.    To find information on a string, do the
  101.    following:
  102.  
  103.    o   If you are in a full-screen session, an
  104.        AVIO window, or MLE window, position the
  105.        cursor on the string you want to search
  106.        for, then press the hot-key sequence.
  107.        KwikINF retrieves the word at the cursor
  108.        and places it in the entry field of the
  109.        "Search" window.
  110.    o   If you are in a PM window or an AVIO
  111.        session, press the hot-key sequence, then
  112.        type the word to search for in the entry
  113.        field of the "Search" window.
  114.  
  115.    KwikINF then takes you to the entry for the
  116.    search string in the online document.
  117.  
  118.    NOTE: You should not add KwikINF to your
  119.    STARTUP.CMD if it is followed by an EXIT
  120.    statement.  Instead, create a KwikINF program
  121.    object.
  122.  
  123.  
  124. LINK386 UTILITY
  125. _______________
  126.  
  127.    It is recommended that the ALIGN, BASE, and
  128.    EXEPACK options be used when linking all
  129.    executables.  This will compress them in size
  130.    and improve their performance.
  131.  
  132.    Use /ALIGN:4 for 32-bit applications, /ALIGN:16
  133.    for 16-bit applications.  For .EXE files,
  134.    /BASE:0x10000 option must be used.  Any other
  135.    value produces a warning.  For .DLL files, use
  136.    /BASE:0x12000000 (or a lesser value).
  137.  
  138.  
  139. C/C++ INFORMATION
  140. _________________
  141.  
  142.    A subset of the OS/2 header files have been C++
  143.    enabled and will be installed in the
  144.    \TOOLKT21\CPLUS\OS2H subdirectory.  If you have
  145.    the IBM C/C++ Compiler installed they may be
  146.    used to compile C and/or C++ programs.  To use
  147.    them, you will have to modify the CONFIG.SYS
  148.    file as follows:
  149.  
  150.        SET INCLUDE=x:\TOOLKT21\CPLUS\OS2H;%include%
  151.    where
  152.          x is the correct disk drive
  153.      and
  154.          %include% is the existing INCLUDE= value
  155.  
  156.    If you want to use the OS/2 C++ headers to
  157.    compile the toolkit samples, you may need to
  158.    copy remaining headers that aren't C++ enabled
  159.    from the \TOOLKT21\C\OS2H directory into
  160.    \TOOLKT21\CPLUS\OS2H.
  161.  
  162. VDD INFORMATION
  163. _________________
  164.  
  165.    The VDD sample is now written in C language.
  166.    You may receive error/warning messages when
  167.    compiling this sample.
  168.  
  169.    If you include the following headers with the
  170.    OS2.H header file, you may receive warnings
  171.    regarding duplicate definitions in the
  172.    following files:
  173.  
  174.        BASEMAC.H
  175.        BASEMID.H
  176.        MI.H
  177.        MVDM.H
  178.        VDMA.H
  179.        VDMBIOS.H
  180.        VDMM.H
  181.        VDOS.H
  182.        VFDPFD.H
  183.        VKBD.H
  184.        VKBDPDD.H
  185.        VLPT.H
  186.        VMDPMD.H
  187.        VPIC.H
  188.        VPMXPORT.H
  189.        VVD.H
  190.  
  191.    The above header files are intended for
  192.    building and accessing virtual device drivers.
  193.    They should not be used to build applications
  194.    other than device drivers.
  195.  
  196. ONLINE IPF REFERENCE
  197. ____________________
  198.  
  199.    There is a dynamic link library (IPF.DLL)
  200.    associated with the compiled example of
  201.    "Application-Controlled Window Example."
  202.    However, IPF.DLL is installed with the Sample
  203.    Programs component of the Toolkit.  Therefore,
  204.    unless the Sample Programs component is
  205.    installed, you will be unable to view the
  206.    animation provided by the IPF.DLL in the
  207.    Application-Controlled Window Example in the
  208.    online IPF Reference.
  209.  
  210.  
  211. OS/2 2.0 ENHANCED EDITOR
  212. ________________________
  213.  
  214.    If you attempt to access additional information
  215.    for a text string by pressing Ctrl+H, the
  216.    following message might appear:
  217.  
  218.             epmkwhlp.ndx file not found
  219.  
  220.    To avoid this message, add the following to the
  221.    DPATH statement in CONFIG.SYS:
  222.  
  223.             x:\toolkt20\book;
  224.  
  225.        where "x" is the drive location for the Toolkit.
  226.  
  227.  
  228. SAMPLE PROGRAMS
  229. _______________
  230.  
  231.    The following sample programs are new or
  232.    enhanced for this Toolkit update.
  233.  
  234.  
  235. PALETTE MANAGER SAMPLE PROGRAM
  236.  
  237.    PALETTE MANAGER is new and demonstrates 32-bit
  238.    graphics functions including:
  239.  
  240.    o   Creating a window using a custom palette
  241.        and animation.
  242.    o   Using menus with switches, and modifying
  243.        the menu text.
  244.    o   Using multiple threads and semaphores in
  245.        the PM environment.
  246.    o   Displaying graphics on the screen using
  247.        outline fonts and clip paths.
  248.    o   On-line help.
  249.  
  250.    Requirements are a XGA adapter card fully
  251.    populated with 1 megabyte of RAM and the 32-bit
  252.    Graphics Engine.
  253.  
  254.    When started, PALETTE displays a standard
  255.    window with a large IBM logo in the foreground.
  256.    The user has the ability to change the IBM logo
  257.    to the OS/2 logo.  If the user resizes the
  258.    window, the logo is scaled and redrawn to fit
  259.    the new window size.  The user can also control
  260.    the animation speed from the PALETTE menu.
  261.  
  262.    The animation is performed by creating a clip
  263.    path which represents the outline of the logo
  264.    characters (which are displayed using an
  265.    outline font); setting the clip path to the
  266.    presentation space; and then drawing a series
  267.    of lines to the presentation space.  Each line
  268.    is drawn with an incrementing color index.
  269.    Palette animation is performed using the 32-bit
  270.    GpiAnimatePalette function call.
  271.  
  272.    In order for PALETTE to remain responsive to
  273.    system and user messages, no animation is
  274.    performed on the main window procedure thread.
  275.    A second thread is created from which all
  276.    animation is performed.
  277.  
  278.  
  279. STYLE SAMPLE PROGRAM
  280.  
  281.    STYLE has new function that demonstrates the
  282.    detection of a font that does not conform to
  283.    the International Standards Organization (ISO
  284.    9241).  When the user selects a non-compliant
  285.    font in the standard font dialog, a message box
  286.    is displayed to inform the user.
  287.  
  288.    The fsSelection field in the FONTMETRICS
  289.    structure can be tested with the following bit
  290.    to determine if the current font has been
  291.    tested for ISO conformance:
  292.  
  293.        FM_SEL_ISO9241_TESTED
  294.  
  295.    The panose.fbFailedISO field in the FONTMETRICS
  296.    structure can be tested with the following bits
  297.    to determine if the current font fails to
  298.    conform to ISO 9241 standards on specific
  299.    displays that are known to comply:
  300.  
  301.        FM_ISO_9518_640
  302.        FM_ISO_9515_640
  303.        FM_ISO_9515_1024
  304.        FM_ISO_9517_640
  305.        FM_ISO_9517_1024
  306.  
  307.    These defines and additional information can be
  308.    found in OS2DEF.H which is shipped with this
  309.    product.The path to get to the OS2DEF.H defines
  310.    is:
  311.  
  312.      x:\TOOLKT21\C\OS2H
  313.  
  314.  
  315. WPCAR SAMPLE PROGRAM
  316.  
  317.    WPCAR is the sample program that demonstrates
  318.    how to create a Workplace Shell object.   New
  319.    to WPCAR is its ability to set an exception
  320.    handler for memory access violations.  To
  321.    demonstrate this, a new menu item was added to
  322.    WPCAR that calls a function that causes an
  323.    exception.  A message indicates the program's
  324.    exception handler is returning control to the
  325.    cleanup code.
  326.  
  327.    Additional README files concerning sample
  328.    programs are available in these
  329.    directories:\TOOLKT21\C\SAMPLES\IMAGE and
  330.    \TOOLKT21\C\SAMPLES\TEMPLATE.
  331.  
  332.  
  333. WORKFRAME/2
  334. ___________
  335.  
  336.    The IBM WorkFrame/2 allows you to integrate
  337.    various tools into your application development
  338.    environment.  Tools, such as the Dialog Editor,
  339.    Font Editor, Icon Editor, Information
  340.    Presentation Facility Compiler, and Resource
  341.    Compiler, can then be selected from the "Tools"
  342.    pull-down menu of WorkFrame/2.
  343.  
  344.    This toolkit integration is optional.  To help
  345.    you add the tools into the WorkFrame
  346.    environment easily, a special file
  347.    (TOOLKT20.INI) is provided in the
  348.    \TOOLKT21\OS2BIN directory.
  349.  
  350.    To integrate the toolkit tools into the
  351.    WorkFrame/2, do the following:
  352.  
  353.    1.  After completing Toolkit installation,
  354.        install the IBM WorkFrame/2.  Make sure the
  355.        CONFIG.SYS file is updated for the
  356.        WorkFrame/2, either by selecting the
  357.        "Update CONFIG.SYS" checkbox or by updating
  358.        it manually.
  359.    2.  Reboot your computer, as specified in the
  360.        WorkFrame/2 installation procedure.
  361.    3.  At the OS/2 command line, type:
  362.  
  363.                    addtool \toolkt20\os2bin\toolkt20.ini
  364.  
  365.  
  366.    When you start WorkFrame/2 and select "Tools"
  367.    from the menu bar, entries for the five Toolkit
  368.    tools appear in a pull-down menu.
  369.  
  370.  
  371. BIDIRECTIONAL NATIONAL LANGUAGE SUPPORT
  372. _______________________________________
  373.  
  374.     Information on how to use the BIDI programming
  375.    interface can be found in
  376.    \TOOLKT21\C\SAMPLES\BIDI\READ.ME.
  377.  
  378.  
  379. DEVICE DRIVER PROGRAMMING INTERFACES
  380. ____________________________________
  381.  
  382.    The header files previously contained in the
  383.    \TOOLKT20\C\OS2H\DASD directory have been
  384.    removed.  These headers are now included in the
  385.    OS/2 Device Driver Development Kit which can be
  386.    obtained by calling 1-800-3-IBMOS2.
  387.  
  388.  
  389. CONTROL PROGRAM REFERENCE UPDATES FOR V2.1
  390. __________________________________________
  391.  
  392.    The following are new APIs were added:
  393.  
  394.    Control Program
  395.  
  396.      DosProtectClose
  397.      DosProtectEnumAttribute
  398.      DosProtectOpen
  399.      DosProtectQueryFHState
  400.      DosProtectQueryFileInfo
  401.      DosProtectRead
  402.      DosProtectSetFHState
  403.      DosProtectSetFileInfo
  404.      DosProtectSetFileLocks
  405.      DosProtectSetFilePtr
  406.      DosProtectSetFileSize
  407.      DosProtectWrite
  408.  
  409.    Presentation Manager
  410.  
  411.      WinCheckInput
  412.      WinLockPointerUpdate
  413.      WinLockupSystem
  414.      WinQuerySysPointerData
  415.      WinQueryVisibleRegion
  416.      WinSetPointerOwner
  417.      WinSetSysPointerData
  418.      WinSetVisibleRegionNotify
  419.      WinUnlockSystem
  420.  
  421.    Workplace Shell methods/Classes
  422.  
  423.      wpAddPowerPage
  424.      wpAddPowerViewPage
  425.      WPBitmap
  426.      wpChangePowerState
  427.      WPCommandFile
  428.      wpEjectDisk
  429.      WPIcon
  430.      wpLockDrive
  431.      WPPointer
  432.      WPPower (class)
  433.      wpQueryAssociatedProgram
  434.      wpQueryAutoRefresh
  435.      wpQueryConcurrentView
  436.      wpQueryDefStatusView
  437.      wpQueryDriveLockStatus
  438.      wpQueryPowerConfirmation
  439.      wpQueryPowerManagement
  440.      wpQueryRefreshRate
  441.      wpSetAssociatedFileIcon
  442.      wpSetAutoRefresh
  443.      wpSetConcurrentView
  444.      wpSetDefStatusView
  445.      wpSetPowerConfirmation
  446.      wpSetPowerManagement
  447.      wpSetRefreshRate
  448.      wpViewObject
  449.  
  450.    MESSAGES
  451.  
  452.      WM_VRNENABLED
  453.      WM_VRNDISABLED
  454.      WM_MOUSEMAP
  455.  
  456.  
  457. DOS PROGRAMMING INTERFACE
  458. _________________________
  459.  
  460.    The DosSetDOSProperty() and
  461.    DosQueryDOSProperty() functions in BSEDOS.H are
  462.    not supported.  Do not use these application
  463.    programming interfaces.
  464.  
  465.  
  466. GRAPHICS PROGRAMMING INTERFACE
  467. ______________________________
  468.  
  469.    The GpiFloodFill function may produce incorrect
  470.    results if another window is visible on top of
  471.    any of the area being filled.  You will get
  472.    correct results if your application is in the
  473.    foreground, and no windows or dialogs owned by
  474.    your application are visible during flood-fill
  475.    operations.
  476.  
  477.  
  478. WORKPLACE PROGRAMMING INTERFACE
  479. _______________________________
  480.  
  481.  
  482.  
  483. WORKPLACE CLASSES, INSTANCE METHODS, AND CLASS METHODS
  484.  
  485.    wpFindViewItem - Do not use method, it may be
  486.    removed from the header files in the future.
  487.    Use wpFindUseItem to find VIEWITEM structures
  488.    to achieve the same functionality.
  489.  
  490.    wpclsQueryObject now locks the object before
  491.    returning it. If you are using this method,
  492.    make sure you unlock the object after you are
  493.    done with it.
  494.  
  495.  
  496. WIN PROGRAMMING INTERFACE
  497. _________________________
  498.  
  499.    The kernel debug version of PMWIN.DLL contained
  500.    in the Toolkit executes an INT 3 instruction,
  501.    causing a break in the debugger.  The INT 3 is
  502.    executed only in 32-bit API parameter
  503.    validation on the debug version of PMWIN.DLL;
  504.    all other errors will not execute an INT 3.
  505.  
  506.    For the WinCreateWindow function, the first
  507.    USHORT the control data parameter points to is
  508.    assumed to be the length of the data block.
  509.  
  510. SEAMLESS XGA OR SEAMLESS SVGA
  511. -----------------------------
  512.    When the debug kernel is installed and a application
  513.    is run in seamless xga or seamless svga,when the
  514.    application exits,it will cause the system to halt.
  515.    It is recommended the debug kernel not be used with
  516.    seamless xga or seamless svga.
  517.  
  518.  
  519. DDE BETWEEN PM AND WINDOWS PROGRAMS
  520. ___________________________________
  521.  
  522.    Making modifications to Windows programs in
  523.    order to use dynamic data exchange (DDE)
  524.    communications with PM programs helps
  525.    facilitate a gradual migration of applications
  526.    to PM.  Not all data formats are automatically
  527.    converted when doing DDE between Windows
  528.    programs and PM programs  (DDE set PUBLIC).
  529.    The following formats are converted
  530.    automatically by OS/2 2.1:
  531.  
  532.             PM Application               Windows Application
  533.             Data Format                  Interpretation
  534.             --------------------         --------------------
  535.             PM BITMAP                    Windows DIB
  536.             TEXT                         TEXT (codepage 819)
  537.             PM private                   Windows private
  538.  
  539.  
  540.             Windows Application          PM Application
  541.             Data Format                  Interpretation
  542.             --------------------         --------------------
  543.             Windows DIB                  PM BITMAP
  544.             TEXT (codepage 819)          TEXT
  545.             Windows private              PM Private
  546.  
  547.    Notes:
  548.  
  549.    1.  Code page translation (Windows 819 to/from
  550.        current PM codepage) is done for topic name
  551.        in all cases.
  552.  
  553.    2.  When data conversion is not automatically
  554.        done, programs can still communicate via
  555.        DDE if the two programs are able to do the
  556.        data conversion and pass private data
  557.        formats.
  558.  
  559.  
  560. PM REFERENCE UPDATES
  561. ____________________
  562.  
  563.  
  564.  
  565. RESOURCE COMPILER
  566.  
  567.    See the Tools Reference for updated resource
  568.    compiler information.
  569.  
  570.  
  571. DATA TYPES
  572.  
  573.    o   The following structures are found in the
  574.        Bit-Map File Format section, they should be
  575.        in the datatype section also.
  576.  
  577.        -   BITMAPARRAYFILEHEADER
  578.        -   BITMAPARRAYFILEHEADER2
  579.        -   BITMAPFILEHEADER
  580.        -   BITMAPFILEHEADER2.
  581.  
  582.    o   The following structures are found in the
  583.        Font-File Format section, they should be in
  584.        the datatype section.
  585.  
  586.        -   ADDITIONALMETRICS
  587.        -   FOCAFONT
  588.        -   FOCAMETRICS
  589.        -   FONTDEFINITIONHDR
  590.        -   FONTFILEMETRICS
  591.        -   FONTSIGNATURE
  592.  
  593.  
  594. PROGRAMMING CONSIDERATIONS
  595. __________________________
  596.  
  597.    Existing applications (small and tiny model)
  598.    must have a 4K stack available when they enter
  599.    system calls. If they do not have a 4K stack
  600.    available, the stack can overflow into the data
  601.    area.  We have found in our testing, that some
  602.    16-bit small and tiny model applications have
  603.    not followed the guidelines and encountered
  604.    problems.
  605.  
  606.  
  607. NEW FUNCTIONS FOR THE OS/2 2.1 CONTAINER CONTROL
  608. ________________________________________________
  609.  
  610.    In response to requests from our users, the
  611.    following new functions have been added to the
  612.    OS/2 2.1 container control.
  613.  
  614.  
  615. DETERMINING THE WIDTH OF A COLUMN IN THE DETAILS VIEW
  616.  
  617.    There are times when you may want to determine
  618.    the width of a column in the details view, such
  619.    as to allow the user to tab the split bar
  620.    between columns.  New function has been added
  621.    to the container control to allow you to
  622.    determine the width of the data in a column.
  623.    You can then compute the width of the entire
  624.    column by adding the width of the data to the
  625.    left and right margins of the column.
  626.  
  627.    To determine the width of a column:
  628.  
  629.    1.  Define an attribute with a value of 0X0200
  630.        and give it a name such as CMA_DATAWIDTH.
  631.    2.  Issue the CM_QUERYDETAILFIELDINFO message
  632.        with the following values:
  633.        a.  Provide a pointer to the FIELDINFO
  634.            structure in param1.
  635.        b.  Specify your attribute (see Step 1) in
  636.            param2.
  637.        c.  Request a return value with a type of
  638.            LONG, not PFIELDINFO, to retrieve the
  639.            width of the column in the FIELDINFO
  640.            structure to which you are pointing.
  641.            The value returned is the width of the
  642.            data (text, icon, or bit map) in this
  643.            column.
  644.    3.  Use the GpiQueryFontMetrics function to
  645.        query the average character width of the
  646.        font used by the container.  This value
  647.        will be used to calculate the total column
  648.        width.
  649.    4.  Multiply 3 times the average character
  650.        width and add this to the data width
  651.        returned from step 2 for all columns except
  652.        the following:
  653.        a.  The first and last columns in each
  654.            split window.  In these cases, multiply
  655.            2.5 times the average character width
  656.            and add the column data width returned
  657.            from step 2.
  658.        b.  The only other special case is where
  659.            there is only 1 column in either the
  660.            left or right split windows.  In this
  661.            case you would multiply 2 times the
  662.            average character width and add the
  663.            column data width returned from step 2.
  664.    5.  The value returned is the total width of
  665.        the column.
  666.  
  667.  
  668. PROVIDING SOURCE EMPHASIS FOR CONTAINER ITEMS
  669.  
  670.    Source emphasis is the type of emphasis that
  671.    the Workplace Shell provides when a context
  672.    menu is displayed.  It appears as a dotted box
  673.    with rounded corners that surrounds the item
  674.    for which the context menu is requested and an
  675.    item that is being dragged.
  676.  
  677.    To provide source emphasis for container items:
  678.  
  679.    1.  Define an attribute with a value of
  680.        0X00004000L and give it a name such as
  681.        CRA_SOURCE.
  682.    2.  Issue the CM_SETRECORDEMPHASIS message with
  683.        the following values:
  684.        a.  Provide a pointer to the RECORDCORE or
  685.            MINIRECORDCORE structure in param1.
  686.  
  687.            You can provide source emphasis for the
  688.            entire container by setting param1 to
  689.            NULL.
  690.        b.  Set the usChangeEmphasis parameter to
  691.            TRUE in param2.
  692.        c.  Specify your attribute (see Step 1) in
  693.            the fEmphasisAttribute parameter in
  694.            param2.
  695.  
  696.    To remove source emphasis, follow the same
  697.    procedure outlined above, but set the
  698.    usChangeEmphasis parameter in param2 to FALSE
  699.    instead of TRUE.
  700.  
  701.  
  702. SEARCHING FOR EXACT TEXT STRING MATCHES
  703.  
  704.    There may be times when you need to search the
  705.    container for a text string that is an exact
  706.    match of your search string argument.
  707.  
  708.    To find an exact match:
  709.  
  710.    1.  Define an attribute with a value of
  711.        0X10000000L and give it a name such as
  712.        CV_EXACTMATCH.
  713.    2.  In the SEARCHSTRING data structure, specify
  714.        values for the fields as you normally
  715.        would, with the following exception:
  716.        a.  Specify your attribute (see Step 1),
  717.            along with an attribute for the type of
  718.            view being displayed in the container,
  719.            in the usView field.  For example:
  720.  
  721.                        CV_EXACTMATCH | CV_ICON
  722.  
  723.            NOTE: In the OS/2 2.0 Programming
  724.            Reference, Vol. III, the field for
  725.            specifying the exact match attribute
  726.            and the type of view should be usView,
  727.            not ulView.  The type associated with
  728.            the field, however, is ULONG.  You must
  729.            specify usView to match the information
  730.            in the header file.
  731.  
  732.  
  733. ADDENDUM TO PROGRAMMING GUIDE VOL. II, CHAPTER 33 (PG. 22)
  734. __________________________________________________________
  735.  
  736.  
  737.  
  738. WORKPLACE RENDERING MECHANISM:
  739.  
  740.    Workplace shell uses the rendering mechanism of
  741.    <DRM_OBJECT,DRF_OBJECT> to communicate
  742.    information about the workplace objects
  743.    involved in a direct manipulation.
  744.  
  745.    For the <DRM_OBJECT,DRF_OBJECT> rendering
  746.    mechanism, pdraginfo->hwndSource is expected to
  747.    be the window handle of the container holding
  748.    objects which were inserted via the
  749.    _wpCnrInsertObject method.
  750.  
  751.    For each dragitem, pdragitem->ulItemID is the
  752.    PMINIRECORDCORE pointer associated with the
  753.    object.  The object can be retrieved using
  754.    OBJECT_FROM_PREC on pdragitem->ulItemID.
  755.  
  756.    Once the target object has completed
  757.    processing, it should send a DM_ENDCONVERSATION
  758.    message to the window handle in
  759.    pdragitem->hwndItem.
  760.  
  761.  
  762. DOSSHUTDOWN API
  763. _______________
  764.  
  765.    The DosShutDown API is documented in the OS/2
  766.    2.0 Control Program Programming Reference on
  767.    page 2-339.  This API has been enhanced to
  768.    assist in the Power Management activities
  769.    within the operating system.
  770.  
  771.    The primary change is to rename the ulReserved
  772.    parameter to ShutDownValue.  In addition, the
  773.    valid ShutDownValue parameter values are
  774.    defined as:
  775.  
  776.        Value       Definition
  777.        -----       ---------------------------------
  778.          0         Perform full system shut down
  779.                    and file system lock.
  780.          1         Perform buffer and cache flushing
  781.                    to make the system quiescent.
  782.  
  783.      All other values are reserved.
  784.  
  785.    The Remarks section of the DosShutDown API
  786.    should be updated to qualify the existing text
  787.    as applicable to the ShutDownValue parameter
  788.    value of 0.  Also, the Remarks for the
  789.    ShutDownValue parameter value of 1 should
  790.    indicate that the system should be quiescent
  791.    (that is, no threads of execution will be
  792.    active) at the end of this function request,
  793.    but that the file systems will not be locked
  794.    and processing can resume again at a later
  795.    time.
  796.  
  797.    For more information on the new Power
  798.    Management features, see the Power Management
  799.    TXT (text) file.
  800.  
  801.  
  802. DEVICE DRIVER INITIALIZATION
  803. ____________________________
  804.  
  805.    There are two new options available to device
  806.    drivers during initialization.
  807.  
  808.  
  809. DEVICE DRIVER INITIALIZATION QUIET FAILURE FLAG
  810.  
  811.    This interface is documented in the OS/2 2.0
  812.    Physical Device Driver Reference.  Several
  813.    pages have changes for the new device driver
  814.    Quiet Failure Flag.  The changes are:
  815.  
  816.    o   Page 15-3 add the following information
  817.        after "Invalid Parameter (13H)":
  818.  
  819.            Initialization Failed (noncritical)
  820.            (15H):  Returned when the device driver
  821.            initialization fails, but a message
  822.            should not be displayed indicating a
  823.            failure.
  824.  
  825.    o   Page 15-6 remove the following sentence
  826.        from the last paragraph:
  827.  
  828.            If none of the devices in the device
  829.            driver header chain pass
  830.            initialization, the physical device
  831.            driver does not remain loaded.
  832.  
  833.        and add a new paragraph at the end:
  834.  
  835.            If none of the devices in the device
  836.            driver header chain pass
  837.            initialization, and the device driver
  838.            returns Initialization Failed
  839.            (noncritical) (15H) for all devices in
  840.            the device driver header chain, a
  841.            failure message will not be displayed
  842.            to the user and the physical device
  843.            driver does not remain loaded.
  844.  
  845.            If none of the devices in the device
  846.            driver header chain pass
  847.            initialization, and the device driver
  848.            returns an error code other than
  849.            Initialization Failed (noncritical)
  850.            (15H) for at least one device in the
  851.            device driver header chain, a failure
  852.            message will be displayed to the user
  853.            and the physical device driver will not
  854.            remain loaded.  If at least one of the
  855.            devices in the device driver header
  856.            chain passes initialization, a failure
  857.            message will not be displayed to the
  858.            user and the physical device driver
  859.            will remain loaded.
  860.  
  861.  
  862. DEVICE DRIVER INITIALIZATION COMPLETE COMMAND
  863.  
  864.    This interface is documented in the OS/2 2.0
  865.    Physical Device Driver Reference.  Several
  866.    pages have changes for the new device driver
  867.    Initialization Complete Command.  The changes
  868.    are:
  869.  
  870.    o   Page 4-3 add the following to list of
  871.        packets supported by character devices:
  872.  
  873.            31 - Init Complete
  874.  
  875.    o   Page 15-4 add the following to the table of
  876.        physical device driver strategy commands:
  877.  
  878.            1F - Initialization Complete
  879.  
  880.    o   After Page 15-24 add the following for the
  881.        new strategy command description:
  882.  
  883.            1FH/ Initialization Complete
  884.            __________________________________________________
  885.            This command informs the physical device driver
  886.            that all physical device drivers have been loaded.
  887.  
  888.            Request Block Format
  889.            +----------------------------------+
  890.            | Field                Length      |
  891.            |----------------------------------|
  892.            | Request Header       13 bytes    |
  893.            +----------------------------------+
  894.  
  895.  
  896.            Remarks:  When a device driver receives this command,
  897.            all physical device drivers have been loaded and
  898.            initialized.  Virtual device drivers have not been
  899.            loaded and initialized.  The device driver can now
  900.            establish links to other physical device drivers.
  901.  
  902.            This command is sent to the device driver only if it
  903.            is a level 3 device driver and Bit 4 is set in the
  904.            Capabilities Bit Strip in the device driver header
  905.            (see the section on the Capabilities Bit Strip later in this file).
  906.  
  907.  
  908. NEW BIT ADDED TO CAPABILITIES BIT STRIP
  909. _______________________________________
  910.  
  911.    The Capabilities Bit Strip is a part of the
  912.    device driver header and is described on pages
  913.    3-4 and 3-5 of the Physical Device Driver
  914.    Reference.
  915.  
  916.    A new bit has been added to the Capabilities
  917.    Bit Strip.  On page 3-5, after "Bit 2" add a
  918.    new entry to the list:
  919.  
  920.    Bit 4     If set to 1, the new "Initialization
  921.              Complete" command (1FH) is supported.
  922.              (The new "Initialization Complete"
  923.              command is documented in an earlier
  924.              section of this file.)
  925.  
  926.  
  927. CHANGE TO DEVICE ATTRIBUTE FIELD
  928. ________________________________
  929.  
  930.    The Device Attribute Field is a part of the
  931.    device driver header and is described on pages
  932.    3-3 and 3-4 of the Physical Device Driver
  933.    Reference.
  934.  
  935.    On page 3-3, in the text describing "Bit 13",
  936.    delete the second sentence:
  937.  
  938.        "Set for output-until-busy support
  939.        (character device drivers only)."
  940.  
  941.  
  942. NEW IOCTLS
  943. __________
  944.  
  945.    New IOCtls have been provided for two
  946.    categories of device management:  lockable
  947.    drives and power management.
  948.  
  949.    For lockable drives there are 3 new IOCtls in
  950.    Category 8:
  951.  
  952.    o   Category 8, Function 40H -- Unlock, Lock,
  953.        and Eject Media
  954.    o   Category 8, Function 5DH -- Diskette
  955.        Control
  956.    o   Category 8, Function 66H -- Query Lock
  957.        Status
  958.  
  959.    For power management there are 5 new IOCtls in
  960.    a new category, Category 12 IOCtls.  The IOCtls
  961.    in this category are:
  962.  
  963.    o   Category 12, Function 40H -- Send Power
  964.        Event
  965.    o   Category 12, Function 41H -- Set Power
  966.        Event Resource
  967.    o   Category 12, Function 60H -- Query Power
  968.        Status
  969.    o   Category 12, Function 61H -- Query Power
  970.        Event
  971.    o   Category 12, Function 62H -- Query Power
  972.        Info
  973.  
  974.    These IOCtls are documented in the online
  975.    Control Program Reference.  In addition, there
  976.    is a separate TXT (text) file devoted to Power
  977.    Management.
  978.  
  979.  
  980. NEW HOOKS FOR VDHINSTALLUSERHOOK VIRTUAL DEVICE HELPER FUNCTION
  981. _______________________________________________________________
  982.  
  983.    VDHInstallUserHook is documented in the OS/2
  984.    2.0 Virtual Device Driver Reference on page
  985.    5-70.
  986.  
  987.    Two new user hooks for virtual device drivers
  988.    (VDDs) have been added for use with
  989.    VDHInstallUserHook.  These hooks support an
  990.    enhancement to the DPMI support for DOS
  991.    Sessions.
  992.  
  993.  
  994. BACKGROUND -- A DOS SESSION DPMI ENHANCEMENT
  995.  
  996.    The OS/2 operating system has been enhanced to
  997.    support multiple local descriptor tables (LDT)
  998.    and interrupt descriptor tables (IDT) in each
  999.    DOS Session, as specified in the DPMI 1.0
  1000.    specification.
  1001.  
  1002.    The OS/2 operating system now allocates a new
  1003.    IDT and LDT each time a DPMI application
  1004.    initially enters protect mode.  The original
  1005.    DPMI implementation for the OS/2 operating
  1006.    system supported DPMI 0.9, which defined a
  1007.    single-LDT, single-IDT mechanism; all DPMI
  1008.    applications used the same LDT and IDT.  This
  1009.    implementation meant that multiple DPMI
  1010.    applications could run in a DOS Session, but
  1011.    that all the DPMI applications within a single
  1012.    DOS Session had to be either 16-bit or 32-bit.
  1013.  
  1014.    The OS/2 operating system now creates a new LDT
  1015.    and IDT for each DPMI application when the
  1016.    application initially enters protect mode.
  1017.    Protect mode exceptions and interrupts are
  1018.    routed to the primary DPMI client in the DOS
  1019.    Session, which is defined to be the last
  1020.    application to enter protect mode.  With this
  1021.    enhancement, 16-bit and 32-bit DPMI
  1022.    applications can be run in the same DOS
  1023.    Session.
  1024.  
  1025.    This support conforms with the DPMI 1.0
  1026.    specification.
  1027.  
  1028.    The primary DPMI client's IDT is used to call
  1029.    the appropriate interrupt and exception
  1030.    handlers.  The virtual Programmable Interrupt
  1031.    Controller (VPIC) simulates hardware interrupts
  1032.    using the primary DPMI client's IDT.  The DOS
  1033.    Session switches to the primary client's IDT so
  1034.    that the interrupt is routed to the correct
  1035.    handler, then restores the current task (if
  1036.    necessary) after the interrupt has been
  1037.    simulated.
  1038.  
  1039.    Two new hooks have been added to
  1040.    VDHInstallUserHook to support this enhancement.
  1041.  
  1042.  
  1043. NEW VDHINSTALLUSERHOOK HOOKS
  1044.  
  1045.    Two new user hooks for virtual device drivers
  1046.    (VDDs) have been added for use with
  1047.    VDHInstallUserHook.  The two new user hooks
  1048.    enable VDDs to be notified when a DPMI task
  1049.    begins and ends execution, so the VDD is able
  1050.    to hook any events in protect mode that are
  1051.    required.
  1052.  
  1053.    The new hooks are VDM_BEGIN_VPM_TASK, and
  1054.    VDM_END_VPM_TASK (VPM means Virtual Protect
  1055.    Mode).  Each time a new DPMI application/task
  1056.    starts in a DOS Session, all VDM_BEGIN_VPM_TASK
  1057.    hooks are called.  Each time a DPMI
  1058.    application/task exits, all VDM_END_VPM_TASK
  1059.    hooks are called.
  1060.  
  1061.    The constants are defined as follows:
  1062.  
  1063.        #define VDM_BEGIN_VPM_TASK   13   /* VPM task initially started */
  1064.        #define VDM_END_VPM_TASK     14   /* VPM task terminated        */
  1065.  
  1066.    The routines registered to receive control when
  1067.    a task starts or stops are passed the handle to
  1068.    the DOS Session, but the DPMI application that
  1069.    is starting or stopping will have its IDT and
  1070.    LDT active.
  1071.  
  1072.  
  1073. ADDITION TO VMALLOC DEVHLP FUNCTION
  1074. ___________________________________
  1075.  
  1076.    VMAlloc is documented in the OS/2 2.0 Physical
  1077.    Device Driver Reference on page 17-98.
  1078.  
  1079.    A new bit has been added to the VMAlloc DevHlp
  1080.    function that tells the operating system to
  1081.    allocate memory above the 16 MB line.  This bit
  1082.    is:
  1083.  
  1084.        0x800 - VMDHA_USEHIGHMEM
  1085.  
  1086.    If memory above 16 MB exists, but there is not
  1087.    enough to satisfy the request, memory above 16
  1088.    MB will be used first and the remaining amount
  1089.    will be taken from memory below 16 MB.  If no
  1090.    memory above 16 MB exists, the allocation will
  1091.    be taken from existing memory.  The memory is
  1092.    freed by calling the VMFree DevHlp function.
  1093.  
  1094.    This bit is only valid during device driver
  1095.    initialization.  If this bit is used at any
  1096.    other time, VMAlloc will return an error
  1097.    (ERROR_INVALID_PARAMETER).
  1098.  
  1099.  
  1100. CHANGES AND CLARIFICATIONS
  1101. __________________________
  1102.  
  1103.    This section contains some additions, changes,
  1104.    and clarifications for the OS/2 2.0 Programming
  1105.    Guide Volume I:  Control Program, and for the
  1106.    OS/2 2.0 Physical Device Driver Reference.
  1107.  
  1108.  
  1109. ADDENDUM TO FILE MANAGEMENT CODING EXAMPLES
  1110.  
  1111.    File management is described in Chapter 4 of
  1112.    the OS/2 2.0 Programming Guide Volume I:
  1113.    Control Program.  In the sample code on pages
  1114.    4-20 and 4-21, under the line:
  1115.  
  1116.        #define INCL_DOSFILEMGR
  1117.  
  1118.    add the line:
  1119.  
  1120.        #define INCL_DOSMISC
  1121.  
  1122.    The "#define INCL_DOSMISC" is required to
  1123.    include the header file support (function
  1124.    prototypes, and so on) for DosScanEnv and
  1125.    DosSearchPath.  The DosQuerySysInfo function
  1126.    also requires the "#define INCL_DOSMISC", but
  1127.    this function is not used in any of the samples
  1128.    in the Programming Guide.
  1129.  
  1130.  
  1131. PROGRAM EXECUTION CONTROL
  1132.  
  1133.    Sessions, processes, and threads are documented
  1134.    in Chapter 7 in the OS/2 2.0 Programming Guide
  1135.    Volume I: Control Program.  In Figure 7-1 on
  1136.    page 7-2, in the center box of the figure,
  1137.    change the word "Sessions" to "Processes".
  1138.  
  1139.  
  1140. USER-DEFINED EXCEPTIONS
  1141.  
  1142.    Exception management is documented in the OS/2
  1143.    2.0 Programming Guide Volume I: Control
  1144.    Program, in Chapter 13.  On page 2-339, under
  1145.    the heading "User-Defined Exceptions", change
  1146.    the example for raising exceptions from:
  1147.  
  1148.        DosRaiseException(XCPT_YOUR_EXCEPTION);
  1149.  
  1150.    to the following:
  1151.  
  1152.        EXCEPTIONREPORTRECORD  ERepRec;
  1153.  
  1154.        ERepRec.ExceptionNum                = XCPT_YOUR_EXCEPTION;
  1155.        ERepRec.fHandlerFlags               = 0;
  1156.        ERepRec.NestedExceptionReportRecord = NULL;
  1157.        ERepRec.ExceptionAddress            = NULL;
  1158.        ERepRec.cParameters                 = 0;
  1159.  
  1160.        DosRaiseException(&ERepRec);
  1161.  
  1162.  
  1163. ADDENDUM TO PHYSICAL DEVICE DRIVER REQUEST PACKET DOCUMENTATION
  1164.  
  1165.    The format of the physical device driver's
  1166.    Request Packet Status WORD is described on page
  1167.    15-2 of the OS/2 2.0 Physical Device Driver
  1168.    Reference.  This addendum relates to bit 15
  1169.    (the Error bit), bit 8 (the Done bit), and bits
  1170.    7-0 (Error Code).
  1171.  
  1172.        Bit 8 (the Done bit) MUST be set, even when
  1173.        bit 15 (the Error bit) is set.  That is,
  1174.        whenever you return with the Error bit set,
  1175.        you must also set the Done bit.
  1176.  
  1177.  
  1178. CHANGE TO DOCUMENTATION FOR PHYSICAL MOUSE DEVICE DRIVER IDC
  1179.  
  1180.    The physical Mouse device driver's Inter-Device
  1181.    Communication (IDC) interface is documented in
  1182.    the OS/2 2.0 Physical Device Driver Reference,
  1183.    in chapter 12, "Physical Mouse Device Driver".
  1184.    In the section headed "MOUSE.SYS IDC
  1185.    Interface", under the information on the
  1186.    Process_Absolute IDC request, at the bottom of
  1187.    page 12-3 and top of page 12-4, there is a
  1188.    reference to the "event" field that has
  1189.    changed.  Remove the following sentences:
  1190.  
  1191.        The event field should never indicate that
  1192.        motion was associated with the event.
  1193.        MOUSE$ determines if motion occurs.
  1194.  
  1195.  
  1196. ADDENDUM TO DOCUMENTATION FOR THE LOCK DEVHLP
  1197.  
  1198.    The Lock DevHlp is described on pages 17-43 and
  1199.    17-44 of the OS/2 2.0 Physical Device Driver
  1200.    Reference.  On page 17-44, at the end of the
  1201.    Remarks for Lock, add the following paragraph:
  1202.  
  1203.        By default, when DosDevIOCtl passes an
  1204.        address to a device driver, it passes the
  1205.        address in the form of a temporary
  1206.        selector.  This selector is only valid for
  1207.        the duration of the call and cannot be used
  1208.        to lock the memory using the Lock DevHlp.
  1209.        If you need to lock this memory, the
  1210.        calling program must use the DosAllocMem
  1211.        function with the object tile (OBJ_TILE)
  1212.        bit set.  If you pass a pointer to this
  1213.        memory in the call to DosDevIOCtl, the
  1214.        device driver can use the Lock DevHlp to
  1215.        lock this memory.
  1216.  
  1217.  
  1218. NOTICES
  1219. _______
  1220.  
  1221.    References in this publication to IBM products,
  1222.    programs, or services do not imply that IBM
  1223.    intends to make these available in all
  1224.    countries in which IBM operates.  Any reference
  1225.    to an IBM product, program or service is not
  1226.    intended to state or imply that only IBM's
  1227.    product, program, or service may be used.  Any
  1228.    functionally equivalent product, program, or
  1229.    service that does not infringe any of IBM's
  1230.    intellectual property rights or other legally
  1231.    projectable rights may be used instead of the
  1232.    IBM product, program, or service.  Evaluation
  1233.    and verification of operation in conjunction
  1234.    with other products, programs, or services,
  1235.    except those expressly designated by IBM, are
  1236.    the user's responsibility.
  1237.  
  1238.    IBM may have patents or pending patent
  1239.    applications covering subject matter in this
  1240.    document.  The furnishing of this document does
  1241.    not give you any license to these patents.  You
  1242.    can send license inquiries, in writing, to the
  1243.    IBM Director of Commercial Relations, IBM
  1244.    Corporation, Purchase, NY 10577.
  1245.  
  1246.  
  1247. TRADEMARKS AND SERVICE MARKS
  1248.  
  1249.    The following terms, denoted by an asterisk
  1250.    (*), used in this publication, are trademarks
  1251.    or service marks of the IBM Corporation in the
  1252.    United States or other countries:
  1253.  
  1254.    IBM
  1255.    OS/2
  1256.    OS/2 2.0
  1257.    OS/2 2.1
  1258.  
  1259.    IBM DISCLAIMS ALL WARRANTIES, WHETHER EXPRESSED
  1260.    OR IMPLIED, INCLUDING WITHOUT LIMITATION,
  1261.    WARRANTIES OF FITNESS AND MERCHANTABILITY WITH
  1262.    RESPECT TO THE INFORMATION IN THIS DOCUMENT.
  1263.    BY FURNISHING THIS DOCUMENT, IBM GRANTS NO
  1264.    LICENSES TO ANY RELATED PATENTS OR COPYRIGHTS.
  1265.  
  1266.    Copyright IBM Corporation, 1992, all rights
  1267.    reserved.
  1268.