Jump to content

MFSH LOCK: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:MFSH_LOCK}} Lock a segment in place in physical memory. ==Syntax== int far pascal MFSH_LOCK(usSel, pulHandle) ==Parameters== ; usSel is the selector of the s..."
 
No edit summary
Line 6: Line 6:


==Parameters==
==Parameters==
; usSel is the selector of the segment to be locked.   
; usSel: is the selector of the segment to be locked.   
; pulHandle is a pointer to a double word which is filled in by the helper with the lock handle.  
; pulHandle: is a pointer to a double word which is filled in by the helper with the lock handle.  


==Returns==
==Returns==

Revision as of 03:56, 21 May 2019

Lock a segment in place in physical memory.

Syntax

int far pascal MFSH_LOCK(usSel, pulHandle)

Parameters

usSel
is the selector of the segment to be locked.
pulHandle
is a pointer to a double word which is filled in by the helper with the lock handle.

Returns

If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:

ERROR_PROTECTION_VIOLATION
the supplied address or selector is invalid.

Sample

unsigned short usSel;
unsigned long far * pulHandle;

int far pascal MFSH_LOCK(usSel, pulHandle)

Remarks

This helper is for use by a mini-FSD with an imbedded device driver. It is the same as the standard device driver LOCK helper with the following assumptions: The lock is defined to be short term and will block until the segment is loaded.