SysReAllocString function

Reallocates a previously allocated string to be the size of a second string and copies the second string into the reallocated memory.

Syntax


INT SysReAllocString(
  _Inout_   BSTR *pbstr,
  _In_opt_  const OLECHAR *psz
);

Parameters

pbstr [in, out]

The previously allocated string.

psz [in, optional]

The string to copy.

Return value

Return codeDescription
TRUE

The string is reallocated successfully.

FALSE

Insufficient memory exists.

 

Remarks

The address passed in psz cannot be part of the string passed in pbstr, or unexpected results may occur.

If pbstr is NULL, there will be an access violation and the program will crash. It is your responsibility to protect this function against NULL pointers.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

See also

String Manipulation Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft