home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / RESOURCE / RMCALLS / RMCDEV.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  1.9 KB  |  75 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 =  RMCDEV.C
  15.  *
  16.  * DESCRIPTIVE NAME =  RMCreateDevice 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 RMCreateDevice(HDRIVER       hDriver,
  55.                                  PHDEVICE      phDevice,
  56.                                  PDEVICESTRUCT pDeviceStruct,
  57.                                  HADAPTER      hAdapter,
  58.                                  PAHRESOURCE   pahResource)
  59. {
  60.  
  61.    if (RMFlags & RMF_INITIALIZED)
  62.    {
  63.       return ( CallRM( RMCREATEDEVICE, (PVOID) &hDriver ) );
  64.    }
  65.  
  66.    if (RMFlags & RMF_NO_RM)
  67.    {
  68.       *phDevice = (HDEVICE)-1;
  69.       return RMRC_SUCCESS;
  70.    }
  71.  
  72.    return RMRC_NOTINITIALIZED;
  73. }
  74.  
  75.