Re: copymemory basic question
- From: "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 28 Aug 2005 11:22:38 +0100
I think Stoil has answered this on my behalf Sam [thanks Stoil]. However,
just to close the loop:
Yes, I know there is a character set translation involved if an API argument
is declared as a String - most of us are aware of that. However, we were
specifically talking about CopyMemory in this thread. What I was saying is
basically that CopyMemory should not be declared with any arguments typed as
String. Its source and destination pointers are just raw virtual memory
addresses, and could point to anything you want. Hence, there should be no
character set translation in calling this specific API. If there is, then
the declaration of the CopyMemory API is in error.
Tony Proctor
"Sam Hobbs" <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ey7e90oqFHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
> "Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
> news:%23m0eu8kqFHA.3540@xxxxxxxxxxxxxxxxxxxxxxx
> >I hope not Sam. I'm implicitly saying that I've used CopyMemory to move
> > strings (and string pointers), and it does work.
>
> The author also uses CopyMemory.
>
> > Plus there is no character set translation involved.
>
> Are you saying that the author of the book is incorrect? Are you saying
that
> strings are never converted to ANSI when an ANSI function in a DLL is
> called?
>
> > If it doesn't work for the OP then his declaration
> > of CopyMemory must be wrong.
>
> Are you saying that the declaration of CopyMemory used by the author is
> wrong? Note that the author provides a sample use of CopyMemory that
causes
> the string to be converted to ANSI. You seem to be saying that the reason
> the string is converted to ANSI is that the declaration of CopyMemory that
> is used is wrong.
>
>
.
- Follow-Ups:
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- From: Tony Proctor
- Re: copymemory basic question
- References:
- copymemory basic question
- From: mscir
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- From: Tony Proctor
- Re: copymemory basic question
- From: Sam Hobbs
- Re: copymemory basic question
- From: Tony Proctor
- Re: copymemory basic question
- From: Sam Hobbs
- copymemory basic question
- Prev by Date: Re: gettickcount returns a negative number???
- Next by Date: Re: CreateDirectory fails but GetLastError says succeeded
- Previous by thread: Re: copymemory basic question
- Next by thread: Re: copymemory basic question
- Index(es):
Relevant Pages
|
Loading