Click or drag to resize

IMcResourceManagerRefreshMemory Method

Either inquire about an existing memory reservation or revise an existing reservation.

Namespace:  MediaCy.IQL.Engine
Assembly:  MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
Syntax
VB
Function RefreshMemory ( 
	memoryHandle As IntPtr,
	<OutAttribute> ByRef Type As mcMemoryType,
	<OutAttribute> ByRef PcntOrMBytes As Double,
	<OutAttribute> ByRef Description As String,
	<OutAttribute> ByRef Flags As mcReserveMemoryFlags
) As IntPtr

Parameters

memoryHandle
Type: SystemIntPtr
A memory handle returned by ReserveMemory. If this value is zero, then the "General Image Reserve" block is being referenced. This block is initially set to one half of the MemoryMax(mcmtImageMemory), but can be resized via a call to this function.
Type
Type: MediaCy.IQL.EnginemcMemoryType
PcntOrMBytes
Type: SystemDouble
On entry, this should be set to either zero (for an inquiry) or to the number of MBytes or percentage of usable-physical requested to reserve. The mcmtMBytesFlag bit of the type argument determines if the value is treated as MBytes or as a percentage, as discussed in the ReserveMemory Remarks. On exit, the value is set to the number of MBytes or percentage that could be reserved (that is, it will be unchanged for successful reservations). If this value is zero or less on entry, then on exit it is set to the currently reserved memory for the given reservation; in this case the returned handle value is zero since no re-reservation is made.
Description
Type: SystemString
Flags
Type: MediaCy.IQL.EnginemcReserveMemoryFlags

Return Value

Type: IntPtr
For a successful re-reservation, a handle to the reserved block, which will be used to release or refresh the reservation. Nothing is returned if the requested reservation cannot be made or if PcntOrMBytes is zero on entry.
Remarks
This method is used for two purposes: 1) to get the state of an existing reserved memory block, or 2) to re-reserve a existing reservation. When used for purpose 2 (PcntOrMBytes is non-zero on entry), this function releases the memory owned by memoryHandle and reserves PcntOrMBytes in one call using the same rules as ReserveMemory. When used for purpose 1 (PcntOrMBytes is zero on entry), information about the existing reservation is returned via the arguments. A PropertyChanged( ID_IMcResourceManager_RefreshMemory, memoryHandle) event is fired after a successful re-registration.
See Also