[Mplayer-cvslog] CVS: main/loader/qtx/debug module.c,NONE,1.1

Arpi of Ize arpi at mplayer.dev.hu
Mon Jan 21 01:42:06 CET 2002


Update of /cvsroot/mplayer/main/loader/qtx/debug
In directory mplayer:/var/tmp.root/cvs-serv321

Added Files:
	module.c 
Log Message:
modified GetProcAddress, redirect QT api calls to wrappers

--- NEW FILE ---
/*
 * Modules
 *
 * Copyright 1995 Alexandre Julliard
 */

#include <assert.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "wine/winbase16.h"
#include "winerror.h"
#include "heap.h"
#include "file.h"
#include "module.h"
#include "debugtools.h"
[...1940 lines suppressed...]
   
    if (    (hModule = FarGetOwner16( SELECTOROF(address) )) != 0
         && (gpOrdinal = NE_GetOrdinal( hModule, "__GP" )) != 0
         && (gpPtr = (SEGPTR)NE_GetEntryPointEx( hModule, gpOrdinal, FALSE )) != 0
         && !IsBadReadPtr16( gpPtr, sizeof(GPHANDLERDEF) )
         && (gpHandler = MapSL( gpPtr )) != NULL )
    {
        while (gpHandler->selector)
        {
            if (    SELECTOROF(address) == gpHandler->selector
                 && OFFSETOF(address)   >= gpHandler->rangeStart
                 && OFFSETOF(address)   <  gpHandler->rangeEnd  )
                return MAKESEGPTR( gpHandler->selector, gpHandler->handler );
            gpHandler++;
        }
    }

    return 0;
}





More information about the MPlayer-cvslog mailing list