🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11783

Does ::SysAllocString() make a copy of the wchar_t buffer

#11783
From: Fernando
Date: Wed, 14 Jan 2004 12:05
8 lines
1071 bytes
Hi,

I have a function that returns a BSTR. This function created a BSTR by passing
a wchar_t array to ::SysAllocString().

Is is safe to then delete[] the array? Does ::SysAllocString() make a copy?

TIA
Technical Details
Message-ID: <m0ca00h28o49rgl4qminq0q3j19kc37fnq@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d621896738e1e1d9,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-14 04:09:46 PST
From: Fernando  <frr@easyjob.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Does ::SysAllocString() make a copy of the wchar_t buffer
Date: Wed, 14 Jan 2004 13:05:17 +0100
Message-ID: <m0ca00h28o49rgl4qminq0q3j19kc37fnq@4ax.com>
X-Newsreader: Forte Agent 1.9/32.560
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 217.127.66.80
X-Trace: newsgroups.borland.com 1074081922 217.127.66.80 (14 Jan 2004 04:05:22 -0700)
Lines: 8
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail