Ignore:
Timestamp:
Oct 27, 1999, 4:03:01 AM (26 years ago)
Author:
bird
Message:

Corrections to make win32k work.
(And now it does work, at least at my test machine...)

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:55 bird Exp $
     1/* $Id: d16init.c,v 1.2 1999-10-27 02:02:53 bird Exp $
    22 *
    33 * d16init - init routines for both drivers.
     
    3333#include <memory.h>
    3434
     35#include "probkrnl.h"
    3536#include "dev1632.h"
    3637#include "dev16.h"
    37 
    3838
    3939/**
     
    6161/**
    6262 * init function - device 1.
    63  * We will send an IOCtl request to the win32i$ (device 0) which will
     63 * We will send an IOCtl request to the elf$ (device 0) which will
    6464 * perform the Ring-0 initiation of the driver.
    6565 * @returns   Status word.
     
    7777    NPSZ            npszErrMsg = NULL;
    7878
    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);
    8380    if (rc == NO_ERROR)
    8481    {
    85         param.pRpInitIn = pRpIn;
    86         rc = DosDevIOCtl(&data, &param, 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);
    8886        if (rc == NO_ERROR)
    8987        {
    90             if (data.Status != STATUS_DONE)
    91                 npszErrMsg = "Ring-0 initiation failed\n\r";
     88            param.pRpInitIn = pRpIn;
     89            rc = DosDevIOCtl(&data, &param, 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            }
    92101            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);
    98104        }
    99105        else
    100             npszErrMsg = "DosDevIOCtl failed\n\r";
    101         DosClose(hDev0);
     106            npszErrMsg = "DosOpen failed.\n\r";
    102107    }
    103108    else
    104         npszErrMsg = "DosOpen failed\n\r";
    105 
     109        npszErrMsg = "ProbeKernel failed.\n\r";
    106110    pRpOut->BPBArray = NULL;
    107111    pRpOut->CodeEnd = (USHORT)&CODE16END;
     
    144148
    145149        pDT2 = (PDOSTABLE2)((char FAR *)pDT + pDT->cul*4 + 1);
    146         TKSSBase16 = pDT2->TKSSBase;
     150        TKSSBase16 = (ULONG)pDT2->pTKSSBase;
    147151        R0FlatCS16 = (USHORT)pDT2->R0FlatCS;
    148152        R0FlatDS16 = (USHORT)pDT2->R0FlatDS;
     
    169173                   )
    170174                {
    171                     /*_asm int 3;*/
    172175                    usRc = CallR0Init32(SSToDS_16(&rp32init));
    173                     /*_asm int 3;*/
    174176                }
    175177                else
    176178                    usRc |= ERROR_I24_INVALID_PARAMETER;
    177179
    178              ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc;
     180                ((PD16R0INITDATA)pRp->DataPacket)->Status = usRc;
    179181
    180182                /* finished - unlock data and parm */
Note: See TracChangeset for help on using the changeset viewer.