Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 API - CopyMemory 1

Status
Not open for further replies.

Rhys666

Programmer
May 20, 2003
1,106
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
Code:
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?

Thanks,


Rhys

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

[DllImport("kernel32.Dll")]

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
);
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top