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/ldr/myldrOpen.cpp

    r1273 r1467  
    1 /* $Id: myldrOpen.cpp,v 1.2 1999-10-14 01:25:38 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.3 1999-10-27 02:02:58 bird Exp $
    22 *
    33 * myldrOpen - _ldrOpen.
     
    2929#include "OS2Krnl.h"
    3030#include "pe2lx.h"
     31#include "elf.h"
     32#include "avl.h"
    3133#include "ldr.h"
    3234#include "ldrCalls.h"
    3335
    34 #include "elf.h"
    3536
    3637/**
     
    7172                if (rc == NO_ERROR && *(PULONG)pach == IMAGE_NT_SIGNATURE)
    7273                {   /* PE signature found */
    73                     PPENODE pNode;
     74                    PMODULE pMod;
    7475
    75                     kprintf(("_ldrOpen: PE executable!(?)\n"));
     76                    kprintf(("_ldrOpen: PE executable...\n"));
    7677                    #pragma info(none)
    7778                    if (/* invoke pe.exe or do conversion now? */ 1)
    7879                    {   /* pe2lx - win32k */
    7980                    #pragma info(restore)
    80                         pNode = allocateNode();
    81                         if (pNode != NULL)
     81                        Pe2Lx * pPe2Lx = new Pe2Lx(*phFile);
     82                        if (pPe2Lx != NULL)
    8283                        {
    83                             pNode->pPe2Lx = new Pe2Lx(*phFile);
    84                             if (pNode->pPe2Lx != NULL)
     84                            rc = pPe2Lx->init(pszFilename);
     85                            if (rc == NO_ERROR)
    8586                            {
    86                                 rc = pNode->pPe2Lx->init(pszFilename);
     87                                kprintf(("_ldrOpen: Successfully init of Pe2Lx object.\n"));
     88                                rc = addModule(*phFile, NULL, MOD_TYPE_PE2LX, pPe2Lx);
    8789                                if (rc == NO_ERROR)
    88                                 {
    89                                     kprintf(("_ldrOpen: Successfully init of Pe2Lx object.\n"));
    90                                     rc = insertNode(pNode);
    91                                     if (rc != NO_ERROR)
    92                                     {
    93                                         kprintf(("_ldrOpen: Failed to insert PeNode into tree. rc=%d\n"));
    94                                         delete pNode->pPe2Lx;
    95                                         pNode->pPe2Lx = NULL;
    96                                         freeNode(pNode);
    97                                         SetState(*phFile, HSTATE_OUR);
    98                                     }
    99                                 }
     90                                    SetState(*phFile, HSTATE_OUR);
    10091                                else
    101                                 {
    102                                     kprintf(("_ldrOpen: Failed to init Pe2Lx object. rc=%d\n"));
    103                                     delete pNode->pPe2Lx;
    104                                     pNode->pPe2Lx = NULL;
    105                                     freeNode(pNode);
    106                                 }
     92                                    kprintf(("_ldrOpen: Failed to add the module. rc=%d\n"));
    10793                            }
    10894                            else
    109                             {
    110                                 kprintf(("_ldrOpen: Failed to allocate Pe2Lx object.\n"));
    111                                 freeNode(pNode);
    112                             }
     95                                kprintf(("_ldrOpen: Failed to init Pe2Lx object. rc=%d\n"));
     96                            if (rc != NO_ERROR)
     97                                delete pPe2Lx;
    11398                        }
    11499                        else
    115                             kprintf(("_ldrOpen: Failed to allocate node.\n"));
     100                            kprintf(("_ldrOpen: Failed to allocate Pe2Lx object.\n"));
    116101                    }
    117102                    else
Note: See TracChangeset for help on using the changeset viewer.