### Author Topic: Memory error in Masm32Lib on Windows2008!  (Read 132 times)

#### morgot

• Member
• Posts: 74
##### Memory error in Masm32Lib on Windows2008!
« on: July 10, 2020, 08:57:46 AM »
Hello!

I have strange error in masm32lib , only on Windows Server 2008 R2. I don’t know if this is necessary here, whether someone can reproduce the error, but just in case I will write.
It crashes in GlobalFree (called from ucGetCL ). If I nop it - it crashes in CreateProcess.

Program work correctly on Windows 10, Windows Server 2012, but crashes on R2..

Code: [Select]
`.486.model flat,stdcalloption casemap:noneinclude \masm32\include\windows.incinclude \masm32\macros\macros.asmuselib kernel32,user32,masm32.datas_i STARTUPINFOW <>p_i PROCESS_INFORMATION <>szProg dw 256 dup(0).codestart:invoke ucGetCL,addr szProg,255,1.if eax != 1invoke StdOut,chr\$("Error usage")invoke StdOut,chr\$("this_prog tested_prog")jmp @ex.endifpush ebxxor ebx,ebxmov s_i.cb,sizeof STARTUPINFOWinvoke CreateProcessW,addr szProg,ebx,ebx,ebx,ebx,ebx,ebx,ebx,addr s_i,addr p_ipop ebx.if !eax fn MessageBox,0,LastError\$(),"Last Error Text",MB_OK jmp @ex.endifinvoke WaitForSingleObject,p_i.hProcess,INFINITE@ex:exitend start`