home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / vm / src / stub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-15  |  582 b   |  26 lines

  1. /***
  2. * stub.c -
  3. *
  4. *       Copyright (c) 1989-1992, Microsoft Corporation.  All rights reserved.
  5. *
  6. *******************************************************************************/
  7.  
  8. #include <version.h>
  9. #include <vmm.h>
  10.  
  11.  
  12. PVOID VMFUNC __PVmLoadStubVpCb(VPVOID vp, unsigned long cb, int fDirty) {
  13.  
  14. PVOID   pvoid;
  15.  
  16. // just do a single page load if it is within one page
  17. if( IbOfVp(vp) + cb <= (unsigned long) cbVmPage )
  18.     return(__PVmLoadVp(vp, fDirty));
  19.  
  20. pvoid = __PVmLockVpCb(vp, cb);
  21. if( pvoid != 0L )
  22.     __VmUnlockVpCb(vp, cb, fDirty);
  23.  
  24. return(pvoid);
  25. }
  26.