TE Edit Control Win32 / Win64 Help
Product page

HandleToStr

Convert a global memory handle to a Visual Basic string.

BOOL HandleToStr(string, length, hMem)
char huge *string;pointer to a visual basic string
long length;length of the string
HGLOBAL hMem;Global memory handle

Description: This function can be used to copy the contents of a global memory handle to a given visual basic string. The calling routine must expand the string to appropriate length before calling this function. Example:

string=space(length)

HandleToStr(string,length,hMem)

The input global memory handle is freed up after copying its contents to the string.

Return Value: This function returns TRUE if successful.