News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RadASM 2.2.1.2 bugtest

Started by KetilO, May 10, 2007, 11:52:55 AM

Previous topic - Next topic

ramguru

In caption field I've entered: eg. "menu.mnu"
and of course RadASM translated it to
CONTROL "eg. "menu.mnu"",...
wouldn't it be better if RadASM translated it to
CONTROL "eg. \x22menu.mnu\x22",...
but I'm kinda suprised that |CONTROL "eg. \"menu.mnu\"",...| wouldn't work

ostaith

hi KetilO,

when i set Single Instance, and i open a project twice, it will report "cannot open the file".

i found the procedure OpenCommandLine proc uses ebx,lpCmnd:DWORD has a problem,

.while byte ptr [ebx] ; <= so here whill cause a problem
   ...
   .if byte ptr FileName
      invoke SendMessage,hWnd,WM_USER+998,0,offset FileName ; <= this statement whill change [ebx]
   .endif
   ...
.endw

KetilO

Hi ramguru

I will look into it.

KetilO

KetilO

Hi ostaith

Thanks for reporting this bug.

The bug is not related to using ebx as it is preserved.

The problem is that prnbuff is overwrittwn.
Adding 8192 to offset of prnbuff is a quick fix:

.elseif eax==WM_COPYDATA
  push esi
  push edi
  mov esi,lParam
  mov ecx,[esi].COPYDATASTRUCT.cbData
  mov esi,[esi].COPYDATASTRUCT.lpData
  .if !wParam
    mov edi,offset prnbuff+8192
    rep movsb
    invoke OpenCommandLine,offset prnbuff+8192
  .elseif wParam==-1
    mov edi,offset FileName
    rep movsb
    invoke SendMessage,hWin,WM_COMMAND,-1,-1
  .endif
  pop edi
  pop esi
  ret


KetilO