Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Win32 API - CopyMemory

Win32 API - CopyMemory

Win32 API - CopyMemory

I'm currently working on a prototype upgrade of one of my employers larger systems from VB 6.0, to c#.Net. The current application runs off of a variety of Server objects, and unfortunately when they were developed, the external provider made extensive use of RDS, which is not supported by .Net. So, essentially we're looking to re-build almost everything from the ground up starting at the first principles again.

Within the server side class library's there are also references to several area's of the Win32 API, and I'm specifically interested in the CopyMemory function.

In vb 6.0, this would be declared as

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

I can pretty much re-interprate this to c#, but am a little uncertain as to how this function fit's within .Net.

Does anyone know if it supported by the Framework?

If it is, what datatypes can be used as imput variables as the 'As Any' statement is not supported by .Net?

Other than this, does anyone know of a comprehensive enough Win32 API reference that could give me the detail I need?



Be careful that the light at the end of the tunnel isn't a train coming the other way.

RE: Win32 API - CopyMemory

Here is the decalration:


private extern void  CopyMemory(
  System.IntPtr Destination,  // pointer to address of copy destination
  System.IntPtr Source, // pointer to address of block to copy
  System.Int32  Length        // size, in bytes, of block to copy

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close