Changeset 1880 for trunk/src/win32k/pe2lx/pe2lx.cpp
- Timestamp:
- Nov 29, 1999, 10:28:00 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/pe2lx/pe2lx.cpp
r1875 r1880 1 /* $Id: pe2lx.cpp,v 1.1 2 1999-11-29 00:33:38bird Exp $1 /* $Id: pe2lx.cpp,v 1.13 1999-11-29 21:28:00 bird Exp $ 2 2 * 3 3 * Pe2Lx class implementation. Ring 0 and Ring 3 … … 3315 3315 * Find object and offObject corresponding to the entrypoint RVA. 3316 3316 * IF no enough memory THEN (try) allocate more. 3317 * IF last ordinal + 1 != new ordinal THEN3317 * LOOP WHILE last ordinal + 1 != new ordinal 3318 3318 * BEGIN 3319 3319 * Add unused entry which skips to the new ordinal - 1. 3320 3320 * Update offCurEntryBundle 3321 3321 * Set offLastEntryBundle to offLastEntryBundle. 3322 * IF no enough memory THEN (try) allocate more. 3322 3323 * END 3323 3324 * IF offCurEntryBundle == offLastEntryBundle OR last bundle type != 32-bit entry … … 3439 3440 3440 3441 /* Add unused entry to skip ordinals? */ 3441 if(ulOrdinal > ulLastOrdinal + 1)3442 while (ulOrdinal > ulLastOrdinal + 1) 3442 3443 { 3443 3444 /* Add unused entry which skips to the new ordinal - 1.*/ 3444 3445 pBundle = (struct b32_bundle *)((ULONG)pEntryBundles + offCurEntryBundle); 3445 pBundle->b32_cnt = (UCHAR)(ulOrdinal - ulLastOrdinal - 1); 3446 pBundle->b32_cnt = (ulOrdinal - ulLastOrdinal - 1) < 0x100 ? 3447 (UCHAR)(ulOrdinal - ulLastOrdinal - 1) : (UCHAR)0xff; 3446 3448 pBundle->b32_type = EMPTY; 3449 ulLastOrdinal += pBundle->b32_cnt; 3447 3450 3448 3451 /* Update offCurEntryBundle and offLastEntryBundle */ 3449 3452 offLastEntryBundle = offCurEntryBundle += 2UL; 3453 3454 /* IF no enough memory THEN (try) allocate more. */ 3455 AllocateMoreMemory(offCurEntryBundle + 4 + 2 + 5 > cbEBAllocated /* max memory uasage! Should detect more exact memory usage! */, 3456 pEntryBundles, struct b32_bundle *, cbEBAllocated , 512, 256) 3450 3457 } 3451 3458 … … 3636 3643 3637 3644 /* Add unused entry to skip ordinals? */ 3638 if(ulOrdinal > ulLastOrdinal + 1)3645 while (ulOrdinal > ulLastOrdinal + 1) 3639 3646 { 3640 3647 /* Add unused entry which skips to the new ordinal - 1.*/ 3641 3648 pBundle = (struct b32_bundle *)((ULONG)pEntryBundles + offCurEntryBundle); 3642 pBundle->b32_cnt = (UCHAR)(ulOrdinal - ulLastOrdinal - 1); 3649 pBundle->b32_cnt = (ulOrdinal - ulLastOrdinal - 1) < 0x100 ? 3650 (UCHAR)(ulOrdinal - ulLastOrdinal - 1) : (UCHAR)0xff; 3643 3651 pBundle->b32_type = EMPTY; 3652 ulLastOrdinal += pBundle->b32_cnt; 3644 3653 3645 3654 /* Update offCurEntryBundle and offLastEntryBundle */ 3646 3655 offLastEntryBundle = offCurEntryBundle += 2UL; 3656 3657 /* IF no enough memory THEN (try) allocate more. */ 3658 AllocateMoreMemory(offCurEntryBundle + 4 + 2 + 7 > cbEBAllocated /* max memory uasage! Should detect more exact memory usage! */, 3659 pEntryBundles, struct b32_bundle *, cbEBAllocated , 512, 256) 3647 3660 } 3648 3661
Note:
See TracChangeset
for help on using the changeset viewer.