- Timestamp:
- Sep 4, 2000, 6:40:50 PM (25 years ago)
- Location:
- trunk/src/win32k
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/dev16/d16init.c
r4164 r4185 1 /* $Id: d16init.c,v 1. 7 2000-09-02 21:07:55bird Exp $1 /* $Id: d16init.c,v 1.8 2000-09-04 16:40:47 bird Exp $ 2 2 * 3 3 * d16init - init routines for both drivers. … … 47 47 #include "log.h" 48 48 #include "options.h" 49 49 #include "errors.h" 50 50 51 51 … … 98 98 USHORT usAction = 0; 99 99 NPSZ npszErrMsg = NULL; 100 NPSZ npszErrMsg2 = NULL; 100 101 101 102 /* … … 119 120 if (rc == NO_ERROR) 120 121 { 121 if ( (rc = data.Status) == STATUS_DONE)122 if (data.usRcInit32 == NO_ERROR) 122 123 { 123 124 if (!options.fQuiet) 124 125 printf16("Win32k.sys succesfully initiated!\n"); 125 pRpOut->Status = pRpOut->rph.Status = data.Status;126 pRpOut->Status = pRpOut->rph.Status = STATUS_DONE; 126 127 } 127 128 else 128 npszErrMsg = "Ring-0 initiation failed. rc=%d\n"; 129 { 130 /* set correct error message and rc */ 131 rc = data.usRcInit32; 132 npszErrMsg = "Ring-0 initiation failed. rc=%x\n"; 133 if (rc >= ERROR_D32_FIRST && rc <= ERROR_D32_LAST) 134 npszErrMsg2 = GetErrorMsg(data.usRcInit32 + ERROR_PROB_SYM_D32_FIRST - ERROR_D32_FIRST); 135 } 129 136 } 130 137 else … … 152 159 { 153 160 printf16(npszErrMsg, rc); 154 pRpOut->Status = pRpOut->rph.Status = STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL; 161 if (npszErrMsg2) 162 printf16("%s\n", npszErrMsg2); 163 pRpOut->Status = pRpOut->rph.Status = STATUS_DONE | STERR | ERROR_I24_GEN_FAILURE; 155 164 } 156 165 … … 167 176 * R0 16-bit initiation. 168 177 * This gets TKSSBase, thunks parameters and calls R0 32-bit initiation function. 169 * @returns Status word. 170 * @param pRp Generic IO Control request packet. 178 * @returns Status word. We don't fail on R0Init32 but forwards the result 179 * using the usRcInit32. 180 * @param pRp Generic IO Control request packet. 171 181 */ 172 182 USHORT NEAR R0Init16(PRP_GENIOCTL pRp) … … 212 222 !DevHelp_VirtToLin(SELECTOROF(rp32init.InitArgs), OFFSETOF(rp32init.InitArgs), (PLIN)&rp32init.InitArgs) 213 223 ) 214 { 224 { /* call 32-bit init routine and set 32 bit rc. */ 215 225 usRc = CallR0Init32(SSToDS_16(&rp32init)); 226 ((PD16R0INITDATA)pRp->DataPacket)->usRcInit32 = usRc; 227 228 /* set status to done (success). (R0Init32 RC is return as usRcInit32.) */ 229 usRc = STATUS_DONE; 216 230 } 217 231 else 218 usRc |= ERROR_I24_INVALID_PARAMETER; 219 220 ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc; 232 usRc |= STERR | ERROR_I24_INVALID_PARAMETER; 233 221 234 222 235 /* 223 * finished - unlock data and parm 236 * finished - unlock data and parm; 224 237 */ 225 238 DevHelp_VMUnLock((LIN)SSToDS_16(&hLockParm[0])); … … 227 240 } 228 241 else 229 usRc |= ERROR_I24_INVALID_PARAMETER;242 usRc |= STERR | ERROR_I24_INVALID_PARAMETER; 230 243 } 231 244 else 232 usRc |= ERROR_I24_INVALID_PARAMETER;245 usRc |= STERR | ERROR_I24_INVALID_PARAMETER; 233 246 } 234 247 else 235 usRc |= ERROR_I24_GEN_FAILURE;248 usRc |= STERR | ERROR_I24_GEN_FAILURE; 236 249 237 250 return usRc; -
trunk/src/win32k/dev16/d16strat.c
r4164 r4185 1 /* $Id: d16strat.c,v 1. 9 2000-09-02 21:07:56bird Exp $1 /* $Id: d16strat.c,v 1.10 2000-09-04 16:40:48 bird Exp $ 2 2 * 3 3 * d16strat.c - 16-bit strategy routine, device headers, device_helper (ptr) … … 174 174 if (TKSSBase16 == 0) 175 175 initGetDosTableData(); 176 return CallVerifyImportTab32(); 176 rc = CallVerifyImportTab32(); 177 if (pRp->DataPacket) 178 ((PD16VERIFYIMPORTTABDATA)pRp->DataPacket)->usRc = rc; 179 return STATUS_DONE; 177 180 } 178 181 break; -
trunk/src/win32k/dev16/probkrnl.c
r4164 r4185 1 /* $Id: probkrnl.c,v 1.2 1 2000-09-02 21:07:56bird Exp $1 /* $Id: probkrnl.c,v 1.22 2000-09-04 16:40:48 bird Exp $ 2 2 * 3 3 * Description: Autoprobes the os2krnl file and os2krnl[*].sym files. … … 137 137 }; 138 138 139 char DATA16_GLOBAL szUsrSym[50] = {0}; 139 /** 140 * szSymbolFile holds the name of the symbol file used. 141 * 142 */ 143 char DATA16_GLOBAL szSymbolFile[60] = {0}; 144 145 /** 146 * iProc holds the number of the procedure which failed during verify. 147 */ 148 int DATA16_GLOBAL iProc = -1; /* The procedure number which failed Verify. */ 140 149 141 150 … … 204 213 205 214 /* 206 * ProbeSymFile error messages 215 * ProbeSymFile error messages + some extra ones. 207 216 */ 208 217 {ERROR_PROB_SYM_FILE_NOT_FOUND, "Sym: Symbol file was not found."}, … … 212 221 {ERROR_PROB_SYM_SEG_DEF_SEEK, "Sym: Failed to seek to a segment definition."}, 213 222 {ERROR_PROB_SYM_SEG_DEF_READ, "Sym: Failed to read a segment definition."}, 214 {ERROR_PROB_SYM_IMPORTS_NOTFOUND, "Sym: Allthe imports wasn't found."},223 {ERROR_PROB_SYM_IMPORTS_NOTFOUND, "Sym: Some of the imports wasn't found."}, 215 224 {ERROR_PROB_SYM_V_PROC_NOT_FND, "Sym: Verify failed: Procedure not found."}, 216 225 {ERROR_PROB_SYM_V_OBJ_OR_ADDR, "Sym: Verify failed: Invalid object or address."}, … … 218 227 {ERROR_PROB_SYM_V_PROLOG, "Sym: Verify failed: Invalid prolog."}, 219 228 {ERROR_PROB_SYM_V_NOT_IMPL, "Sym: Verify failed: Not implemented."}, 229 {ERROR_PROB_SYM_V_GETOS2KRNL, "GetOs2Krnl: failed."}, 230 {ERROR_PROB_SYM_V_NO_SWAPMTE, "GetOs2Krnl: No Swap MTE."}, 231 {ERROR_PROB_SYM_V_OBJECTS, "GetOs2Krnl: Too many objects."}, 232 {ERROR_PROB_SYM_V_OBJECT_TABLE, "GetOs2Krnl: No object table."}, 233 {ERROR_PROB_SYM_V_BUILD_INFO, "GetOs2Krnl: Build info not found."}, 234 {ERROR_PROB_SYM_V_INVALID_BUILD, "GetOs2Krnl: Unsupported build."}, 235 {ERROR_PROB_SYM_V_VERIFY, "importTabInit: Import failed."}, 236 {ERROR_PROB_SYM_V_IPE, "importTabInit: Internal-Processing-Error."}, 237 {ERROR_PROB_SYM_V_HEAPINIT, "R0Init32: HeapInit Failed."}, 238 {ERROR_PROB_SYM_V_D32_LDR_INIT, "R0Init32: ldrInit Failed."}, 220 239 221 240 {ERROR_PROB_SYMDB_KRNL_NOT_FOUND, "SymDB: Kernel was not found."} … … 253 272 static int kargncpy(char *pszTarget, const char *pszArg, unsigned cchMaxlen); 254 273 255 static const char * GetErrorMsg(short sErr);256 257 274 /* Workers */ 258 275 static int LookupKrnlEntry(unsigned short usBuild, unsigned short fKernel, unsigned char cObjects); … … 262 279 263 280 /* Ouput */ 264 static void ShowResult(int rc , int iSym);281 static void ShowResult(int rc); 265 282 266 283 /* Others used while debugging in R3. */ … … 570 587 * @author knut st. osmundsen (knut.stange.osmundsen@pmsc.no) 571 588 */ 572 staticconst char * GetErrorMsg(short sErr)589 const char * GetErrorMsg(short sErr) 573 590 { 574 591 int i; … … 639 656 rc = VerifyPrologs(); 640 657 641 /* set sym name */658 /* set sym name on success or complain on error */ 642 659 if (rc == 0) 643 kstrcpy(szUsrSym, "Win32k Symbol Database"); 660 kstrcpy(szSymbolFile, "Win32k Symbol Database"); 661 else 662 { 663 printf16("Warning: The Win32k Symbol Database entry found.\n" 664 " But, VerifyPrologs() returned rc=0x%x and iProc=%d\n", rc, iProc); 665 DosSleep(3000); 666 } 667 644 668 return rc; 645 669 } … … 655 679 * Verifies the that the addresses in aImportTab are valid. 656 680 * This is done at Ring-0 of course. 657 * @returns 0 if ok, not 0 if not ok. 681 * @returns NO_ERROR (ie. 0) on success. iProc = -1 682 * The appropriate OS/2 or Win32k return code on success. iProc 683 * is set to the failing procedure (if appliable). 658 684 */ 659 685 static int VerifyPrologs(void) … … 664 690 USHORT usAction = 0; 665 691 692 /* Set the failing procedure number to -1. */ 693 iProc = -1; 694 695 /* Open the elf device driver. */ 666 696 rc = DosOpen("\\dev\\elf$", &hDev0, &usAction, 0UL, FILE_NORMAL, 667 697 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS, … … 670 700 if (rc == NO_ERROR) 671 701 { 672 rc = DosDevIOCtl("", "", D16_IOCTL_VERIFYIMPORTTAB, D16_IOCTL_CAT, hDev0); 702 D16VERIFYIMPORTTABDATA Data = {0}; 703 704 /* Issue the VerifyImportTab IOCtl call. */ 705 rc = DosDevIOCtl(&Data, "", D16_IOCTL_VERIFYIMPORTTAB, D16_IOCTL_CAT, hDev0); 673 706 DosClose(hDev0); 674 if (rc != NO_ERROR) 675 { 676 register APIRET rc2 = rc & STECODE; 677 if (rc2 >= ERROR_D32_VERIFYIMPORTTAB_FIRST && rc2 <= ERROR_D32_VERIFYIMPORTTAB_LAST) 678 rc = rc2 + ERROR_PROB_SYM_VERIFY_FIRST - ERROR_D32_VERIFYIMPORTTAB_FIRST; 707 if (rc == NO_ERROR) 708 { 709 if (Data.usRc != NO_ERROR) 710 { 711 /* set the appropriate return values. */ 712 rc = (Data.usRc & ERROR_D32_ERROR_MASK) + ERROR_PROB_SYM_D32_FIRST; 713 if (Data.usRc & ERROR_D32_PROC_FLAG) 714 iProc = (Data.usRc & ERROR_D32_PROC_MASK) >> ERROR_D32_PROC_SHIFT; 715 }/* else success */ 716 } 717 else 718 { 719 dprintf(("DosDevIOCtl failed with rc=%d\n", rc)); 720 DosSleep(3000); 679 721 } 680 722 } … … 682 724 { 683 725 dprintf(("DosOpen Failed with rc=%d\n", rc)); 684 DosSleep( 2000);726 DosSleep(3000); 685 727 } 686 728 … … 1042 1084 * Shows result of kernelprobing if not quiet or on error. 1043 1085 * @param rc Return code. 1044 * @param iSym index of .sym-file into static struct.1045 1086 */ 1046 1087 #ifndef EXTRACT 1047 static void ShowResult(int rc , int iSym)1088 static void ShowResult(int rc) 1048 1089 { 1049 1090 int i; … … 1075 1116 * symbol-file 1076 1117 */ 1077 if (rc == NO_ERROR || (rc > ERROR_PROB_SYM_LAST && (szUsrSym[0] != '\0' || apszSym[iSym] != NULL))) 1078 printf16(" Found symbolfile: %s\n", 1079 szUsrSym[0] == '\0' ? apszSym[iSym] : szUsrSym); 1118 if (rc == NO_ERROR || (rc > ERROR_PROB_SYM_LAST && szSymbolFile[0] != '\0')) 1119 printf16(" Found symbolfile: %s\n", (NPSZ)szSymbolFile); 1080 1120 else if (rc >= ERROR_PROB_SYM_FIRST) 1081 1121 printf16(" Failed to find symbolfile!\n"); … … 1086 1126 * function listing 1087 1127 */ 1088 if (options.fLogging || rc != NO_ERROR)1128 if (options.fLogging)/* || rc != NO_ERROR)*/ 1089 1129 { 1090 1130 for (i = 0; i < NBR_OF_KRNLIMPORTS; i++) … … 1105 1145 { 1106 1146 const char *psz = GetErrorMsg(rc); 1107 printf16("ProbeKernel failed with rc=%d. \n", rc);1147 printf16("ProbeKernel failed with rc=%d. iProc=%x\n", rc, iProc); 1108 1148 if (psz) printf16("%s\n", psz); 1109 1149 } … … 1167 1207 && pReqPack->InitArgs[i] != 'm' && pReqPack->InitArgs[i] != 'M' 1168 1208 ) /* -script and -smp is ignored */ 1169 i += kargncpy(sz UsrSym, &pReqPack->InitArgs[i], sizeof(szUsrSym));1209 i += kargncpy(szSymbolFile, &pReqPack->InitArgs[i], sizeof(szSymbolFile)); 1170 1210 break; 1171 1211 … … 1222 1262 { 1223 1263 rc = 1; 1224 if (sz UsrSym[0] != '\0')1225 { 1226 rc = ProbeSymFile(sz UsrSym);1264 if (szSymbolFile[0] != '\0') 1265 { 1266 rc = ProbeSymFile(szSymbolFile); 1227 1267 if (rc) 1228 1268 { 1229 printf16("Warning: Invalid symbol file specified. Tries defaults.\n"); 1230 szUsrSym[0] = '\0'; 1269 printf16("Warning: Invalid symbol file specified. rc=%x iProc=%d\n" 1270 " Tries defaults.\n", rc, iProc); 1271 szSymbolFile[0] = '\0'; 1272 DosSleep(3000); 1231 1273 } 1232 1274 } … … 1255 1297 { 1256 1298 i++; 1257 if (rc2 >= ERROR_PROB_SYM_ VERIFY_FIRST)1299 if (rc2 >= ERROR_PROB_SYM_D32_FIRST) 1258 1300 rc = rc2; 1259 1301 } 1260 if (rc == 1 || rc2 == NO_ERROR) 1302 if (rc == NO_ERROR) 1303 kstrcpy(szSymbolFile, apszSym[i]); 1304 else if (rc == 1 || rc2 == NO_ERROR) 1261 1305 rc = rc2; 1262 1306 #endif … … 1265 1309 } 1266 1310 1267 /* show the result and set return-value */ 1268 dprintf(("rc=%d; i=%d\n", rc, i)); 1269 ShowResult(rc, i); 1270 1271 /* Copy the symbol file name to szUsrSym. */ 1272 if (szUsrSym[0] == '\0' && apszSym[i] != NULL) 1273 kstrcpy(szUsrSym, apszSym[i]); 1311 /* Show the result and set return-value */ 1312 dprintf(("rc=%d(0x%x); i=%d; iProc=%d\n", rc, rc, i, iProc)); 1313 ShowResult(rc); 1274 1314 1275 1315 return rc; … … 1714 1754 int i; 1715 1755 1716 printf16("/* $Id: probkrnl.c,v 1.2 1 2000-09-02 21:07:56bird Exp $\n"1756 printf16("/* $Id: probkrnl.c,v 1.22 2000-09-04 16:40:48 bird Exp $\n" 1717 1757 "*\n" 1718 1758 "* Autogenerated kernel symbol database.\n" -
trunk/src/win32k/dev32/d32init.c
r4181 r4185 1 /* $Id: d32init.c,v 1.2 1 2000-09-04 02:04:20bird Exp $1 /* $Id: d32init.c,v 1.22 2000-09-04 16:40:49 bird Exp $ 2 2 * 3 3 * d32init.c - 32-bits init routines. … … 351 351 if (heapInit(options.cbResHeapInit, options.cbResHeapMax, 352 352 options.cbSwpHeapInit, options.cbSwpHeapMax) != NO_ERROR) 353 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL;353 return ERROR_D32_HEAPINIT_FAILED; 354 354 355 355 /* loader */ 356 if (!options.fNoLoader) 357 if (ldrInit() != NO_ERROR) 358 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL; 356 if (ldrInit() != NO_ERROR) 357 return ERROR_D32_LDR_INIT_FAILED; 359 358 360 359 /* functionoverrides */ 361 if (!options.fNoLoader) 362 if (importTabInit() != NO_ERROR) 363 return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL; 360 if ((rc = importTabInit()) != NO_ERROR) 361 return rc; 364 362 365 363 /* … … 393 391 kprintf(("16-bit data segment lock failed with with rc=%d\n", rc)); 394 392 395 return STATUS_DONE;393 return NO_ERROR; 396 394 } 397 395 … … 1051 1049 /** 1052 1050 * Verifies the aImportTab. 1053 * @returns 0 if ok. !0 if not ok. 1051 * @returns 16-bit errorcode where the high byte is the procedure number which 1052 * the error occured on and the low byte the error code. 1054 1053 * @remark Called from IOCtl. 1055 1054 * WARNING! This function is called before the initroutine (R0INIT)! … … 1068 1067 usRc = GetKernelInfo32(NULL); 1069 1068 if (usRc != NO_ERROR) 1070 return (USHORT)(STATUS_DONE | STERR | (usRc & STECODE));1069 return usRc; 1071 1070 1072 1071 /* … … 1090 1089 { 1091 1090 kprintf(("VerifyImportTab32: procedure no.%d was not fFound!\n", i)); 1092 return STATUS_DONE | STERR | ERROR_D32_PROC_NOT_FOUND;1091 return (USHORT)(ERROR_D32_PROC_NOT_FOUND | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1093 1092 } 1094 1093 } 1095 1094 1096 1095 /* Verify read/writeable. */ 1097 if ( aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt /* object index valid? */1096 if ( aImportTab[i].iObject >= pKrnlSMTE->smte_objcnt /* object index valid? */ 1098 1097 || aImportTab[i].ulAddress < pKrnlOTE[aImportTab[i].iObject].ote_base /* address valid? */ 1099 1098 || aImportTab[i].ulAddress + 16 > (pKrnlOTE[aImportTab[i].iObject].ote_base + … … 1107 1106 i, &aImportTab[i].achName[0], aImportTab[i].ulAddress, 1108 1107 aImportTab[i].iObject, aImportTab[i].offObject)); 1109 return STATUS_DONE | STERR | ERROR_D32_INVALID_OBJ_OR_ADDR;1108 return (USHORT)(ERROR_D32_INVALID_OBJ_OR_ADDR | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1110 1109 } 1111 1110 … … 1116 1115 kprintf(("VerifyImportTab32: procedure no.%d has an invalid address, %#08x!\n", 1117 1116 i, aImportTab[i].ulAddress)); 1118 return STATUS_DONE | STERR | ERROR_D32_INVALID_ADDRESS;1117 return (USHORT)(ERROR_D32_INVALID_ADDRESS | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1119 1118 } 1120 1119 #endif … … 1146 1145 { /* failed, too small or too large. */ 1147 1146 kprintf(("VerifyImportTab32: verify failed for procedure no.%d (cb=%d)\n", i, cb)); 1148 return STATUS_DONE | STERR | ERROR_D32_TOO_INVALID_PROLOG;1147 return (USHORT)(ERROR_D32_TOO_INVALID_PROLOG | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1149 1148 } 1150 1149 break; … … 1157 1156 kprintf(("VerifyImportTab32: invalid type/type not implemented\n",i)); 1158 1157 Int3(); /* temporary fix! */ 1159 return STATUS_DONE | STERR | ERROR_D32_NOT_IMPLEMENTED;1158 return (USHORT)(ERROR_D32_NOT_IMPLEMENTED | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG); 1160 1159 } 1161 1160 } 1162 1161 1163 return STATUS_DONE;1162 return NO_ERROR; 1164 1163 } 1165 1164 … … 1167 1166 /** 1168 1167 * Initiates the overrided functions. 1169 * @returns NO_ERROR on success. !0 on error. 1168 * @returns 16-bit errorcode where the high byte is the procedure number which 1169 * the error occured on and the low byte the error code. 1170 1170 */ 1171 1171 int importTabInit(void) … … 1256 1256 { 1257 1257 kprintf(("ImportTabInit: Verify failed for procedure no.%d, cb=%d\n", i, cb)); 1258 return ERROR_D32_VERIFY_FAILED ;1258 return ERROR_D32_VERIFY_FAILED | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1259 1259 } 1260 1260 } … … 1302 1302 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i)); 1303 1303 Int3(); /* ipe - later! */ 1304 return ERROR_D32_ VERIFY_FAILED;1304 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1305 1305 } 1306 1306 break; … … 1347 1347 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i)); 1348 1348 Int3(); /* ipe - later! */ 1349 return ERROR_D32_ VERIFY_FAILED;1349 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1350 1350 } 1351 1351 break; … … 1375 1375 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i)); 1376 1376 Int3(); /* ipe - later! */ 1377 return ERROR_D32_ VERIFY_FAILED;1377 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1378 1378 } 1379 1379 break; … … 1403 1403 kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i)); 1404 1404 Int3(); /* ipe - later! */ 1405 return ERROR_D32_ VERIFY_FAILED;1405 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1406 1406 } 1407 1407 break; … … 1430 1430 kprintf(("ImportTabInit: unsupported type. (procedure no.%d, cb=%d)\n", i, cb)); 1431 1431 Int3(); /* ipe - later! */ 1432 return ERROR_D32_ VERIFY_FAILED;1432 return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG; 1433 1433 } /* switch - type */ 1434 1434 } /* for */ -
trunk/src/win32k/include/dev16.h
r4164 r4185 1 /* $Id: dev16.h,v 1. 9 2000-09-02 21:08:00 bird Exp $1 /* $Id: dev16.h,v 1.10 2000-09-04 16:40:50 bird Exp $ 2 2 * dev16 - 16-bit specific. Should not be used in 32-bit C/C++. 3 3 * … … 28 28 typedef struct _D16R0INITDATA 29 29 { 30 USHORT Status;30 USHORT usRcInit32; 31 31 } D16R0INITDATA; 32 32 typedef D16R0INITDATA FAR *PD16R0INITDATA; … … 49 49 */ 50 50 #define D16_IOCTL_VERIFYIMPORTTAB 0x42 51 typedef struct _D16VERIFYIMPORTTABDATA 52 { 53 USHORT usRc; 54 } D16VERIFYIMPORTTABDATA; 55 typedef D16VERIFYIMPORTTABDATA FAR *PD16VERIFYIMPORTTABDATA; 51 56 52 57 -
trunk/src/win32k/include/errors.h
r4164 r4185 1 /* $Id: errors.h,v 1. 2 2000-09-02 21:08:01bird Exp $1 /* $Id: errors.h,v 1.3 2000-09-04 16:40:50 bird Exp $ 2 2 * 3 3 * Error definitions for Win32k.sys … … 54 54 #define ERROR_PROB_SYM_SEG_DEF_SEEK (ERROR_PROB_BASE + 34) 55 55 #define ERROR_PROB_SYM_SEG_DEF_READ (ERROR_PROB_BASE + 35) 56 #define ERROR_PROB_SYM_VERIFY_FIRST (ERROR_PROB_BASE + 36) 57 #define ERROR_PROB_SYM_V_PROC_NOT_FND (ERROR_PROB_SYM_VERIFY_FIRST + ERROR_D32_PROC_NOT_FOUND - ERROR_D32_VERIFYIMPORTTAB_FIRST) 58 #define ERROR_PROB_SYM_V_OBJ_OR_ADDR (ERROR_PROB_SYM_VERIFY_FIRST + ERROR_D32_INVALID_OBJ_OR_ADDR - ERROR_D32_VERIFYIMPORTTAB_FIRST) 59 #define ERROR_PROB_SYM_V_ADDRESS (ERROR_PROB_SYM_VERIFY_FIRST + ERROR_D32_INVALID_ADDRESS - ERROR_D32_VERIFYIMPORTTAB_FIRST) 60 #define ERROR_PROB_SYM_V_PROLOG (ERROR_PROB_SYM_VERIFY_FIRST + ERROR_D32_TOO_INVALID_PROLOG - ERROR_D32_VERIFYIMPORTTAB_FIRST) 61 #define ERROR_PROB_SYM_V_NOT_IMPL (ERROR_PROB_SYM_VERIFY_FIRST + ERROR_D32_NOT_IMPLEMENTED - ERROR_D32_VERIFYIMPORTTAB_FIRST) 62 /* - reserved for future errors - * 63 #define ERROR_PROB_SYM_ (ERROR_PROB_BASE + 41) 64 #define ERROR_PROB_SYM_ (ERROR_PROB_BASE + 42) */ 65 #define ERROR_PROB_SYM_IMPORTS_NOTFOUND (ERROR_PROB_BASE + 43) 66 #define ERROR_PROB_SYMDB_KRNL_NOT_FOUND (ERROR_PROB_BASE + 44) 56 #define ERROR_PROB_SYM_VERIFY_IOCTL (ERROR_PROB_BASE + 36) 57 #define ERROR_PROB_SYM_D32_FIRST (ERROR_PROB_BASE + 37) 58 #define ERROR_PROB_SYM_V_GETOS2KRNL (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_GETOS2KRNL_FAILED - ERROR_D32_FIRST) 59 #define ERROR_PROB_SYM_V_NO_SWAPMTE (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_NO_SWAPMTE - ERROR_D32_FIRST) 60 #define ERROR_PROB_SYM_V_OBJECTS (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_TOO_MANY_OBJECTS - ERROR_D32_FIRST) 61 #define ERROR_PROB_SYM_V_OBJECT_TABLE (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_NO_OBJECT_TABLE - ERROR_D32_FIRST) 62 #define ERROR_PROB_SYM_V_BUILD_INFO (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_BUILD_INFO_NOT_FOUND - ERROR_D32_FIRST) 63 #define ERROR_PROB_SYM_V_INVALID_BUILD (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_INVALID_BUILD - ERROR_D32_FIRST) 64 #define ERROR_PROB_SYM_V_VERIFY (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_VERIFY_FAILED - ERROR_D32_FIRST) 65 #define ERROR_PROB_SYM_V_IPE (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_IPE - ERROR_D32_FIRST) 66 #define ERROR_PROB_SYM_V_HEAPINIT (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_HEAPINIT_FAILED - ERROR_D32_FIRST) 67 #define ERROR_PROB_SYM_V_PROC_NOT_FND (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_PROC_NOT_FOUND - ERROR_D32_FIRST) 68 #define ERROR_PROB_SYM_V_OBJ_OR_ADDR (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_INVALID_OBJ_OR_ADDR - ERROR_D32_FIRST) 69 #define ERROR_PROB_SYM_V_ADDRESS (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_INVALID_ADDRESS - ERROR_D32_FIRST) 70 #define ERROR_PROB_SYM_V_PROLOG (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_TOO_INVALID_PROLOG - ERROR_D32_FIRST) 71 #define ERROR_PROB_SYM_V_NOT_IMPL (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_NOT_IMPLEMENTED - ERROR_D32_FIRST) 72 #define ERROR_PROB_SYM_V_D32_LDR_INIT (ERROR_PROB_SYM_D32_FIRST + ERROR_D32_LDR_INIT_FAILED - ERROR_D32_FIRST) 73 #define ERROR_PROB_SYM_D32_LAST ERROR_PROB_SYM_V_D32_LDR_INIT 74 /* - reserved for future errors - */ 75 #define ERROR_PROB_SYM_IMPORTS_NOTFOUND (ERROR_PROB_BASE + 100) 76 #define ERROR_PROB_SYMDB_KRNL_NOT_FOUND (ERROR_PROB_BASE + 101) 67 77 68 78 69 79 70 80 /* 71 * D32initErrors81 * GetKernelInfo32 Errors 72 82 */ 73 #define ERROR_D32_GETOS2KRNL_FAILED 0x01 74 #define ERROR_D32_NO_SWAPMTE 0x02 75 #define ERROR_D32_TOO_MANY_OBJECTS 0x03 76 #define ERROR_D32_NO_OBJECT_TABLE 0x04 77 #define ERROR_D32_BUILD_INFO_NOT_FOUND 0x05 78 #define ERROR_D32_INVALID_BUILD 0x06 83 #define ERROR_D32_FIRST 0x0001 84 #define ERROR_D32_LAST ERROR_D32_NOT_IMPLEMENTED 85 #define ERROR_D32_GETOS2KRNL_FAILED (0x0000 + ERROR_D32_FIRST) 86 #define ERROR_D32_NO_SWAPMTE (0x0001 + ERROR_D32_FIRST) 87 #define ERROR_D32_TOO_MANY_OBJECTS (0x0002 + ERROR_D32_FIRST) 88 #define ERROR_D32_NO_OBJECT_TABLE (0x0003 + ERROR_D32_FIRST) 89 #define ERROR_D32_BUILD_INFO_NOT_FOUND (0x0004 + ERROR_D32_FIRST) 90 #define ERROR_D32_INVALID_BUILD (0x0005 + ERROR_D32_FIRST) 79 91 80 #define ERROR_D32_VERIFYIMPORTTAB_FIRST 0x10 81 #define ERROR_D32_PROC_NOT_FOUND (ERROR_D32_VERIFYIMPORTTAB_FIRST + 0) 82 #define ERROR_D32_INVALID_OBJ_OR_ADDR (ERROR_D32_VERIFYIMPORTTAB_FIRST + 1) 83 #define ERROR_D32_ INVALID_ADDRESS (ERROR_D32_VERIFYIMPORTTAB_FIRST + 2)84 #define ERROR_D32_ TOO_INVALID_PROLOG (ERROR_D32_VERIFYIMPORTTAB_FIRST + 3)85 #define ERROR_D32_ NOT_IMPLEMENTED (ERROR_D32_VERIFYIMPORTTAB_FIRST + 4)86 #define ERROR_D32_ VERIFYIMPORTTAB_LAST 0x1F92 /* 93 * R0Init32 Errors 94 */ 95 #define ERROR_D32_VERIFY_FAILED (0x0006 + ERROR_D32_FIRST) 96 #define ERROR_D32_IPE (0x0007 + ERROR_D32_FIRST) 97 #define ERROR_D32_HEAPINIT_FAILED (0x0008 + ERROR_D32_FIRST) 98 #define ERROR_D32_LDR_INIT_FAILED (0x0009 + ERROR_D32_FIRST) 87 99 88 #define ERROR_D32_VERIFY_FAILED 0x20 100 /* 101 * VerifyImportTab32 errors. 102 */ 103 #define ERROR_D32_PROC_NOT_FOUND (0x000a + ERROR_D32_FIRST) 104 #define ERROR_D32_INVALID_OBJ_OR_ADDR (0x000b + ERROR_D32_FIRST) 105 #define ERROR_D32_INVALID_ADDRESS (0x000c + ERROR_D32_FIRST) 106 #define ERROR_D32_TOO_INVALID_PROLOG (0x000d + ERROR_D32_FIRST) 107 #define ERROR_D32_NOT_IMPLEMENTED (0x000e + ERROR_D32_FIRST) 108 109 /* 110 * Procedure shift and mask. 111 * Used to get or set the procedure number of an error code. 112 */ 113 #define ERROR_D32_ERROR_MASK 0xff00 114 #define ERROR_D32_PROC_MASK 0x7f00 115 #define ERROR_D32_PROC_FLAG 0x8000 116 #define ERROR_D32_PROC_SHIFT 0x8 89 117 90 118 -
trunk/src/win32k/include/probkrnl.h
r4164 r4185 1 /* $Id: probkrnl.h,v 1.1 4 2000-09-02 21:08:04bird Exp $1 /* $Id: probkrnl.h,v 1.15 2000-09-04 16:40:50 bird Exp $ 2 2 * 3 3 * Include file for ProbKrnl. … … 98 98 *******************************************************************************/ 99 99 extern IMPORTKRNLSYM DATA16_GLOBAL aImportTab[NBR_OF_KRNLIMPORTS]; /* Defined in ProbKrnl.c */ 100 extern char DATA16_GLOBAL sz UsrSym[50];/* Defined in ProbKrnl.c */100 extern char DATA16_GLOBAL szSymbolFile[60]; /* Defined in ProbKrnl.c */ 101 101 extern KRNLDBENTRY DATA16_INIT aKrnlSymDB[]; /* Defined in symdb.c (for 16-bit usage) */ 102 102 103 103 #if defined(__IBMC__) || defined(__IBMCPP__) 104 #pragma map( aImportTab , "_aImportTab" )105 #pragma map( sz UsrSym , "_szUsrSym")106 #pragma map( aKrnlSymDB , "_aKrnlSymDB" )104 #pragma map( aImportTab , "_aImportTab" ) 105 #pragma map( szSymbolFile,"_szSymbolFile") 106 #pragma map( aKrnlSymDB , "_aKrnlSymDB" ) 107 107 #endif 108 108 109 /* 110 * 16-bit init time functions. 111 */ 109 112 #if defined(INCL_16) && defined(MAX_DISKDD_CMD) /* 16-bit only */ 110 113 int ProbeKernel(PRPINITIN pReqPack); 111 112 #if 0 /*ndef CODE16_INIT*/ 113 #pragma alloc_text(CODE16_INIT, ProbeKernel) 114 const char * GetErrorMsg(short sErr); 114 115 #endif 115 116 116 117 #endif 117 118 118 #endif119 -
trunk/src/win32k/k32/k32QueryOptionsStatus.cpp
r4164 r4185 1 /* $Id: k32QueryOptionsStatus.cpp,v 1. 2 2000-09-02 21:08:06bird Exp $1 /* $Id: k32QueryOptionsStatus.cpp,v 1.3 2000-09-04 16:40:50 bird Exp $ 2 2 * 3 3 * k32QueryOptionsStatus - Queries the options and/or the status of … … 152 152 153 153 /* initate the temporary structure */ 154 memset( &TmpStatus, 0, sizeof(K32STATUS));154 memset(SSToDS(&TmpStatus), 0, sizeof(K32STATUS)); 155 155 TmpStatus.cb = sizeof(K32STATUS); 156 156 … … 185 185 186 186 /* Win32k Build and version; and symfile name or SymDB. */ 187 strcpy( TmpStatus.szBuildDate, szBuildDate);/* Date of the win32k build. */188 strcpy( TmpStatus.szBuildTime, szBuildTime);/* Time of the win32k build. */187 strcpy((char*)SSToDS(TmpStatus.szBuildDate), szBuildDate); /* Date of the win32k build. */ 188 strcpy((char*)SSToDS(TmpStatus.szBuildTime), szBuildTime); /* Time of the win32k build. */ 189 189 TmpStatus.ulVersion = PE2LX_VERSION; /* Win32k version */ 190 strcpy( TmpStatus.szSymFile, szUsrSym);/* The name of the symbol file or sym database. */190 strcpy((char*)SSToDS(TmpStatus.szSymFile), szSymbolFile); /* The name of the symbol file or sym database. */ 191 191 192 192 /* Module counts */
Note:
See TracChangeset
for help on using the changeset viewer.