Re: memcpy
From: Steve Russell (srussell_at_removethisinnernet.net)
Date: 05/31/04
- Next message: Alexander Grigoriev: "Re: MALLOC"
- Previous message: William Gower: "Synching a list Ctrl with a text field"
- In reply to: Joseph M. Newcomer: "Re: memcpy"
- Next in thread: Joseph M. Newcomer: "Re: memcpy"
- Reply: Joseph M. Newcomer: "Re: memcpy"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 30 May 2004 21:36:41 -0400
Actually, BitBlt is completely acceptable for this task. I just wanted to
understand memcpy by using it successfully, not to mention clean up the dc
and bitmap code that is required with BitBlt. Furthermore, there will be
times when I want to copy one or more pixels from one DIBSection to another,
and I didn't think BitBlt was a good choice for that. Am I wrong?
As for single-stepping, I am just doing a regular execute. Any other ideas
on that?
----------------
> You have tried to single-step into memcpy in the debugger. The debugger is
looking for the
> source code so it can single step. Don't single-step into memcpy and you
will avoid this
> message. Otherwise, ignore it, but you'll have to single-step through
assembly code,
> except that you won't have comments displayed (if you want the source, you
can install the
> C Runtime source; just go to control panel, add/remove programs, click on
your Visual
> Studio installation, I think the next dialog is an option to add or remove
components;
> check that; then drill down in the various options until you come to the
one to install C
> runtime source code. Check this. Don't uncheck anything you still want.
When you click the
> final OK or whatever box, you will be asked to put your various CDs in,
and the source
> code (or other options you've selected) will be installed..
>
> Note that memcpy only works if the source and destination do not overlap.
If they overlap
> in any way, you must use memmove, not memcpy.
>
> Is performance so critical that BitBlt is unacceptable? Unless you know
this for certain,
> your memcpy/memmove will probably be as bad.
> joe
>
>
> On Sun, 30 May 2004 17:57:26 -0400, "Steve Russell"
<srussell@removethisinnernet.net>
> wrote:
>
> >Is there anything special to know about using memcpy in MFC? I am
> >attempting to replace a Bitblt operation between two DIBSections. It's
my
> >first crack at memcpy, and I keep getting this popup: Please enter the
path
> >for MEMCPY.ASM.
> >
> >debugger:
> >memcpy(unsigned char * 0x003fcb60, unsigned char * 0x00c0cb60, unsigned
long
> >3) line 353
> >
> >int stride = (m_nWidth * 3 + 3) & (~3);
> >for (int y = 0; y < m_nHeight; y++)
> > for (int x = 0; x < m_nWidth; x++)
> > {
> > int pxImage = stride * (m_nHeight - y - 1) + 3 * x;
> > int pxRestore = stride * (m_nHeight - y - 1) + 3 * x;
> > memcpy((LPVOID *)m_dibsImage[0]->m_pBits + pxImage,
> > (LPVOID *)m_dibsRestore[0]->m_pBits + pxRestore, 3);
> > }
> >
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Alexander Grigoriev: "Re: MALLOC"
- Previous message: William Gower: "Synching a list Ctrl with a text field"
- In reply to: Joseph M. Newcomer: "Re: memcpy"
- Next in thread: Joseph M. Newcomer: "Re: memcpy"
- Reply: Joseph M. Newcomer: "Re: memcpy"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|