Click here to Skip to main content
15,923,789 members
Home / Discussions / C#
   

C#

 
GeneralRe: Disabling of Close Form option Pin
PIEBALDconsult21-Feb-08 16:24
mvePIEBALDconsult21-Feb-08 16:24 
GeneralRe: Disabling of Close Form option Pin
Christian Graus21-Feb-08 16:30
protectorChristian Graus21-Feb-08 16:30 
GeneralRe: Disabling of Close Form option Pin
Neo Andreson21-Feb-08 16:33
Neo Andreson21-Feb-08 16:33 
GeneralRe: Disabling of Close Form option Pin
Christian Graus21-Feb-08 16:54
protectorChristian Graus21-Feb-08 16:54 
GeneralRe: Disabling of Close Form option [modified] Pin
DaveyM6921-Feb-08 23:24
professionalDaveyM6921-Feb-08 23:24 
GeneralRe: Disabling of Close Form option Pin
PIEBALDconsult24-Feb-08 15:58
mvePIEBALDconsult24-Feb-08 15:58 
GeneralRe: Disabling of Close Form option Pin
DaveyM6925-Feb-08 1:05
professionalDaveyM6925-Feb-08 1:05 
GeneralRe: Disabling of Close Form option Pin
PIEBALDconsult28-Mar-08 6:27
mvePIEBALDconsult28-Mar-08 6:27 
NewsCodeForms Lite v4.0 Released (FREEWARE) Pin
Rafael Agundis21-Feb-08 15:24
Rafael Agundis21-Feb-08 15:24 
GeneralRe: CodeForms Lite v4.0 Released (FREEWARE) Pin
Christian Graus21-Feb-08 16:13
protectorChristian Graus21-Feb-08 16:13 
GeneralCombo Box slected index changed Pin
msx2321-Feb-08 11:57
msx2321-Feb-08 11:57 
GeneralRe: Combo Box slected index changed Pin
Christian Graus21-Feb-08 12:39
protectorChristian Graus21-Feb-08 12:39 
GeneralRe: Combo Box slected index changed Pin
darkelv21-Feb-08 13:06
darkelv21-Feb-08 13:06 
GeneralRe: Combo Box slected index changed Pin
DaveyM6921-Feb-08 23:36
professionalDaveyM6921-Feb-08 23:36 
GeneralObject Serialization Pin
geekfromindia21-Feb-08 8:09
geekfromindia21-Feb-08 8:09 
GeneralRe: Object Serialization Pin
TheGreatAndPowerfulOz21-Feb-08 8:26
TheGreatAndPowerfulOz21-Feb-08 8:26 
GeneralRe: Object Serialization Pin
geekfromindia21-Feb-08 8:52
geekfromindia21-Feb-08 8:52 
GeneralRe: Object Serialization Pin
TheGreatAndPowerfulOz21-Feb-08 9:18
TheGreatAndPowerfulOz21-Feb-08 9:18 
GeneralRe: Object Serialization Pin
Not Active21-Feb-08 9:22
mentorNot Active21-Feb-08 9:22 
GeneralVery weird kernel32 memory reading results. Pin
Jitse21-Feb-08 7:05
Jitse21-Feb-08 7:05 
I'm making a memory reading application, but after some programming I noticed I actually get the same result for no matter which process. WTF | :WTF: I'll give a very clear example of my problem. This piece of code opens three processes, and reads their memory at position 0x0000FFFF. The processes can be whatever I want (as long as they're running, obviously), but for this example I took Firefox, TeaTimer (background process of Spybot) and Nexcal (a calculator program).

<br />
        public static void Test()<br />
        {<br />
            IntPtr bytesRead = new IntPtr();<br />
<br />
            // firefox<br />
            IntPtr firefox = OpenProcess(PROCESS_ALL_ACCESS, 0, (uint)Process.GetProcessesByName("firefox")[0].Id);<br />
            byte[] firefoxBuffer = new byte[3];<br />
            Trace.WriteLine("Firefox reading success: " + ReadProcessMemory(firefox, new IntPtr(65536), firefoxBuffer, (uint)3, out bytesRead));<br />
            foreach (byte b in firefoxBuffer)<br />
            {<br />
                Trace.WriteLine(b.ToString());<br />
            }<br />
            CloseHandle(firefox);<br />
<br />
            // teatimer<br />
            IntPtr tea = OpenProcess(PROCESS_ALL_ACCESS, 0, (uint)Process.GetProcessesByName("TeaTimer")[0].Id);<br />
            byte[] teaBuffer = new byte[3];<br />
            Trace.WriteLine("TeaTimer reading success: " + ReadProcessMemory(tea, new IntPtr(65536), teaBuffer, (uint)3, out bytesRead));<br />
            foreach (byte b in teaBuffer)<br />
            {<br />
                Trace.WriteLine(b.ToString());<br />
            }<br />
            CloseHandle(tea);<br />
<br />
            // nexcal<br />
            IntPtr nex = OpenProcess(PROCESS_ALL_ACCESS, 0, (uint)Process.GetProcessesByName("Nexcal")[0].Id);<br />
            byte[] nexBuffer = new byte[3];<br />
            Trace.WriteLine("Nexcal reading success: " + ReadProcessMemory(nex, new IntPtr(65536), nexBuffer, (uint)3, out bytesRead));<br />
            foreach (byte b in nexBuffer)<br />
            {<br />
                Trace.WriteLine(b.ToString());<br />
            }<br />
            CloseHandle(nex);<br />
        }<br />


Now here's the output of this code:

Firefox reading success: 1
61
0
58
TeaTimer reading success: 1
61
0
58
Nexcal reading success: 1
61
0
58

I even used different buffers just so I won't make a mistake with accidentally just printing the previous result again. Anyways, it explicitly says it succeeded reading that certain process at that certain position of their memory, but it still returns exactly the same result for the three processes. Now I was thinking this might be an absolute memory location I'm reading. But that wouldn't explain why I'd have to pass a process handle to the kernel32 functions. And it would make it all very complicated and quite useless.
GeneralRe: Very weird kernel32 memory reading results. Pin
TheGreatAndPowerfulOz21-Feb-08 8:44
TheGreatAndPowerfulOz21-Feb-08 8:44 
GeneralRe: Very weird kernel32 memory reading results. Pin
Jitse21-Feb-08 10:03
Jitse21-Feb-08 10:03 
QuestionEmail application Pin
N4D33M21-Feb-08 6:28
N4D33M21-Feb-08 6:28 
GeneralRe: Email application Pin
TheGreatAndPowerfulOz21-Feb-08 7:01
TheGreatAndPowerfulOz21-Feb-08 7:01 
GeneralRe: Email application Pin
N4D33M21-Feb-08 8:16
N4D33M21-Feb-08 8:16 

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.