Hi KetilO

I have made myself a tool for COM projects. It is written in VB and is a stand alone exe. It generate include files and is able to copy asm code to RadAsm. I would like to get the RadAsm project folder as default when saving the include files. Is it possible to get hold of the project folder?

This COM is a thread on the COM section named "ExcelHost".

Best regards
Posted on 2004-04-26 16:57:37 by minor28
Hi minor28,

There are many ways to do that, the worst way but one that will work no matter what is to ge the title of the RadASM window (GetWindowText) and parse the project folder from that (it is always encased in []). So you would do something like... (untested)

invoke FindWindowA, "RadAsmClass",NULL

mov [hRA],eax
invoke GetWindowTextA, [hRA], offset buffer, 256

mov edi,offset buffer
mov ecx,eax
mov eax,"["
repne scasb

mov [pStart],edi
mov eax, "]"
repne scasb

sub edi,[pStart]

invoke lstrcpynA, offset projpath, [pStart], edi

; strip the filename...
invoke lstrlenA,offset projpath
mov edi,offset projpath
add edi,eax
mov ecx,eax
mov eax,"\"
std
repne scasb
cld
mov B[edi+1],0
Posted on 2004-04-26 18:51:30 by donkey
Yes thanks donkey,

but the disadvantage is that a file must be open. But it will do for now.
Posted on 2004-04-27 13:20:52 by minor28