I need a solution
the difference of "CopyMemory", "memcpy", "RtlCopyMemory"
As it is..
What are differences of "CopyMemory", "memcpy", "RtlCopyMemory" ?
Which is fastest ?
Which is most stable ?
and so on..
Please , in detail .
By my expireance, CopyMemory and memcpy are same,
Only 1 difference: CopyMemory -> it is pure Windows
stuff, memcpy -> portable for every c++ compilers.
In fact, CopyMemory realized with help of memcpy!
About RtlCopyMemory: it is simple macro for memcpy
#define RtlCopyMemory(dst, src, len) memcpy(dst, src, len)
See more details in
They are similar to each other. Look at winnt.h header file (Visual C 6.0). First, it defines RtlCopyMemory() function
simply as memcpy():
Then you can find the definition of CopyMemory as:
#define CopyMemory RtlCopyMemory
As soon as the definitions are made at the compilation time, all the functions have the same speed and you can use
any of them.
Of course, the realization can be changed in next versions
of Visual C. So as usually it is recommended to use the API function CopyMemory().
Solve your biggest tech problems alongside global tech experts with 1:1 help.
Tackle projects and never again get stuck behind a technical roadblock.
How it Works
Plans and Pricing
Become an Expert
Who We Are
Join Our Team
Hall of Fame
Experts Exchange, LLC.
All rights reserved. Covered by US Patent.