void VMPreserveBlocksHandle(
VMFileHandle file,
VMBlockHandle block);
Keep the same global memory block with this VM block until the block is explicitly detached or the VM block is freed.
Include: vm.h
void VMReleaseExclusive(
VMFileHandle file);
This routine releases a thread's exclusive access to a VM file.
Include: vm.h
void VMRevert(
VMFileHandle file,);
This routine reverts a file to its last-saved state.
Include: vm.h
Boolean VMSave(
VMFileHandle file);
This routine updates and saves a file, freeing all backup blocks. If it encounters an error in the save operation, it will return non-zero .
VMFileHandle VMSaveAs(
VMFileHandle file,
const char *name,
VMAccessFlags flags.
VMOpenType mode,
word compression); /* compaction threshold */
This routine saves a file under a new name. The old file is reverted to its last-saved condition. If it encounters an error in the save operation, it will return a null
VMFileHandle
and set a
VMStatus
error code
which may be retrieved with
ThreadGetError()
.
Include: vm.h
word VMSetAttributes(
VMFileHandle file,
VMAttributes attrToSet, /* Turn these flags on... */
VMAttributes attrToClear); /* after turning these flags off */
This routine changes a VM file's
VMAttributes
settings. The routine returns the new attribute settings.
Include: vm.h
Tips and Tricks: When the Document Control objects create files, they automatically initialize the attributes appropriately.
Warnings: If you turn off VMA_BACKUP, make sure you do it right after a save or revert (when there are no backup blocks).
See Also: VMGetAttributes().
void VMSetExecThread(
VMFileHandle file,
ThreadHandle thread);
Set which thread will execute methods of all objects in the file.
Include: vm.h
void VMSetMapBlock(
VMFileHandle file,
VMBlockHandle block);
This routine sets the map block for a VM file.
Include: vm.h
void VMSetReloc(
VMFileHandle file,
void (*reloc) (VMFileHandle file,
VMBlockHandle block,
MemHandle mh,
void *data,
VMRelocTypes type));
This routine sets a data-relocation routine for the VM file.
Include: vm.h
void VMUnlock(
MemHandle mh);
This routine unlocks a locked VM block. Note that the block's global memory handle is passed (not its VM handle).
Include: vm.h
word VMUpdate(
VMFileHandle file);
This routine updates dirty blocks to the disk.
Include: vm.h
Tips and Tricks:
VMUpdate()
is optimized for updating clean files to the disk. Therefore, it is faster to call
VMUpdate()
whenever you think it might be necessary, than it is to check the dirty state and then call
VMUpdate()
only if the file is actually dirty.
MemHandle VMVMBlockToMemBlock(
VMFileHandle file,
VmBlockHandle block);
This routine returns the global handle of the memory block attached to a specified VM block. If no global block is currently attached, it will allocate and attach one.
Include: vm.h
GEOS SDK TechDocs
|
|
VMGetMapBlock() ...
|
WinAckUpdate() ...