source: cmedia/trunk/Drv32/dispatch.c@ 354

Last change on this file since 354 was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 2.1 KB
Line 
1/* $Id: dispatch.c,v 1.1 2000/04/23 14:55:23 ktk Exp $ */
2
3//******************************************************************************
4// IOCtl & close strategy handlers
5//
6// Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl)
7//
8// This program is free software; you can redistribute it and/or
9// modify it under the terms of the GNU General Public License as
10// published by the Free Software Foundation; either version 2 of
11// the License, or (at your option) any later version.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public
19// License along with this program; if not, write to the Free
20// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
21// USA.
22//
23//******************************************************************************
24extern "C" { // 16-bit header files are not C++ aware
25#define INCL_NOPMAPI
26#define INCL_DOSMISC
27#include <os2.h>
28}
29
30#include <devhelp.h>
31#include <devtype.h>
32#include <devrp.h>
33#include "devown.h"
34
35//******************************************************************************
36// Dispatch IOCtl requests received from the Strategy routine
37//******************************************************************************
38ULONG StratIOCtl(RP __far* _rp)
39{
40 RPIOCtl __far* rp = (RPIOCtl __far*)_rp;
41
42 return RPERR_COMMAND | RPDONE;
43}
44//******************************************************************************
45// Dispatch Close requests received from the strategy routine
46//******************************************************************************
47ULONG StratClose(RP __far* _rp)
48{
49 RPOpenClose __far* rp = (RPOpenClose __far*)_rp;
50
51 // only called if device successfully opened
52 numOS2Opens--;
53
54 if (numOS2Opens == 0) {
55 deviceOwner = DEV_NO_OWNER;
56 }
57 return(RPDONE);
58}
Note: See TracBrowser for help on using the repository browser.