Up: GEOS SDK TechDocs | Up | Prev: VMGetMapBlock() ... | Next: WinAckUpdate() ...

VMPreserveBlocksHandle()

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

VMReleaseExclusive()

void VMReleaseExclusive(
        VMFileHandle 		file);

This routine releases a thread's exclusive access to a VM file.

Include: vm.h

VMRevert()

void	VMRevert(
        VMFileHandle		file,);

This routine reverts a file to its last-saved state.

Include: vm.h

VMSave()

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 .

VMSaveAs()

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

VMSetAttributes()

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().

VMSetExecThread()

void	VMSetExecThread(
        VMFileHandle		file,
        ThreadHandle		thread);

Set which thread will execute methods of all objects in the file.

Include: vm.h

VMSetMapBlock()

void	VMSetMapBlock(
        VMFileHandle		file,
        VMBlockHandle		block);

This routine sets the map block for a VM file.

Include: vm.h

VMSetReloc()

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

VMUnlock()

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

VMUpdate()

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.

VMVMBlockToMemBlock()

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


Up: GEOS SDK TechDocs | Up | Prev: VMGetMapBlock() ... | Next: WinAckUpdate() ...