Jump to content

DevHelp VMFree

From EDM2
Revision as of 06:16, 29 July 2018 by Martini (talk | contribs) (Created page with "This service frees memory allocated with VMAlloc or a mapping created by VMProcessToGlobal or VMGlobalToProcess. ==Syntax== ===C=== USHORT APIENTRY DevHelp_VMFree( LIN Line...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This service frees memory allocated with VMAlloc or a mapping created by VMProcessToGlobal or VMGlobalToProcess.

Syntax

C

USHORT APIENTRY DevHelp_VMFree( LIN LinearAddr)

Assembler

MOV   EAX,Linear_Address   ; Linear address of the region to be freed
MOV   DL,DevHlp_VMFree

CALL  [Device_Help]

Parameters

C

LinearAddr (LIN)
Linear address of the region to be freed.

Assembler

MOV   EAX,Linear_Address   ; Linear address of the region to be freed

Return Code

C

Success Indicator: 0 if memory freed.

Possible errors:

              ERROR_ACCESS_DENIED      (5)
              ERROR_INVALID_PARAMETER  (87)

Assembler

   'C' Clear if memory freed.

   'C' Set if error.
       EAX = Error code.
            Possible errors:
               ERROR_ACCESS_DENIED      (5)
               ERROR_INVALID_PARAMETER  (87)

Remarks

All memory or mapping allocated by the physical device driver must be released before device driver termination.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_VMFree( LIN LinearAddr)

Related Functions