ReactOS Fundraising Campaign 2012
 
€ 3,303 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

void WINAPI NdrFullPointerInsertRefId ( PFULL_PTR_XLAT_TABLES  pXlatTables,
ULONG  RefId,
void pPointer 
)

Definition at line 188 of file ndr_fullpointer.c.

Referenced by PointerUnmarshall().

00190 {
00191     ULONG Hash = 0;
00192     unsigned int i;
00193     PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
00194 
00195     TRACE("(%p, 0x%x, %p)\n", pXlatTables, RefId, pPointer);
00196 
00197     /* simple hashing algorithm, don't know whether it matches native */
00198     for (i = 0; i < sizeof(pPointer); i++)
00199         Hash = (Hash * 3) ^ ((unsigned char *)&pPointer)[i];
00200 
00201     XlatTableEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(*XlatTableEntry));
00202     XlatTableEntry->Next = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
00203     XlatTableEntry->Pointer = pPointer;
00204     XlatTableEntry->RefId = RefId;
00205     XlatTableEntry->State = 0;
00206     pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask] = XlatTableEntry;
00207 
00208     /* insert pointer into mapping table */
00209     expand_pointer_table_if_necessary(pXlatTables, RefId);
00210     if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
00211         pXlatTables->RefIdToPointer.XlatTable[XlatTableEntry->RefId] = pPointer;
00212 }


Generated on Tue May 15 05:35:00 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.