🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CopyMemory API problem

#10507
From: Bob Gonder
Date: Tue, 13 Apr 2004 14:57
21 lines
1911 bytes
Martin C wrote:

>Well the good news that the AV problem is solved just by writing CopyMemory
>as follows:
>
>CopyMemory((void*)WriteAddress,(void*) ReadAddress, sizeof(Granularity));

Did I say sizeof()?
sizeof(Granularity) is 4. Always (with this compiler, others might be
2 or 8)
Why even give it a value if all you are going to do is use the size of
the variable?

>"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
>news:qkkm70p57m1qsqpvf7a292e844mm859bg9@4ax.com...
>> Or, you could override (cast) their types:
>>
>>      CopyMemory((void*)WriteAddress,(void*) ReadAddress, Granularity);
>>
>>
>
Technical Details
Message-ID: <2pvn70lh3g90clqnvvon1rihguv0s9sbih@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40786e5f@newsgroups.borland.com> <5v7m701261mpcjc68up9v6m226cd698sq8@4ax.com> <407b397b@newsgroups.borland.com> <4kgm70p9rkijgdp1sopku8vkn46b52cbg3@4ax.com> <407b4eab@newsgroups.borland.com> <qkkm70p57m1qsqpvf7a292e844mm859bg9@4ax.com> <407b5a2b@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,aeea745eda602570
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-13 08:10:25 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: CopyMemory API problem
Date: Tue, 13 Apr 2004 07:57:57 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <2pvn70lh3g90clqnvvon1rihguv0s9sbih@4ax.com>
References: <40786e5f@newsgroups.borland.com> <5v7m701261mpcjc68up9v6m226cd698sq8@4ax.com> <407b397b@newsgroups.borland.com> <4kgm70p9rkijgdp1sopku8vkn46b52cbg3@4ax.com> <407b4eab@newsgroups.borland.com> <qkkm70p57m1qsqpvf7a292e844mm859bg9@4ax.com> <407b5a2b@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 4.227.151.19
X-Trace: newsgroups.borland.com 1081868277 4.227.151.19 (13 Apr 2004 07:57:57 -0800)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail