Clan x86
Technical (Development, Security, etc.) => General Programming => Topic started by: abc on April 20, 2007, 04:57:13 pm
-
In C#, How would I go about using the CopyMemory API, I have the CopyMemory API in Visual Basic 6.
Any links?
-
CopyMemory is a Windows API call... just learn how to call API functions in C#.
-
Er, I googled tons, I never found a decent tutorial. All I've got is
[DllImport("kernel32")]
heh.
-
http://www.csharphelp.com/archives/archive79.html
First result in the list of results for "C# Windows API."
-
What are you using CopyMemory for? Please don't tell me it's for any kind of Packet Buffer. It's completely unnecessary.
Directly porting things from non .NET to .NET should be done with care to avoid doing more work than you should.
-
You're right Warrior, Thanks, I think I remember some thread on vL about not using CopyMemory now.
-
You shouldn't need to use CopyMemory even without C#, most of the time.
-
Since the people who have replied haven't posted the alternative to using CopyMemory (http://forum.valhallalegends.com/index.php?topic=15794.msg159080#msg159080), I will. You want to use the BitConverter (http://msdn2.microsoft.com/en-us/library/system.bitconverter.aspx) class.
-
<3
-
Making him do a little homework. So what? :(
-
Making him do a little homework. So what? :(
Neither you nor Sidoh provided even a hint as to how to do this appropriately. I know you specifically knew the right answer.
Referencing the BitConverter class still makes him do homework.