[too vague] & no.
In a console app (assuming no dll injection!) you'd have to use Windows API like ReadProcessMemory (and WriteProcessMemory) to access the memory of another program. That's just how Windows(R) works. You have to use the API if you want to get access into another process's ram.
if by .dll you mean injection, then no:
When you "inject a dll", you're just putting code (byte code: 0's and 1's) into the process's memory and (optionally) running it.
Because the 'dll code' (aka. code located in the target* process's memory) is ...local to that process? and being
run* by that process, the code is inherently different.
Pseudo-code to move the value 4 into the memory address 22446688:
console
Code:
WriteProcessMemory<Integer>(targetProcessHandle, 0x22446688, 4) // not the exact syntax <-- this is using windows API
//ask Windows to do the work
asm aka 'injected code', 'byte-code'
Code:
//code inside the process is all byte-code (ie. not in english, no functions names, etc, it's been compiled, it's 0's and 1's now)
//so the command might something* like.
mov eax, 4;
mov [22446688], eax ;//again, not the exact syntax. Will copy 4 into the memory address 22446688
//this is in target_app, so target_app is running it /doing the work.
-------
WriteProcessMemory<Integer>(targetProcessHandle, 0x22446688, 4)
this doesn't directly translated to byte code. Well, technically I guess it does, but.
----
When you are running injected code, you're dealing with byte-code, aka 0'1 and 1's, so all you have are cpu instructions and memory addresses. The target process is changing all the memory data for you.
When you use a 2nd app, you use the API and ask Windows nicely to manipulate/read the memory for you.
edit: some byte code

^^C++ has features related to asm, such as " __asm { }", but I'm not sure exactly.
WriteProcessMemory(0x26E17BDB, 0x90) would change the data in the memory box
and therefore the cpu instruction is changed. to 90. (nop: do nothing)
(assuming those boxes are run as code, as opposed to just being 'treated like data')