2 * IFSMGR VxD implementation
4 * Copyright 1998 Marcus Meissner
5 * Copyright 1998 Ulrich Weigand
6 * Copyright 1998 Patrik Stridvall
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library 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 GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 * These ioctls are used by 'MSNET32.DLL'.
26 * I have been unable to uncover any documentation about the ioctls so
27 * the implementation of the cases IFS_IOCTL_21 and IFS_IOCTL_2F are
28 * based on reasonable guesses on information found in the Windows 95 DDK.
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(vxd
);
39 extern void WINAPI
CallBuiltinHandler( CONTEXT86
*context
, BYTE intnum
); /* from winedos */
42 * IFSMgr DeviceIO service
45 #define IFS_IOCTL_21 100
46 #define IFS_IOCTL_2F 101
47 #define IFS_IOCTL_GET_RES 102
48 #define IFS_IOCTL_GET_NETPRO_NAME_A 103
51 unsigned long ar_proid
;
59 unsigned short ar_error
;
60 unsigned short ar_pad
;
63 static void win32apieq_2_CONTEXT(struct win32apireq
*pIn
,CONTEXT86
*pCxt
)
65 memset(pCxt
,0,sizeof(*pCxt
));
67 pCxt
->ContextFlags
=CONTEXT86_INTEGER
|CONTEXT86_CONTROL
;
68 pCxt
->Eax
= pIn
->ar_eax
;
69 pCxt
->Ebx
= pIn
->ar_ebx
;
70 pCxt
->Ecx
= pIn
->ar_ecx
;
71 pCxt
->Edx
= pIn
->ar_edx
;
72 pCxt
->Esi
= pIn
->ar_esi
;
73 pCxt
->Edi
= pIn
->ar_edi
;
75 /* FIXME: Only partial CONTEXT86_CONTROL */
76 pCxt
->Ebp
= pIn
->ar_ebp
;
78 /* FIXME: pIn->ar_proid ignored */
79 /* FIXME: pIn->ar_error ignored */
80 /* FIXME: pIn->ar_pad ignored */
83 static void CONTEXT_2_win32apieq(CONTEXT86
*pCxt
,struct win32apireq
*pOut
)
85 memset(pOut
,0,sizeof(struct win32apireq
));
87 pOut
->ar_eax
= pCxt
->Eax
;
88 pOut
->ar_ebx
= pCxt
->Ebx
;
89 pOut
->ar_ecx
= pCxt
->Ecx
;
90 pOut
->ar_edx
= pCxt
->Edx
;
91 pOut
->ar_esi
= pCxt
->Esi
;
92 pOut
->ar_edi
= pCxt
->Edi
;
94 /* FIXME: Only partial CONTEXT86_CONTROL */
95 pOut
->ar_ebp
= pCxt
->Ebp
;
97 /* FIXME: pOut->ar_proid ignored */
98 /* FIXME: pOut->ar_error ignored */
99 /* FIXME: pOut->ar_pad ignored */
102 /***********************************************************************
103 * DeviceIoControl (IFSMGR.VXD.@)
105 BOOL WINAPI
IFSMGR_DeviceIoControl(DWORD dwIoControlCode
, LPVOID lpvInBuffer
, DWORD cbInBuffer
,
106 LPVOID lpvOutBuffer
, DWORD cbOutBuffer
,
107 LPDWORD lpcbBytesReturned
,
108 LPOVERLAPPED lpOverlapped
)
110 TRACE("(%ld,%p,%ld,%p,%ld,%p,%p): stub\n",
111 dwIoControlCode
, lpvInBuffer
,cbInBuffer
, lpvOutBuffer
,cbOutBuffer
,
112 lpcbBytesReturned
, lpOverlapped
);
114 switch (dwIoControlCode
)
120 struct win32apireq
*pIn
=(struct win32apireq
*) lpvInBuffer
;
121 struct win32apireq
*pOut
=(struct win32apireq
*) lpvOutBuffer
;
123 TRACE( "Control '%s': "
124 "proid=0x%08lx, eax=0x%08lx, ebx=0x%08lx, ecx=0x%08lx, "
125 "edx=0x%08lx, esi=0x%08lx, edi=0x%08lx, ebp=0x%08lx, "
126 "error=0x%04x, pad=0x%04x\n",
127 (dwIoControlCode
==IFS_IOCTL_21
)?"IFS_IOCTL_21":"IFS_IOCTL_2F",
128 pIn
->ar_proid
, pIn
->ar_eax
, pIn
->ar_ebx
, pIn
->ar_ecx
,
129 pIn
->ar_edx
, pIn
->ar_esi
, pIn
->ar_edi
, pIn
->ar_ebp
,
130 pIn
->ar_error
, pIn
->ar_pad
);
132 win32apieq_2_CONTEXT(pIn
,&cxt
);
134 if(dwIoControlCode
==IFS_IOCTL_21
)
135 CallBuiltinHandler( &cxt
, 0x21 );
137 CallBuiltinHandler( &cxt
, 0x2f );
139 CONTEXT_2_win32apieq(&cxt
,pOut
);
142 case IFS_IOCTL_GET_RES
:
143 FIXME( "Control 'IFS_IOCTL_GET_RES' not implemented\n");
145 case IFS_IOCTL_GET_NETPRO_NAME_A
:
146 FIXME( "Control 'IFS_IOCTL_GET_NETPRO_NAME_A' not implemented\n");
149 FIXME( "Control %ld not implemented\n", dwIoControlCode
);