[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

CoTaskMemFree on memory not allocated by CoTaskMemAlloc

Alain Frisch

9/3/2007 5:37:00 PM

Hello,

I understand that the .Net runtime will sometimes try to release the
result of unmanaged function calls with CoTaskMemFree. What happens if
this memory has not been allocated with CoTaskMemAlloc? In particular,
if the result pointer lies within the unmanaged (malloc) heap, is it
safe to assume that CoTaskMemFree will do nothing?

Alain
16 Answers

(Mattias Sjögren)

9/3/2007 6:32:00 PM

0


>In particular,
>if the result pointer lies within the unmanaged (malloc) heap, is it
>safe to assume that CoTaskMemFree will do nothing?

No, I wouldn't assume that. It will most likely proceed as if what you
passed in is a valid pointer allocated by CoTaskMemAlloc.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.n... | http://www.dotneti...
Please reply only to the newsgroup.

Uncle Vic

2/9/2013 3:57:00 AM

0

Uncle Vic <sorry@noway.com> wrote in news:XnsA161C9BF1E9E0sorrynowaycom@
216.196.121.131:

> Jim <garekmolo@ymail.com> wrote in news:bc766981-c39a-4f42-9d9d-
> 6cd889647867@i15g2000vbv.googlegroups.com:
>
>> If you don't believe that Jesus Christ of Nazareth is your Lord and
>> Savior, there is no future for you.
>
> I don't believe in your god, haven't all my life, and I'm 56 now. Looks
> like there *was* a future for me, still is, and it looks like you're a
> liar, Jim. So here's something else to lie about. Why would an all-
> powerful god need lowly people like you to adore it?
>
> OH! Sorry! I didn't mean to make you think...
>

Dang, you got *me* thinking. If the all-powerful god does need believers,
why the hell did he put them on an insignificant planet in an insignificant
part of the universe instead of creating them right there in his hidey-hole
in the sky?

--
Uncle Vic
aa# 2011
The meaning of life is to find your gift.
The purpose of life is to give it away.

Visit my You Tube Channel!
http://www.youtube.com/user/Vicman6311?fe...

moron

2/9/2013 4:22:00 AM

0

On Feb 8, 10:57 pm, Uncle Vic <so...@noway.com> wrote:
> Uncle Vic <so...@noway.com> wrote in news:XnsA161C9BF1E9E0sorrynowaycom@
> 216.196.121.131:
>
> > Jim <garekm...@ymail.com> wrote in news:bc766981-c39a-4f42-9d9d-
> > 6cd889647...@i15g2000vbv.googlegroups.com:
>
> >> If you don't believe that Jesus Christ of Nazareth is your Lord and
> >> Savior, there is no future for you.
>
> > I don't believe in your god, haven't all my life, and I'm 56 now.  Looks
> > like there *was* a future for me, still is, and it looks like you're a
> > liar, Jim.  So here's something else to lie about.  Why would an all-
> > powerful god need lowly people like you to adore it?
>
> > OH!  Sorry!  I didn't mean to make you think...
>
> Dang, you got *me* thinking.  If the all-powerful god does need believers,
> why the hell did he put them on an insignificant planet in an insignificant
> part of the universe instead of creating them right there in his hidey-hole
> in the sky?
>
God shot a bloody asteroid past our planet yesterday that was within
16,000 miles. Communication satellites are outside of 26,000 miles.

God is an asshole. And he likes to fuck with us.

Just ask Allah! :)

Spamßuster

2/9/2013 8:42:00 PM

0

On 2/8/2013 8:12 PM, Jim wrote:


--
=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

Spamßuster

2/9/2013 10:10:00 PM

0

On 2/8/2013 9:50 PM, Uncle Vic wrote:
> Jim <garekmolo@ymail.com> wrote in news:bc766981-c39a-4f42-9d9d-
> 6cd889647867@i15g2000vbv.googlegroups.com:
>


--
=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

Spamßuster

2/9/2013 10:10:00 PM

0

On 2/8/2013 9:57 PM, Uncle Vic wrote:

Path: not-for-mail
NNTP-Posting-Date: Fri, 08 Feb 2013 21:57:07 -0600
Newsgroups:
can.politics,soc.culture.african.american,alt.society.liberalism,misc.survivalism,alt.atheism
Subject: Re: Scientist seeks "liberal female" atheist to have
Neanderthal baby
From: Uncle Vic <sorry@noway.com>
References: <XnsA1618A7DA4AFBUBVCYT723@217.119.49.38>
<bc766981-c39a-4f42-9d9d-6cd889647867@i15g2000vbv.googlegroups.com>
<XnsA161C9BF1E9E0sorrynowaycom@216.196.121.131>
Message-ID: <XnsA161CAF257465sorrynowaycom@216.196.121.131>
User-Agent: Xnews/5.04.25
Date: Fri, 08 Feb 2013 21:57:07 -0600
Lines: 30
X-Usenet-Provider: http://www.gi...
X-Trace:
sv3-KcD+ad+VQoZf8q/zZZsRFSsCQPRHl4fWfj7DMEtmOapvxTk3KSQYYuhRYrAR/s3Rx2Fy7udhbYx8Qxu!EgN66sBT7o+fqcvxGzWH4mVu8O0lhB9imngVe8dB3RV/oW27ZW4pD4yeIbYZ8I8hmI7animnA+8=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.gi.../info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
X-Postfilter: 1.3.40
Bytes: 2324
X-Original-Bytes: 2263
X-Received-Bytes: 2404
Xref: Hurricane can.politics:1451811 soc.culture.african.american:252181
alt.society.liberalism:5520000 misc.survivalism:1091453 alt.atheism:5009238

--
=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

Spamßuster

2/9/2013 10:24:00 PM

0

On 2/8/2013 9:09 PM, Fidem Turbare, the non-existent atheist goddess wrote:


--
=====================================================================
SPAMMED INTO NON-RELEVANT GROUPS / COUNTRY
=====================================================================

%

2/10/2013 12:40:00 AM

0

Spamβuster wrote:
> On 2/8/2013 9:50 PM, Uncle Vic wrote:
>> Jim <garekmolo@ymail.com> wrote in news:bc766981-c39a-4f42-9d9d-
>> 6cd889647867@i15g2000vbv.googlegroups.com:

%

2/10/2013 12:40:00 AM

0

Spamβuster wrote:
> On 2/8/2013 9:57 PM, Uncle Vic wrote:
>
> Path: not-for-mail
> NNTP-Posting-Date: Fri, 08 Feb 2013 21:57:07 -0600
> Newsgroups:
> can.politics,soc.culture.african.american,alt.society.liberalism,misc.survivalism,alt.atheism
> Subject: Re: Scientist seeks "liberal female" atheist to have
> Neanderthal baby
> From: Uncle Vic <sorry@noway.com>
> References: <XnsA1618A7DA4AFBUBVCYT723@217.119.49.38>
> <bc766981-c39a-4f42-9d9d-6cd889647867@i15g2000vbv.googlegroups.com>
> <XnsA161C9BF1E9E0sorrynowaycom@216.196.121.131>
> Message-ID: <XnsA161CAF257465sorrynowaycom@216.196.121.131>
> User-Agent: Xnews/5.04.25
> Date: Fri, 08 Feb 2013 21:57:07 -0600
> Lines: 30
> X-Usenet-Provider: http://www.gi...
> X-Trace:
> sv3-KcD+ad+VQoZf8q/zZZsRFSsCQPRHl4fWfj7DMEtmOapvxTk3KSQYYuhRYrAR/s3Rx2Fy7udhbYx8Qxu!EgN66sBT7o+fqcvxGzWH4mVu8O0lhB9imngVe8dB3RV/oW27ZW4pD4yeIbYZ8I8hmI7animnA+8=
> X-Complaints-To: abuse@giganews.com
> X-DMCA-Notifications: http://www.gi.../info/dmca.html
> X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
> X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
> complaint properly
> X-Postfilter: 1.3.40
> Bytes: 2324
> X-Original-Bytes: 2263
> X-Received-Bytes: 2404
> alt.society.liberalism:5520000 misc.survivalism:1091453
> alt.atheism:5009238

70.67.20.208@sjrb.ca

2/10/2013 6:03:00 AM

0

On 09 Feb 2013, =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can> posted
some news:6ABRs.44737$Sq4.22679@newsfe14.iad:

> From: =?UTF-8?B?U3Bhbc6ydXN0ZXI=?= <SpamBuster@not.can>
> Reply-To: Spamβuster@not.can
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0)
> Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0
> Newsgroups:
> us.politics,soc.culture.african.american,alt.society.liberalism,misc.su
> rvivalism,alt.atheism Subject: SPAM ---------------------------
> Re: Scientist seeks "liberal female" atheist to have Neanderthal baby
> References: <XnsA1618A7DA4AFBUBVCYT723@217.119.49.38>
> <bc766981-c39a-4f42-9d9d-6cd889647867@i15g2000vbv.googlegroups.com>
> <XnsA161C9BF1E9E0sorrynowaycom@216.196.121.131> In-Reply-To:
> <XnsA161C9BF1E9E0sorrynowaycom@216.196.121.131> Content-Type:
> text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding:
> 7bit Lines: 11
> Message-ID: <6ABRs.44737$Sq4.22679@newsfe14.iad>
> NNTP-Posting-Host: 70.67.20.208
> X-Complaints-To: internet.abuse@sjrb.ca
> X-Trace: 1360455042 70.67.20.208 (Sun, 10 Feb 2013 00:10:42 UTC)
> NNTP-Posting-Date: Sun, 10 Feb 2013 00:10:42 UTC
> Date: Sat, 09 Feb 2013 16:10:15 -0600
> X-Received-Bytes: 1621

--