ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

FBSL - How to use machine code to get your CPU name

<< < (3/4) > >>

mouser:
well c++ support very low level stuff, so you better believe you can access raw memory with c and c++, otherwise it just wouldnt't be c/c++ at all :)

but it's very understandable that the .net languages would do everything they can to keep you from poking into arbitrary memory since it defeats the whole safety framework.  but now i'm really bringing us off topic..

Carol Haynes:
I presume even Visual C++ doesn't allow arbitrary rummaging around in all memory - I presume it is restricted to it's own allocation of memory? Presumably VB.Net could allow peeking and poking into its own private memory (esp. on Win2K/XP) without the potential to nuke the entire system?

Can't help feeling security would be an issue though if you can generate code on the fly and then execute it!

f0dder:
Carol, you need to make a distinction between "Visual C++" and ".net" - VC++, even the 2005 version, can still do unmanaged (native) as well as managed (.net) code.

Dunno how managed code and pointers mix, but they're sure are available for native code. Not that memory allocation with malloc/free and new/delete is a good thing anyway, everybody should use resource management objects for greater security against leaks etc.

Can't help feeling security would be an issue though if you can generate code on the fly and then execute it!

--- End quote ---
Not a problem, that code will still be limited by NT's security model...

Carol Haynes:
Carol, you need to make a distinction between "Visual C++" and ".net" - VC++, even the 2005 version, can still do unmanaged (native) as well as managed (.net) code.
-f0dder (March 21, 2006, 08:19 AM)
--- End quote ---

I was under the impression (probably wrong) that applications in Windows 2k/XP work within allocated virtual memory and can't directly address the hardware memory. I thought if you tried to access memory outside the address range of the apps allocation you got Access Violation errors etc.? Don't all apps have to address Windows and other apps memory via the various Windows libraries/API etc.?? Or am I totally barking up the wrong tree and C++ will let you do what you like?

Gerome:
Hello,

Carol, you need to make a distinction between "Visual C++" and ".net" - VC++, even the 2005 version, can still do unmanaged (native) as well as managed (.net) code.
-f0dder (March 21, 2006, 08:19 AM)
--- End quote ---

I was under the impression (probably wrong) that applications in Windows 2k/XP work within allocated virtual memory and can't directly address the hardware memory. I thought if you tried to access memory outside the address range of the apps allocation you got Access Violation errors etc.? Don't all apps have to address Windows and other apps memory via the various Windows libraries/API etc.?? Or am I totally barking up the wrong tree and C++ will let you do what you like?
-Carol Haynes (March 21, 2006, 11:25 AM)
--- End quote ---

Surely you can't directly with C/C++ do sucha explosive actions.
Under a certain memory scale, you can't access to it via C/C++ and the Kernel prevents you from trying to peek/poke at it : it is normal :)
But if you are using PSDK and DDK, you can find LIBS that allows you to develop drivers that allows you to have a lower memory access ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version