The MASM Forum

General => The Campus => Topic started by: Ding on May 18, 2020, 02:43:42 PM

Title: How to use RadASM components ?
Post by: Ding on May 18, 2020, 02:43:42 PM
Hello everyone,
If anyone here has a collection of examples on how to use RadASM components it will be awesome.
for the moment I need just three of them:
TreeView, ListView, TabStrip.
This is a simple design of what I want to achieve:
note that each tab will have its own ListView.
(https://i.imgur.com/94O585a.png)

Best Regards.
Title: Re: How to use RadASM components ?
Post by: Ding on May 18, 2020, 06:58:25 PM
After searching I did it , now I know how to add Items ...
the only problem is with TreeView , no caption Is shown ?
attached version 0.0.1
TODO :
[-] Error handling while opening files .
[-] Anchor controls .
[-] Each tab has it's own Listview .
[-] Fixing TreeView items.
any suggestions , help is more than welcome .

Mr.Hutch-- : feel free to edit or delete this topic .

Ding.
Title: Re: How to use RadASM components ?
Post by: jj2007 on May 18, 2020, 07:50:00 PM
Quote from: Ding on May 18, 2020, 06:58:25 PMMr.Hutch-- : feel free to edit or delete this topic .

Why should he? We are watching with awe... code is always welcome :thumbsup:
Title: Re: How to use RadASM components ?
Post by: hutch-- on May 18, 2020, 08:24:59 PM
Hi Ding,

No need to delete the postings as we leave them so others can find the data in a search. Glad you got a result.
Title: Re: How to use RadASM components ?
Post by: Ding on May 18, 2020, 10:13:51 PM
Thank you guys @jj2007 @Hutch--   :thumbsup:

PEParser v0.0.2
added :
Title: Re: How to use RadASM components ?
Post by: mineiro on May 18, 2020, 10:48:00 PM
Quote from: Ding on May 18, 2020, 06:58:25 PM
any suggestions , help is more than welcome .
hello sir Ding;
A member sir fearless of this board was working in some topics about Radasm.
You can find some posts of sir Ketil (Radasm author) in old board. You can also download Radasm source code to read and change to your needs.
Title: Re: How to use RadASM components ?
Post by: jj2007 on May 19, 2020, 12:20:38 AM
Quote from: Ding on May 18, 2020, 10:13:51 PM
[-] the treeview displays the full path of the filename , i need just the exe name for example : Filename.exe , how can I extract it ?

include \masm32\include\masm32rt.inc

.data
filename db "\masm32\qEditor.exe", 0

.code
start:
  mov esi, offset filename
  add esi, len(esi)
  .Repeat
dec esi
mov al, [esi-1]
  .Until al=="\" || !al
  print "The filename: "
  inkey esi
  exit

end start
Title: Re: How to use RadASM components ?
Post by: hutch-- on May 19, 2020, 03:51:55 AM
You can use this procedure from the masm32 library.

NameFromPath proc src:DWORD,dst:DWORD

Title: Re: How to use RadASM coonents ?
Post by: Ding on May 19, 2020, 05:45:12 AM
Once again , Thank you so much guys for helping me out

@jj2007  great example , this allows to retrieve all kind of files including files with no extension , awesome :thumbsup:

@Hutch-- works like a charm , I'll make sure to read masmlib.chm   :biggrin:

@mineiro Hi , thanks for replying this topic , greeting to Mr.KetilO , I already have RadASM Source It's so important to me , once I fee comfortable using asm I'll try to study the code , for now I want to finish my simple project ' A simple PE Parser ' .

[-] I'll work on the listview today to add some items and extract DOS Header informations .

Best Regards ,
Title: Re: How to use RadASM components ?
Post by: TimoVJL on May 19, 2020, 01:56:29 PM
wjr's PEView (http://wjradburn.com/software/PEview.zip) is good for PE-files.

BTW:
char *BaseName2(char *pszPath)
{
char *pChar = pszPath;
while (*pszPath++)
if (*pszPath == '/' || *pszPath == '\\' ) {
pChar = pszPath;
pChar++;
}
return pChar;
}

_BaseName2@4:
00000000  8B442404                 mov eax, dword ptr [esp+4h]
00000004  89C2                     mov edx, eax
00000006  EB0D                     jmp L_15
00000008  80382F                   cmp byte ptr [eax], 2Fh
0000000B  7405                     jz L_12
0000000D  80385C                   cmp byte ptr [eax], 5Ch
00000010  7503                     jnz L_15
00000012  8D5001                   lea edx, [eax+1h]
00000015  89C1                     mov ecx, eax
00000017  40                       inc eax
00000018  803900                   cmp byte ptr [ecx], 0h
0000001B  75EB                     jnz L_8
0000001D  89D0                     mov eax, edx
0000001F  C20400                   ret 4h
Title: Re: How to use RadASM components ?
Post by: Ding on May 26, 2020, 01:11:47 PM
Hi , TimoVJL
the utility (PEview) is not open source ?
Title: Re: How to use RadASM components ?
Post by: TimoVJL on May 26, 2020, 05:22:24 PM
Quote from: Ding on May 26, 2020, 01:11:47 PM
Hi , TimoVJL
the utility (PEview) is not open source ?
No, i think so, it was written in GoASM ?

TLPEView other hand was written in C, so both 32/64-bit versions exist, but also without public source code anymore.
Sourcecode was shared to other programmer, so if i disappear by Covid-19, others can continue  :thumbsup: