1483 lines
41 KiB
C
1483 lines
41 KiB
C
|
|
/*
|
|
* This file is generated by the automatic RPC Parser generator. (Version 0.21)
|
|
*
|
|
* Created on 04/09/97 at 00:00:13.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "funcs.h"
|
|
|
|
/*
|
|
* The following functions are generated by default and used by
|
|
* the AttachProperties functions below.
|
|
*/
|
|
|
|
void WINAPIV GenericFormatSummary(LPPROPERTYINST lpPropertyInst)
|
|
{
|
|
DWORD Data = lpPropertyInst->lpPropertyInstEx->Dword[0];
|
|
BOOL fIsRequest = ((Data & 0x80000000) != 0);
|
|
WORD nProcedure = (WORD)(Data & 0xffff);
|
|
WORD nInterface = ((WORD)(Data & 0x7fff) >> 16);
|
|
|
|
wsprintf(lpPropertyInst->szPropertyText, "RPC %s %s:%s(..)",
|
|
(fIsRequest)?"Client call":"Server response",
|
|
InterfaceNames[nInterface],
|
|
ProcedureNames[ProcedureNameIndex[nInterface] + nProcedure - FirstProcedureNumber[nInterface]]);
|
|
}
|
|
|
|
void GenericAttachByte(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
sizeof(BYTE),
|
|
lpData,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
void GenericAttachWord(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
sizeof(WORD),
|
|
lpData,
|
|
0, IndentLevel,
|
|
(fIsFlipped)?IFLAG_SWAPPED:0);
|
|
}
|
|
|
|
void GenericAttachDword(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
sizeof(DWORD),
|
|
lpData,
|
|
0, IndentLevel,
|
|
(fIsFlipped)?IFLAG_SWAPPED:0);
|
|
}
|
|
|
|
void GenericAttachLargeint(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
8,
|
|
lpData,
|
|
0, IndentLevel,
|
|
(fIsFlipped)?IFLAG_SWAPPED:0);
|
|
}
|
|
|
|
void GenericAttachString(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nLength,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
nLength,
|
|
lpData,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
void GenericAttachUnicodeString(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nLength,
|
|
DWORD IndentLevel)
|
|
{
|
|
TYPED_STRING ts;
|
|
|
|
ts.StringType = TYPED_STRING_UNICODE;
|
|
ts.lpString = lpData;
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
if (nLength)
|
|
AttachPropertyInstanceEx(hFrame,
|
|
hProperty,
|
|
nLength,
|
|
lpData,
|
|
nLength,
|
|
&ts,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
void GenericAttachAnything(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nLength,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
nLength,
|
|
lpData,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
void GenericAttachStruct(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nLength,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
nLength,
|
|
lpData,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
void GenericAttachID(HPROPERTY hProperty,
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD IndentLevel)
|
|
{
|
|
if (IndentLevel > 14) IndentLevel = 14;
|
|
AttachPropertyInstance(hFrame,
|
|
hProperty,
|
|
16,
|
|
lpData,
|
|
0, IndentLevel, 0);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmCreateResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = DllName_Handler_0(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceType_Handler_1(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceName_Handler_2(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_LOOKSALIVEPOLL_3].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_ISALIVEPOLL_4].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_NOTIFYKEY_5].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_PENDINGTIMEOUT_6].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
else
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = Value_Handler_3(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmCloseResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_4(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_4(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmChangeResourceParams_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_LOOKSALIVEPOLL_3].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_ISALIVEPOLL_4].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_PENDINGTIMEOUT_6].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmOnlineResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_PDWSTATE_10].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmOfflineResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_PDWSTATE_10].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmTerminateResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmArbitrateResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmReleaseResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmNotifyChanges_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_LPNOTIFYKEY_11].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_LPNOTIFYEVENT_12].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_LPCURRENTSTATE_13].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmFailResource_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmShutdownProcess_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
}
|
|
else
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmResourceControl_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceId_Handler_5(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_CONTROLCODE_14].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = InBuffer_Handler_6(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_INBUFFERSIZE_16].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_OUTBUFFERSIZE_17].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
else
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = OutBuffer_Handler_7(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_LPDWORD_BYTESREFURNED_19].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_LPDWORD_REQUIRED_20].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD WINAPI resmon_RmResourceTypeControl_AttachProperties(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD FrameLength,
|
|
DWORD nCurrentInterface,
|
|
DWORD InstData)
|
|
{
|
|
/* Decompose the InstData information. */
|
|
BOOL fIsRequest = ((InstData & 0x80000000) != 0);
|
|
WORD Version = ((WORD)(InstData >> 16) & 0x3fff);
|
|
|
|
BOOL fExtensions = 0;
|
|
|
|
DWORD nOffset = 0;
|
|
|
|
/* These are specifically for calling handler functions */
|
|
DWORD PointerDataOffset = nOffset;
|
|
DWORD *lpdwPointerDataOffset = &PointerDataOffset;
|
|
|
|
fIsFlipped = ((InstData & 0x40000000) != 0);
|
|
|
|
nCurrentInterface = (nCurrentInterface & 0x7fff) << 16;
|
|
InstData &= 0x8000ffff;
|
|
InstData |= nCurrentInterface;
|
|
AttachPropertyInstanceEx(hFrame,
|
|
resmon_Database[I0_SUMMARY].hProperty,
|
|
FrameLength, lpData, sizeof(DWORD), &InstData, 0, 0, 0);
|
|
|
|
/* Take different action based on the direction */
|
|
/* If fIsRequest is TRUE, the packet originated from the client. */
|
|
if (fIsRequest)
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = ResourceTypeName_Handler_8(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = DllName_Handler_0(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_CONTROLCODE_14].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = InBuffer_Handler_9(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_INBUFFERSIZE_16].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_DWORD_OUTBUFFERSIZE_17].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
else
|
|
{
|
|
fConformanceIsSet = FALSE;
|
|
nOffset = OutBuffer_Handler_10(hFrame, lpData, nOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
if (*lpdwPointerDataOffset > nOffset) nOffset = *lpdwPointerDataOffset;
|
|
|
|
if ((*lpdwPointerDataOffset == 0xffffffff) ||
|
|
(*lpdwPointerDataOffset > FrameLength))
|
|
nOffset = FrameLength;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_LPDWORD_BYTESREFURNED_19].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_LPDWORD_REQUIRED_20].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
ALIGN(nOffset, 3);
|
|
if ((nOffset+4) > FrameLength) return(FrameLength);
|
|
GenericAttachDword(resmon_Database[I0_RETURN_VALUE_9].hProperty, hFrame, lpData + nOffset, nPropertyLevel);
|
|
nOffset += 4;
|
|
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD DllName_Handler_0(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* LPCWSTR DllName [FC_C_WSTRING] at offset 2 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 8;
|
|
|
|
{
|
|
DWORD Length;
|
|
|
|
Length = DWORDAT(lpData + nOffset) * sizeof(wchar_t);
|
|
nOffset += 4;
|
|
|
|
if ((nOffset+Length) > FrameLength) return(FrameLength);
|
|
|
|
GenericAttachUnicodeString(resmon_Database[I0_LPCWSTR_DLLNAME_22].hProperty, hFrame, lpData + nOffset, Length, nPropertyLevel);
|
|
nOffset += Length;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD ResourceType_Handler_1(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* LPCWSTR ResourceType [FC_C_WSTRING] at offset 2 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 8;
|
|
|
|
{
|
|
DWORD Length;
|
|
|
|
Length = DWORDAT(lpData + nOffset) * sizeof(wchar_t);
|
|
nOffset += 4;
|
|
|
|
if ((nOffset+Length) > FrameLength) return(FrameLength);
|
|
|
|
GenericAttachUnicodeString(resmon_Database[I0_LPCWSTR_RESOURCETYPE_23].hProperty, hFrame, lpData + nOffset, Length, nPropertyLevel);
|
|
nOffset += Length;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD ResourceName_Handler_2(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* LPCWSTR ResourceName [FC_C_WSTRING] at offset 2 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 8;
|
|
|
|
{
|
|
DWORD Length;
|
|
|
|
Length = DWORDAT(lpData + nOffset) * sizeof(wchar_t);
|
|
nOffset += 4;
|
|
|
|
if ((nOffset+Length) > FrameLength) return(FrameLength);
|
|
|
|
GenericAttachUnicodeString(resmon_Database[I0_LPCWSTR_RESOURCENAME_24].hProperty, hFrame, lpData + nOffset, Length, nPropertyLevel);
|
|
nOffset += Length;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD Value_Handler_3(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* Return Value [FC_BIND_CONTEXT] at offset 4 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
GenericAttachStruct(resmon_Database[I0_RETURN_VALUE_25].hProperty,
|
|
hFrame,
|
|
lpData + nOffset,
|
|
20,
|
|
nPropertyLevel);
|
|
|
|
nOffset += 20;
|
|
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD ResourceId_Handler_4(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* RPC_RESID ResourceId [FC_BIND_CONTEXT] at offset 12 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
GenericAttachStruct(resmon_Database[I0_RPC_RESID_RESOURCEID_8].hProperty,
|
|
hFrame,
|
|
lpData + nOffset,
|
|
20,
|
|
nPropertyLevel);
|
|
|
|
nOffset += 20;
|
|
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD ResourceId_Handler_5(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* RPC_RESID ResourceId [FC_BIND_CONTEXT] at offset 16 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
GenericAttachStruct(resmon_Database[I0_RPC_RESID_RESOURCEID_8].hProperty,
|
|
hFrame,
|
|
lpData + nOffset,
|
|
20,
|
|
nPropertyLevel);
|
|
|
|
nOffset += 20;
|
|
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD InBuffer_Handler_6(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
*lpdwPointerDataOffset = nOffset + 4;
|
|
/* UCHAR InBuffer [unique ptr] at offset 24 */
|
|
|
|
if (!fIgnorePointers)
|
|
{
|
|
{
|
|
BOOL OldfIgnoreFlatPart;
|
|
|
|
OldfIgnoreFlatPart = fIgnoreFlatPart;
|
|
fIgnoreFlatPart = FALSE;
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 4;
|
|
nOffset -= 4;
|
|
if (DWORDAT(lpData + nOffset) != 0)
|
|
{
|
|
nOffset = InBuffer_Handler_11(hFrame, lpData, *lpdwPointerDataOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
}
|
|
|
|
fIgnoreFlatPart = OldfIgnoreFlatPart;
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
nOffset += 4;
|
|
|
|
}
|
|
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD OutBuffer_Handler_7(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* UCHAR OutBuffer [FC_CVARRAY] at offset 42 */
|
|
|
|
if (!fConformanceIsSet)
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
fConformanceIsSet = TRUE;
|
|
nOffset += 4;
|
|
|
|
}
|
|
{
|
|
DWORD i = 0, OldfIgnorePointers = FALSE, ElementSize, OldOffset, FlatSize;
|
|
|
|
nOffset += 4;
|
|
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
nOffset += 4;
|
|
|
|
Iterations = Conformance;
|
|
ElementSize = 1;
|
|
FlatSize = Conformance * ElementSize;
|
|
OldOffset = nOffset;
|
|
if (!fIgnoreFlatPart)
|
|
{
|
|
if (!fIgnorePointers)
|
|
{
|
|
*lpdwPointerDataOffset = nOffset + FlatSize;
|
|
ALIGN(*lpdwPointerDataOffset, 3);
|
|
}
|
|
|
|
ALIGN(nOffset, 0);
|
|
if ((nOffset+FlatSize) > FrameLength) FlatSize = FrameLength - nOffset;
|
|
GenericAttachAnything(resmon_Database[I0_UCHAR_OUTBUFFER______26].hProperty, hFrame, lpData + nOffset, FlatSize, nPropertyLevel);
|
|
nOffset += FlatSize;
|
|
|
|
nOffset = OldOffset;
|
|
}
|
|
|
|
nOffset = OldOffset + FlatSize;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD ResourceTypeName_Handler_8(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* LPCWSTR ResourceTypeName [FC_C_WSTRING] at offset 2 */
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 8;
|
|
|
|
{
|
|
DWORD Length;
|
|
|
|
Length = DWORDAT(lpData + nOffset) * sizeof(wchar_t);
|
|
nOffset += 4;
|
|
|
|
if ((nOffset+Length) > FrameLength) return(FrameLength);
|
|
|
|
GenericAttachUnicodeString(resmon_Database[I0_LPCWSTR_RESOURCETYPENAME_27].hProperty, hFrame, lpData + nOffset, Length, nPropertyLevel);
|
|
nOffset += Length;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD InBuffer_Handler_9(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
*lpdwPointerDataOffset = nOffset + 4;
|
|
/* UCHAR InBuffer [unique ptr] at offset 56 */
|
|
|
|
if (!fIgnorePointers)
|
|
{
|
|
{
|
|
BOOL OldfIgnoreFlatPart;
|
|
|
|
OldfIgnoreFlatPart = fIgnoreFlatPart;
|
|
fIgnoreFlatPart = FALSE;
|
|
|
|
ALIGN(nOffset, 3);
|
|
nOffset += 4;
|
|
nOffset -= 4;
|
|
if (DWORDAT(lpData + nOffset) != 0)
|
|
{
|
|
nOffset = InBuffer_Handler_12(hFrame, lpData, *lpdwPointerDataOffset, FrameLength, lpdwPointerDataOffset);
|
|
|
|
}
|
|
|
|
fIgnoreFlatPart = OldfIgnoreFlatPart;
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
nOffset += 4;
|
|
|
|
}
|
|
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD OutBuffer_Handler_10(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* UCHAR OutBuffer [FC_CVARRAY] at offset 74 */
|
|
|
|
if (!fConformanceIsSet)
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
fConformanceIsSet = TRUE;
|
|
nOffset += 4;
|
|
|
|
}
|
|
{
|
|
DWORD i = 0, OldfIgnorePointers = FALSE, ElementSize, OldOffset, FlatSize;
|
|
|
|
nOffset += 4;
|
|
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
nOffset += 4;
|
|
|
|
Iterations = Conformance;
|
|
ElementSize = 1;
|
|
FlatSize = Conformance * ElementSize;
|
|
OldOffset = nOffset;
|
|
if (!fIgnoreFlatPart)
|
|
{
|
|
if (!fIgnorePointers)
|
|
{
|
|
*lpdwPointerDataOffset = nOffset + FlatSize;
|
|
ALIGN(*lpdwPointerDataOffset, 3);
|
|
}
|
|
|
|
ALIGN(nOffset, 0);
|
|
if ((nOffset+FlatSize) > FrameLength) FlatSize = FrameLength - nOffset;
|
|
GenericAttachAnything(resmon_Database[I0_UCHAR_OUTBUFFER______26].hProperty, hFrame, lpData + nOffset, FlatSize, nPropertyLevel);
|
|
nOffset += FlatSize;
|
|
|
|
nOffset = OldOffset;
|
|
}
|
|
|
|
nOffset = OldOffset + FlatSize;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD InBuffer_Handler_11(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* UCHAR InBuffer [FC_CARRAY] at offset 28 */
|
|
|
|
if (!fConformanceIsSet)
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
fConformanceIsSet = TRUE;
|
|
nOffset += 4;
|
|
|
|
}
|
|
{
|
|
DWORD i = 0, OldfIgnorePointers = FALSE, ElementSize, OldOffset, FlatSize;
|
|
|
|
Iterations = Conformance;
|
|
ElementSize = 1;
|
|
FlatSize = Conformance * ElementSize;
|
|
OldOffset = nOffset;
|
|
if (!fIgnoreFlatPart)
|
|
{
|
|
if (!fIgnorePointers)
|
|
{
|
|
*lpdwPointerDataOffset = nOffset + FlatSize;
|
|
ALIGN(*lpdwPointerDataOffset, 3);
|
|
}
|
|
|
|
ALIGN(nOffset, 0);
|
|
if ((nOffset+FlatSize) > FrameLength) FlatSize = FrameLength - nOffset;
|
|
GenericAttachAnything(resmon_Database[I0_UCHAR_INBUFFER______28].hProperty, hFrame, lpData + nOffset, FlatSize, nPropertyLevel);
|
|
nOffset += FlatSize;
|
|
|
|
nOffset = OldOffset;
|
|
}
|
|
|
|
nOffset = OldOffset + FlatSize;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|
|
DWORD InBuffer_Handler_12(
|
|
HFRAME hFrame,
|
|
LPBYTE lpData,
|
|
DWORD nOffset,
|
|
DWORD FrameLength,
|
|
LPDWORD lpdwPointerDataOffset)
|
|
{
|
|
DWORD nStartOffset = nOffset;
|
|
DWORD Iterations = 0;
|
|
|
|
/* UCHAR InBuffer [FC_CARRAY] at offset 60 */
|
|
|
|
if (!fConformanceIsSet)
|
|
{
|
|
ALIGN(nOffset, 3);
|
|
Conformance = DWORDAT(lpData + nOffset);
|
|
fConformanceIsSet = TRUE;
|
|
nOffset += 4;
|
|
|
|
}
|
|
{
|
|
DWORD i = 0, OldfIgnorePointers = FALSE, ElementSize, OldOffset, FlatSize;
|
|
|
|
Iterations = Conformance;
|
|
ElementSize = 1;
|
|
FlatSize = Conformance * ElementSize;
|
|
OldOffset = nOffset;
|
|
if (!fIgnoreFlatPart)
|
|
{
|
|
if (!fIgnorePointers)
|
|
{
|
|
*lpdwPointerDataOffset = nOffset + FlatSize;
|
|
ALIGN(*lpdwPointerDataOffset, 3);
|
|
}
|
|
|
|
ALIGN(nOffset, 0);
|
|
if ((nOffset+FlatSize) > FrameLength) FlatSize = FrameLength - nOffset;
|
|
GenericAttachAnything(resmon_Database[I0_UCHAR_INBUFFER______28].hProperty, hFrame, lpData + nOffset, FlatSize, nPropertyLevel);
|
|
nOffset += FlatSize;
|
|
|
|
nOffset = OldOffset;
|
|
}
|
|
|
|
nOffset = OldOffset + FlatSize;
|
|
}
|
|
return(nOffset);
|
|
}
|
|
|