MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite
Quote from: Vortex on May 21, 2012, 04:57:49 PM
Did you try to use C run-time malloc function from msvcrt.dll ?
include \masm32\include\masm32rt.inc
include Malloc.inc
.code
start: call MyTest
inkey "bye"
exit
MyTest proc
LOCAL v1, v2, rc:RECT
mov ebx, Malloc(1000000)
invoke lstrcpy, ebx, chr$("Hey, that's more than enough: ")
print ebx
lea eax, rc
sub eax, ebx
print str$(eax), " bytes for your little proggies", 13, 10
ret
MyTest endp
end start
Quote from: xandaz on May 21, 2012, 07:58:59 PMIs there a way to allocate memory that would be common to two different processes?The VirtualAllocEx function allowes to allocate memory in an other process.
.386
.model flat,stdcall
option casemap:none
Viewer proto :DWORD,:DWORD,:DWORD,:DWORD
;
;
SaveBmp proto
include bmp.inc
.code
start:
include variables.inc
pixel_offset struct
;
;
.code
.data
ClassName db "BmpView",0
;
;
;
lPixel dw 3
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\gdi32.inc
include \masm32\include\comctl32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\comctl32.lib
.data?
hInstance dd ?