Click here to Skip to main content
15,904,023 members
Home / Discussions / C#
   

C#

 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 7:50
games guru6-Jul-07 7:50 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 8:10
Jimmanuel6-Jul-07 8:10 
GeneralRe: [2.0] a few read/writeprocessmemory questions [modified] Pin
games guru6-Jul-07 8:30
games guru6-Jul-07 8:30 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 8:40
Jimmanuel6-Jul-07 8:40 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 9:04
games guru6-Jul-07 9:04 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Jimmanuel6-Jul-07 9:35
Jimmanuel6-Jul-07 9:35 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 9:43
games guru6-Jul-07 9:43 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
PhilDanger6-Jul-07 11:23
PhilDanger6-Jul-07 11:23 
By the way, you can access pointers directly using an unsafe context -- look into this if you still feel like doing it in C#.

As for accessing certain bytes directly, you can use a mask and do a bitwise-AND and then bit-shift to move it into position.

uint x = 9; //1001
//the following bit of code checks to see if the 4th bit is a 1 or 0
uint MASK = 0xFFFFFFF8; //mask that gives us only the 4th bit
uint result = (x & MASK) >> 3;
if (result == 1)
{
    Console.WriteLine("4th bit is a 1!");
}
else
{
    Console.WriteLine("4th bit is a 0!");
}

GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Luc Pattyn6-Jul-07 15:55
sitebuilderLuc Pattyn6-Jul-07 15:55 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 16:01
games guru6-Jul-07 16:01 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Luc Pattyn6-Jul-07 16:38
sitebuilderLuc Pattyn6-Jul-07 16:38 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
games guru6-Jul-07 16:46
games guru6-Jul-07 16:46 
GeneralRe: [2.0] a few read/writeprocessmemory questions Pin
Luc Pattyn6-Jul-07 17:03
sitebuilderLuc Pattyn6-Jul-07 17:03 
Questionmerge two files in a file Pin
WhiteGirl236-Jul-07 3:58
WhiteGirl236-Jul-07 3:58 
AnswerRe: merge two files in a file Pin
BoneSoft6-Jul-07 4:07
BoneSoft6-Jul-07 4:07 
AnswerRe: merge two files in a file Pin
Colin Angus Mackay6-Jul-07 4:07
Colin Angus Mackay6-Jul-07 4:07 
AnswerRe: merge two files in a file Pin
Christian Graus6-Jul-07 4:09
protectorChristian Graus6-Jul-07 4:09 
GeneralRe: merge two files in a file Pin
Martin#6-Jul-07 7:32
Martin#6-Jul-07 7:32 
GeneralRe: merge two files in a file Pin
Colin Angus Mackay6-Jul-07 9:18
Colin Angus Mackay6-Jul-07 9:18 
AnswerRe: merge two files in a file Pin
snorkie6-Jul-07 4:11
professionalsnorkie6-Jul-07 4:11 
GeneralRe: merge two files in a file Pin
Luc Pattyn6-Jul-07 4:20
sitebuilderLuc Pattyn6-Jul-07 4:20 
GeneralRe: merge two files in a file Pin
Jimmanuel6-Jul-07 4:46
Jimmanuel6-Jul-07 4:46 
JokeRe: merge two files in a file Pin
Luc Pattyn6-Jul-07 5:01
sitebuilderLuc Pattyn6-Jul-07 5:01 
JokeRe: merge two files in a file Pin
Jimmanuel6-Jul-07 5:12
Jimmanuel6-Jul-07 5:12 
AnswerRe: merge two files in a file Pin
WhiteGirl236-Jul-07 20:14
WhiteGirl236-Jul-07 20:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.