Changeset 1467 for trunk/src/win32k/dev16/d16init.c
- Timestamp:
- Oct 27, 1999, 4:03:01 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev16/d16init.c
r847 r1467 1 /* $Id: d16init.c,v 1. 1 1999-09-06 02:19:55bird Exp $1 /* $Id: d16init.c,v 1.2 1999-10-27 02:02:53 bird Exp $ 2 2 * 3 3 * d16init - init routines for both drivers. … … 33 33 #include <memory.h> 34 34 35 #include "probkrnl.h" 35 36 #include "dev1632.h" 36 37 #include "dev16.h" 37 38 38 39 39 /** … … 61 61 /** 62 62 * init function - device 1. 63 * We will send an IOCtl request to the win32i$ (device 0) which will63 * We will send an IOCtl request to the elf$ (device 0) which will 64 64 * perform the Ring-0 initiation of the driver. 65 65 * @returns Status word. … … 77 77 NPSZ npszErrMsg = NULL; 78 78 79 rc = DosOpen("\\dev\\win32i$", &hDev0, &usAction, 0UL, FILE_NORMAL, 80 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS, 81 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, 82 0UL); 79 rc = ProbeKernel(pRpIn); 83 80 if (rc == NO_ERROR) 84 81 { 85 param.pRpInitIn = pRpIn; 86 rc = DosDevIOCtl(&data, ¶m, D16_IOCTL_RING0INIT, D16_IOCTL_CAT, hDev0); 87 /* _asm int 3; */ 82 rc = DosOpen("\\dev\\elf$", &hDev0, &usAction, 0UL, FILE_NORMAL, 83 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS, 84 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, 85 0UL); 88 86 if (rc == NO_ERROR) 89 87 { 90 if (data.Status != STATUS_DONE) 91 npszErrMsg = "Ring-0 initiation failed\n\r"; 88 param.pRpInitIn = pRpIn; 89 rc = DosDevIOCtl(&data, ¶m, D16_IOCTL_RING0INIT, D16_IOCTL_CAT, hDev0); 90 if (rc == NO_ERROR) 91 { 92 if (data.Status != STATUS_DONE) 93 npszErrMsg = "Ring-0 initiation failed\n\r"; 94 else 95 { 96 register NPSZ npsz = "Win32k.sys succesfully initiated!\n\r"; 97 DosPutMessage(1, strlen(npsz)+1, npsz); 98 pRpOut->Status = data.Status; 99 } 100 } 92 101 else 93 { 94 register NPSZ npsz = "Test.sys succesfully initiated!\n\r"; 95 DosPutMessage(1, strlen(npsz)+1, npsz); 96 pRpOut->Status = data.Status; 97 } 102 npszErrMsg = "DosDevIOCtl failed.\n\r"; 103 DosClose(hDev0); 98 104 } 99 105 else 100 npszErrMsg = "DosDevIOCtl failed\n\r"; 101 DosClose(hDev0); 106 npszErrMsg = "DosOpen failed.\n\r"; 102 107 } 103 108 else 104 npszErrMsg = "DosOpen failed\n\r"; 105 109 npszErrMsg = "ProbeKernel failed.\n\r"; 106 110 pRpOut->BPBArray = NULL; 107 111 pRpOut->CodeEnd = (USHORT)&CODE16END; … … 144 148 145 149 pDT2 = (PDOSTABLE2)((char FAR *)pDT + pDT->cul*4 + 1); 146 TKSSBase16 = pDT2->TKSSBase;150 TKSSBase16 = (ULONG)pDT2->pTKSSBase; 147 151 R0FlatCS16 = (USHORT)pDT2->R0FlatCS; 148 152 R0FlatDS16 = (USHORT)pDT2->R0FlatDS; … … 169 173 ) 170 174 { 171 /*_asm int 3;*/172 175 usRc = CallR0Init32(SSToDS_16(&rp32init)); 173 /*_asm int 3;*/174 176 } 175 177 else 176 178 usRc |= ERROR_I24_INVALID_PARAMETER; 177 179 178 ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc;180 ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc; 179 181 180 182 /* finished - unlock data and parm */
Note:
See TracChangeset
for help on using the changeset viewer.