Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.1 KiB

/* --------------------------------------------------------------------
True link function for fixup callback function pointers (windows 3.0)
-------------------------------------------------------------------- */
#include "windows.h"
#define INCL_WIN
#include "sysinc.h"
#include "rpc.h"
PRPC_MESSAGE _pascal _far WinPatchDispatch(
IN OUT PRPC_MESSAGE pMessage
)
{
PRPC_CLIENT_INTERFACE pClientInterface;
PRPC_DISPATCH_TABLE pDispatchTable;
// BUGBUG - Should handle server interface here also
pClientInterface = (PRPC_CLIENT_INTERFACE) pMessage->RpcInterfaceInformation;
// ASSERT(pClientInterface);
pDispatchTable = pClientInterface->DispatchTable;
if (pDispatchTable && pDispatchTable->Reserved == 0)
{
unsigned int uT;
for (uT = pDispatchTable->DispatchTableCount; uT--;)
pDispatchTable->DispatchTable[uT] = (RPC_DISPATCH_FUNCTION)
MakeProcInstance((FARPROC) pDispatchTable->DispatchTable[uT], 0);
// use the reserved field to note the table has been fixed up
pDispatchTable->Reserved = 1;
}
return(pMessage);
}