comctl32/tests: Remove variables cx and cy which are not really used from test_approx...
[wine.git] / dlls / ifsmgr.vxd / ifsmgr.c
blob68c44469b112f463154542f552d1b63cb5acfc63
1 /*
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
23 /* NOTES
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.
31 #include <stdarg.h>
33 #include "windef.h"
34 #include "winbase.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(vxd);
40 * IFSMgr DeviceIO service
43 #define IFS_IOCTL_21 100
44 #define IFS_IOCTL_2F 101
45 #define IFS_IOCTL_GET_RES 102
46 #define IFS_IOCTL_GET_NETPRO_NAME_A 103
48 struct win32apireq {
49 unsigned long ar_proid;
50 unsigned long ar_eax;
51 unsigned long ar_ebx;
52 unsigned long ar_ecx;
53 unsigned long ar_edx;
54 unsigned long ar_esi;
55 unsigned long ar_edi;
56 unsigned long ar_ebp;
57 unsigned short ar_error;
58 unsigned short ar_pad;
61 static void win32apieq_2_CONTEXT(const struct win32apireq *pIn, CONTEXT86 *pCxt)
63 memset(pCxt,0,sizeof(*pCxt));
65 pCxt->ContextFlags=CONTEXT86_INTEGER|CONTEXT86_CONTROL;
66 pCxt->Eax = pIn->ar_eax;
67 pCxt->Ebx = pIn->ar_ebx;
68 pCxt->Ecx = pIn->ar_ecx;
69 pCxt->Edx = pIn->ar_edx;
70 pCxt->Esi = pIn->ar_esi;
71 pCxt->Edi = pIn->ar_edi;
73 /* FIXME: Only partial CONTEXT86_CONTROL */
74 pCxt->Ebp = pIn->ar_ebp;
76 /* FIXME: pIn->ar_proid ignored */
77 /* FIXME: pIn->ar_error ignored */
78 /* FIXME: pIn->ar_pad ignored */
81 static void CONTEXT_2_win32apieq(const CONTEXT86 *pCxt, struct win32apireq *pOut)
83 memset(pOut,0,sizeof(struct win32apireq));
85 pOut->ar_eax = pCxt->Eax;
86 pOut->ar_ebx = pCxt->Ebx;
87 pOut->ar_ecx = pCxt->Ecx;
88 pOut->ar_edx = pCxt->Edx;
89 pOut->ar_esi = pCxt->Esi;
90 pOut->ar_edi = pCxt->Edi;
92 /* FIXME: Only partial CONTEXT86_CONTROL */
93 pOut->ar_ebp = pCxt->Ebp;
95 /* FIXME: pOut->ar_proid ignored */
96 /* FIXME: pOut->ar_error ignored */
97 /* FIXME: pOut->ar_pad ignored */
100 extern void __wine_call_int_handler( CONTEXT *context, BYTE intnum );
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("(%d,%p,%d,%p,%d,%p,%p): stub\n",
111 dwIoControlCode, lpvInBuffer,cbInBuffer, lpvOutBuffer,cbOutBuffer,
112 lpcbBytesReturned, lpOverlapped);
114 switch (dwIoControlCode)
116 case IFS_IOCTL_21:
117 case IFS_IOCTL_2F:
119 CONTEXT86 cxt;
120 struct win32apireq *pIn=lpvInBuffer;
121 struct win32apireq *pOut=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 __wine_call_int_handler( &cxt, 0x21 );
136 else
137 __wine_call_int_handler( &cxt, 0x2f );
139 CONTEXT_2_win32apieq(&cxt,pOut);
140 return TRUE;
142 case IFS_IOCTL_GET_RES:
143 FIXME( "Control 'IFS_IOCTL_GET_RES' not implemented\n");
144 return FALSE;
145 case IFS_IOCTL_GET_NETPRO_NAME_A:
146 FIXME( "Control 'IFS_IOCTL_GET_NETPRO_NAME_A' not implemented\n");
147 return FALSE;
148 default:
149 FIXME( "Control %d not implemented\n", dwIoControlCode);
150 return FALSE;