home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / RESOURCE / RMCALLS / RMCLDEV.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  1.8 KB  |  74 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /**************************************************************************
  13.  *
  14.  * SOURCE FILE NAME =  RMCLDEV.C
  15.  *
  16.  * DESCRIPTIVE NAME =  RMCreateLDev Module for RMCALLS.LIB
  17.  *
  18.  *
  19.  *
  20.  * VERSION = V0.5
  21.  *
  22.  * DATE
  23.  *
  24.  * DESCRIPTION :
  25.  *
  26.  * Purpose:
  27.  *
  28.  *
  29.  *
  30.  * FUNCTIONS  :
  31.  *
  32.  * NOTES
  33.  *
  34.  *
  35.  * STRUCTURES
  36.  *
  37.  * EXTERNAL REFERENCES
  38.  *
  39.  *
  40.  *
  41.  * EXTERNAL FUNCTIONS
  42.  *
  43. */
  44.  
  45. #define INCL_NOPMAPI
  46. #include <os2.h>
  47.  
  48. #include "dhcalls.h"
  49. #include "rmlib.h"
  50. #include "rmdata.h"
  51.  
  52.  
  53.  
  54. USHORT _cdecl FAR RMCreateLDev(HDRIVER hDriver,
  55.                                PHLDEV  phLDev,
  56.                                HDEVICE hDevice,
  57.                                PLDEVSTRUCT pLDevStruct)
  58. {
  59.  
  60.    if (RMFlags & RMF_INITIALIZED)
  61.    {
  62.       return ( CallRM( RMCREATELDEV, (PVOID) &hDriver ) );
  63.    }
  64.  
  65.    if (RMFlags & RMF_NO_RM)
  66.    {
  67.       *phLDev = (HLDEV)-1;
  68.       return RMRC_SUCCESS;
  69.    }
  70.  
  71.    return RMRC_NOTINITIALIZED;
  72. }
  73.  
  74.