Changeset 4185 for trunk/src


Ignore:
Timestamp:
Sep 4, 2000, 6:40:50 PM (25 years ago)
Author:
bird
Message:

Corrected FATAL error in k32QueryOptionsStatus.cpp. (Forgot SSToDS...)
Improved error messages during init.

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:55 bird Exp $
     1/* $Id: d16init.c,v 1.8 2000-09-04 16:40:47 bird Exp $
    22 *
    33 * d16init - init routines for both drivers.
     
    4747#include "log.h"
    4848#include "options.h"
    49 
     49#include "errors.h"
    5050
    5151
     
    9898    USHORT          usAction = 0;
    9999    NPSZ            npszErrMsg = NULL;
     100    NPSZ            npszErrMsg2 = NULL;
    100101
    101102    /*
     
    119120            if (rc == NO_ERROR)
    120121            {
    121                 if ((rc = data.Status) == STATUS_DONE)
     122                if (data.usRcInit32 == NO_ERROR)
    122123                {
    123124                    if (!options.fQuiet)
    124125                        printf16("Win32k.sys succesfully initiated!\n");
    125                     pRpOut->Status = pRpOut->rph.Status = data.Status;
     126                    pRpOut->Status = pRpOut->rph.Status = STATUS_DONE;
    126127                }
    127128                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                }
    129136            }
    130137            else
     
    152159    {
    153160        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;
    155164    }
    156165
     
    167176 * R0 16-bit initiation.
    168177 * 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.
    171181 */
    172182USHORT NEAR  R0Init16(PRP_GENIOCTL pRp)
     
    212222                    !DevHelp_VirtToLin(SELECTOROF(rp32init.InitArgs), OFFSETOF(rp32init.InitArgs), (PLIN)&rp32init.InitArgs)
    213223                   )
    214                 {
     224                {   /* call 32-bit init routine and set 32 bit rc. */
    215225                    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;
    216230                }
    217231                else
    218                     usRc |= ERROR_I24_INVALID_PARAMETER;
    219 
    220                 ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc;
     232                    usRc |= STERR | ERROR_I24_INVALID_PARAMETER;
     233
    221234
    222235                /*
    223                  * finished - unlock data and parm
     236                 * finished - unlock data and parm;
    224237                 */
    225238                DevHelp_VMUnLock((LIN)SSToDS_16(&hLockParm[0]));
     
    227240            }
    228241            else
    229                 usRc |= ERROR_I24_INVALID_PARAMETER;
     242                usRc |= STERR | ERROR_I24_INVALID_PARAMETER;
    230243        }
    231244        else
    232             usRc |= ERROR_I24_INVALID_PARAMETER;
     245            usRc |= STERR | ERROR_I24_INVALID_PARAMETER;
    233246    }
    234247    else
    235         usRc |= ERROR_I24_GEN_FAILURE;
     248        usRc |= STERR | ERROR_I24_GEN_FAILURE;
    236249
    237250    return usRc;
  • trunk/src/win32k/dev16/d16strat.c

    r4164 r4185  
    1 /* $Id: d16strat.c,v 1.9 2000-09-02 21:07:56 bird Exp $
     1/* $Id: d16strat.c,v 1.10 2000-09-04 16:40:48 bird Exp $
    22 *
    33 * d16strat.c - 16-bit strategy routine, device headers, device_helper (ptr)
     
    174174                    if (TKSSBase16 == 0)
    175175                        initGetDosTableData();
    176                     return CallVerifyImportTab32();
     176                    rc = CallVerifyImportTab32();
     177                    if (pRp->DataPacket)
     178                        ((PD16VERIFYIMPORTTABDATA)pRp->DataPacket)->usRc = rc;
     179                    return STATUS_DONE;
    177180                }
    178181                break;
  • trunk/src/win32k/dev16/probkrnl.c

    r4164 r4185  
    1 /* $Id: probkrnl.c,v 1.21 2000-09-02 21:07:56 bird Exp $
     1/* $Id: probkrnl.c,v 1.22 2000-09-04 16:40:48 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    137137};
    138138
    139 char DATA16_GLOBAL  szUsrSym[50] = {0};
     139/**
     140 * szSymbolFile holds the name of the symbol file used.
     141 *
     142 */
     143char DATA16_GLOBAL  szSymbolFile[60] = {0};
     144
     145/**
     146 * iProc holds the number of the procedure which failed during verify.
     147 */
     148int  DATA16_GLOBAL  iProc = -1;         /* The procedure number which failed Verify. */
    140149
    141150
     
    204213
    205214    /*
    206      * ProbeSymFile error messages
     215     * ProbeSymFile error messages + some extra ones.
    207216     */
    208217    {ERROR_PROB_SYM_FILE_NOT_FOUND,     "Sym: Symbol file was not found."},
     
    212221    {ERROR_PROB_SYM_SEG_DEF_SEEK,       "Sym: Failed to seek to a segment definition."},
    213222    {ERROR_PROB_SYM_SEG_DEF_READ,       "Sym: Failed to read a segment definition."},
    214     {ERROR_PROB_SYM_IMPORTS_NOTFOUND,   "Sym: All the imports wasn't found."},
     223    {ERROR_PROB_SYM_IMPORTS_NOTFOUND,   "Sym: Some of the imports wasn't found."},
    215224    {ERROR_PROB_SYM_V_PROC_NOT_FND,     "Sym: Verify failed: Procedure not found."},
    216225    {ERROR_PROB_SYM_V_OBJ_OR_ADDR,      "Sym: Verify failed: Invalid object or address."},
     
    218227    {ERROR_PROB_SYM_V_PROLOG,           "Sym: Verify failed: Invalid prolog."},
    219228    {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."},
    220239
    221240    {ERROR_PROB_SYMDB_KRNL_NOT_FOUND,   "SymDB: Kernel was not found."}
     
    253272static int      kargncpy(char *pszTarget, const char *pszArg, unsigned cchMaxlen);
    254273
    255 static const char * GetErrorMsg(short sErr);
    256 
    257274/* Workers */
    258275static int      LookupKrnlEntry(unsigned short usBuild, unsigned short fKernel, unsigned char cObjects);
     
    262279
    263280/* Ouput */
    264 static void     ShowResult(int rc, int iSym);
     281static void     ShowResult(int rc);
    265282
    266283/* Others used while debugging in R3. */
     
    570587 * @author    knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
    571588 */
    572 static const char * GetErrorMsg(short sErr)
     589const char * GetErrorMsg(short sErr)
    573590{
    574591    int i;
     
    639656            rc = VerifyPrologs();
    640657
    641             /* set sym name */
     658            /* set sym name on success or complain on error */
    642659            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
    644668            return rc;
    645669        }
     
    655679 * Verifies the that the addresses in aImportTab are valid.
    656680 * 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).
    658684 */
    659685static int VerifyPrologs(void)
     
    664690    USHORT          usAction = 0;
    665691
     692    /* Set the failing procedure number to -1. */
     693    iProc = -1;
     694
     695    /* Open the elf device driver. */
    666696    rc = DosOpen("\\dev\\elf$", &hDev0, &usAction, 0UL, FILE_NORMAL,
    667697                 OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS,
     
    670700    if (rc == NO_ERROR)
    671701    {
    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);
    673706        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);
    679721        }
    680722    }
     
    682724    {
    683725        dprintf(("DosOpen Failed with rc=%d\n", rc));
    684         DosSleep(2000);
     726        DosSleep(3000);
    685727    }
    686728
     
    10421084 * Shows result of kernelprobing if not quiet or on error.
    10431085 * @param   rc      Return code.
    1044  * @param   iSym    index of .sym-file into static struct.
    10451086 */
    10461087#ifndef EXTRACT
    1047 static void ShowResult(int rc, int iSym)
     1088static void ShowResult(int rc)
    10481089{
    10491090    int i;
     
    10751116         * symbol-file
    10761117         */
    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);
    10801120        else if (rc >= ERROR_PROB_SYM_FIRST)
    10811121            printf16("    Failed to find symbolfile!\n");
     
    10861126         * function listing
    10871127         */
    1088         if (options.fLogging || rc != NO_ERROR)
     1128        if (options.fLogging)/* || rc != NO_ERROR)*/
    10891129        {
    10901130            for (i = 0; i < NBR_OF_KRNLIMPORTS; i++)
     
    11051145        {
    11061146            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);
    11081148            if (psz) printf16("%s\n", psz);
    11091149        }
     
    11671207                            && pReqPack->InitArgs[i] != 'm' && pReqPack->InitArgs[i] != 'M'
    11681208                            ) /* -script and -smp is ignored */
    1169                             i += kargncpy(szUsrSym, &pReqPack->InitArgs[i], sizeof(szUsrSym));
     1209                            i += kargncpy(szSymbolFile, &pReqPack->InitArgs[i], sizeof(szSymbolFile));
    11701210                        break;
    11711211
     
    12221262    {
    12231263        rc = 1;
    1224         if (szUsrSym[0] != '\0')
    1225         {
    1226             rc = ProbeSymFile(szUsrSym);
     1264        if (szSymbolFile[0] != '\0')
     1265        {
     1266            rc = ProbeSymFile(szSymbolFile);
    12271267            if (rc)
    12281268            {
    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);
    12311273            }
    12321274        }
     
    12551297                {
    12561298                    i++;
    1257                     if (rc2 >= ERROR_PROB_SYM_VERIFY_FIRST)
     1299                    if (rc2 >= ERROR_PROB_SYM_D32_FIRST)
    12581300                        rc = rc2;
    12591301                }
    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)
    12611305                    rc = rc2;
    12621306                #endif
     
    12651309    }
    12661310
    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);
    12741314
    12751315    return rc;
     
    17141754        int         i;
    17151755
    1716         printf16("/* $Id: probkrnl.c,v 1.21 2000-09-02 21:07:56 bird Exp $\n"
     1756        printf16("/* $Id: probkrnl.c,v 1.22 2000-09-04 16:40:48 bird Exp $\n"
    17171757                 "*\n"
    17181758                 "* Autogenerated kernel symbol database.\n"
  • trunk/src/win32k/dev32/d32init.c

    r4181 r4185  
    1 /* $Id: d32init.c,v 1.21 2000-09-04 02:04:20 bird Exp $
     1/* $Id: d32init.c,v 1.22 2000-09-04 16:40:49 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    351351    if (heapInit(options.cbResHeapInit, options.cbResHeapMax,
    352352                 options.cbSwpHeapInit, options.cbSwpHeapMax) != NO_ERROR)
    353         return STATUS_DONE | STERR | ERROR_I24_QUIET_INIT_FAIL;
     353        return ERROR_D32_HEAPINIT_FAILED;
    354354
    355355    /* 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;
    359358
    360359    /* 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;
    364362
    365363    /*
     
    393391        kprintf(("16-bit data segment lock failed with with rc=%d\n", rc));
    394392
    395     return STATUS_DONE;
     393    return NO_ERROR;
    396394}
    397395
     
    10511049/**
    10521050 * 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.
    10541053 * @remark    Called from IOCtl.
    10551054 *            WARNING! This function is called before the initroutine (R0INIT)!
     
    10681067    usRc = GetKernelInfo32(NULL);
    10691068    if (usRc != NO_ERROR)
    1070         return (USHORT)(STATUS_DONE | STERR | (usRc & STECODE));
     1069        return usRc;
    10711070
    10721071    /*
     
    10901089            {
    10911090                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);
    10931092            }
    10941093        }
    10951094
    10961095        /* 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? */
    10981097            || aImportTab[i].ulAddress < pKrnlOTE[aImportTab[i].iObject].ote_base          /* address valid? */
    10991098            || aImportTab[i].ulAddress + 16 > (pKrnlOTE[aImportTab[i].iObject].ote_base +
     
    11071106                     i, &aImportTab[i].achName[0], aImportTab[i].ulAddress,
    11081107                     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);
    11101109        }
    11111110
     
    11161115            kprintf(("VerifyImportTab32: procedure no.%d has an invalid address, %#08x!\n",
    11171116                     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);
    11191118        }
    11201119        #endif
     
    11461145                {   /* failed, too small or too large. */
    11471146                    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);
    11491148                }
    11501149                break;
     
    11571156                kprintf(("VerifyImportTab32: invalid type/type not implemented\n",i));
    11581157                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);
    11601159        }
    11611160    }
    11621161
    1163     return STATUS_DONE;
     1162    return NO_ERROR;
    11641163}
    11651164
     
    11671166/**
    11681167 * 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.
    11701170 */
    11711171int importTabInit(void)
     
    12561256        {
    12571257            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;
    12591259        }
    12601260    }
     
    13021302                    kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i));
    13031303                    Int3(); /* ipe - later! */
    1304                     return ERROR_D32_VERIFY_FAILED;
     1304                    return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG;
    13051305                }
    13061306                break;
     
    13471347                    kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when rehooking it!\n", i));
    13481348                    Int3(); /* ipe - later! */
    1349                     return ERROR_D32_VERIFY_FAILED;
     1349                    return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG;
    13501350                }
    13511351                break;
     
    13751375                    kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i));
    13761376                    Int3(); /* ipe - later! */
    1377                     return ERROR_D32_VERIFY_FAILED;
     1377                    return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG;
    13781378                }
    13791379                break;
     
    14031403                    kprintf(("ImportTabInit: FATAL verify failed for procedure no.%d when importing it!\n", i));
    14041404                    Int3(); /* ipe - later! */
    1405                     return ERROR_D32_VERIFY_FAILED;
     1405                    return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG;
    14061406                }
    14071407                break;
     
    14301430                kprintf(("ImportTabInit: unsupported type. (procedure no.%d, cb=%d)\n", i, cb));
    14311431                Int3(); /* ipe - later! */
    1432                 return ERROR_D32_VERIFY_FAILED;
     1432                return ERROR_D32_IPE | (i << ERROR_D32_PROC_SHIFT) | ERROR_D32_PROC_FLAG;
    14331433        } /* switch - type */
    14341434    }   /* 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 $
    22 * dev16 - 16-bit specific. Should not be used in 32-bit C/C++.
    33 *
     
    2828typedef struct _D16R0INITDATA
    2929{
    30     USHORT Status;
     30    USHORT usRcInit32;
    3131} D16R0INITDATA;
    3232typedef D16R0INITDATA FAR *PD16R0INITDATA;
     
    4949 */
    5050#define D16_IOCTL_VERIFYIMPORTTAB   0x42
     51typedef struct _D16VERIFYIMPORTTABDATA
     52{
     53    USHORT usRc;
     54} D16VERIFYIMPORTTABDATA;
     55typedef D16VERIFYIMPORTTABDATA FAR *PD16VERIFYIMPORTTABDATA;
    5156
    5257
  • trunk/src/win32k/include/errors.h

    r4164 r4185  
    1 /* $Id: errors.h,v 1.2 2000-09-02 21:08:01 bird Exp $
     1/* $Id: errors.h,v 1.3 2000-09-04 16:40:50 bird Exp $
    22 *
    33 * Error definitions for Win32k.sys
     
    5454#define ERROR_PROB_SYM_SEG_DEF_SEEK                 (ERROR_PROB_BASE + 34)
    5555#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)
    6777
    6878
    6979
    7080/*
    71  * D32init Errors
     81 * GetKernelInfo32 Errors
    7282 */
    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)
    7991
    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              0x1F
     92/*
     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)
    8799
    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
    89117
    90118
  • trunk/src/win32k/include/probkrnl.h

    r4164 r4185  
    1 /* $Id: probkrnl.h,v 1.14 2000-09-02 21:08:04 bird Exp $
     1/* $Id: probkrnl.h,v 1.15 2000-09-04 16:40:50 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    9898*******************************************************************************/
    9999extern IMPORTKRNLSYM DATA16_GLOBAL  aImportTab[NBR_OF_KRNLIMPORTS]; /* Defined in ProbKrnl.c */
    100 extern char          DATA16_GLOBAL  szUsrSym[50];                   /* Defined in ProbKrnl.c */
     100extern char          DATA16_GLOBAL  szSymbolFile[60];               /* Defined in ProbKrnl.c */
    101101extern KRNLDBENTRY   DATA16_INIT    aKrnlSymDB[];                   /* Defined in symdb.c (for 16-bit usage) */
    102102
    103103#if defined(__IBMC__) || defined(__IBMCPP__)
    104     #pragma map( aImportTab , "_aImportTab" )
    105     #pragma map( szUsrSym   , "_szUsrSym"   )
    106     #pragma map( aKrnlSymDB , "_aKrnlSymDB" )
     104    #pragma map( aImportTab , "_aImportTab"  )
     105    #pragma map( szSymbolFile,"_szSymbolFile")
     106    #pragma map( aKrnlSymDB , "_aKrnlSymDB"  )
    107107#endif
    108108
     109/*
     110 * 16-bit init time functions.
     111 */
    109112#if defined(INCL_16) && defined(MAX_DISKDD_CMD) /* 16-bit only */
    110113int ProbeKernel(PRPINITIN pReqPack);
    111 
    112 #if 0 /*ndef CODE16_INIT*/
    113 #pragma alloc_text(CODE16_INIT, ProbeKernel)
     114const char *    GetErrorMsg(short sErr);
    114115#endif
    115116
    116117#endif
    117118
    118 #endif
    119 
  • trunk/src/win32k/k32/k32QueryOptionsStatus.cpp

    r4164 r4185  
    1 /* $Id: k32QueryOptionsStatus.cpp,v 1.2 2000-09-02 21:08:06 bird Exp $
     1/* $Id: k32QueryOptionsStatus.cpp,v 1.3 2000-09-04 16:40:50 bird Exp $
    22 *
    33 * k32QueryOptionsStatus  - Queries the options and/or the status of
     
    152152
    153153        /* initate the temporary structure */
    154         memset(&TmpStatus, 0, sizeof(K32STATUS));
     154        memset(SSToDS(&TmpStatus), 0, sizeof(K32STATUS));
    155155        TmpStatus.cb = sizeof(K32STATUS);
    156156
     
    185185
    186186        /* 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. */
    189189        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. */
    191191
    192192        /* Module counts */
Note: See TracChangeset for help on using the changeset viewer.