共用方式為


IsBadBoundedStringPtr

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Verifies that the calling process has read access to the specified range of memory.

Header file:

mapiwin.h

Implemented by:

MAPI

Called by:

Client applications and service providers.

BOOL IsBadBoundedStringPtr( 
  const void FAR* lpsz, 
  UINT cchMax
);

Parameters

  • lpsz
    [in] Pointer to a null-terminated ASCII string.

  • cchMax
    [in] The maximum size of the string, in CHARs. The function checks for read access in all characters up to the terminating null character of the string, or up to the number of characters specified by this parameter, whichever is smaller. If this parameter is zero, the return value is zero.

Return Value

The return value is zero when the calling process has read access to all characters up to the terminating null character of the string, or read access up to the number of characters specified by cchMax,.

The return value is non-zero when the calling process does not have read access to all characters up to the terminating null character of the string, or read access up to the number of characters specified by cchMax,.

Remarks

The IsBadBoundedStringPtr function is equivalent to using IsBadStringPtr.

See Also

Reference

IsBadStringPtr