GetPageSize

Returns the size, in bytes, of a page allocated by AllocPage.

32-bit API

#include "scnsm.h"

BOOL DeviceIoControl(
    HANDLE hDevice, // handle to SCNSM driver
    DWORD dwControlCode, // control code of operation to perform
    LPVOID pInBuffer // (Unused) pointer to input data buffer
    DWORD cbInBuffer // (Unused) size of input buffer
    LPVOID pOutBuffer // pointer to output data buffer
    DWORD cbOutBuffer // size of output buffer
    LPDWORD pcbReturned // (Optional) pointer to receive output byte count
    LPOVERLAPPED pOverlapped // (Unused)
);

16-bit API

include scnsm.inc

    mov ax, dwControlCode
    lea bx, pOutBuffer
    mov cx, cbOutBuffer
    call [hDevice]

Uses EAX, EBX, ECX, Flags.

Parameters

hDevice
[in] Handle to SCNSM driver. For 32-bit API, returned by CreateFile. For 16-bit API, returned by int 2fh.
dwControlCode
[in] Must be NSM_GETPAGESIZE.
pOutBuffer
[out] Receives the page size, in bytes, as a DWORD.
cbOutBuffer
[in] Size of pOutBuffer. Must be at least size of DWORD.
pcbReturned
[out] Optional. Pointer to a variable that receives the size, in bytes, of the data stored into the buffer pointed to by lpOutBuffer.

Return Values

32-bit API

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError for error codes defined below.

16-bit API

If the function succeeds, the EAX register is zero. If the function fails, the EAX register holds an error code defined below.

Error Codes

ERROR_INVALID_FUNCTION (1)
An unsupported control code was entered.
ERROR_GEN_FAILURE (31)
An unknown error has occurred.
ERROR_INVALID_PARAMETER (87)
An input parameter is invalid.