Jump to content
Tuts 4 You

Directory Listing In Asm?


Pimp.exe

Recommended Posts

I know this should be simple and to many of you it probably is, but I am using RadASM and have a dialog with a listbox on it. What I want to do is fill this listbox with every .mp3 file in D:\Music. I have tried the invoke DlgDirList and the SendMessage LB_DIR but with no success. Program would either crash or simply give me an empty list box.

I did debug it with olly, and still am unable to find out the solution. If anyone could, can I get a working way to do this?

Please remember that the less code the better as asm isnt my strongest language. Thanks guys.

Link to comment
handle	dd	0
wfd WIN32_FIND_DATA <>
folder db "C:\music\*.mp3",0 invoke FindFirstFile,offset folder,offset wfd
mov handle,eax
.While eax != ERROR_BAD_PATHNAME && eax != NULL
invoke GetLastError
invoke SendDlgItemMessage, hWin, IDC_LST1, LB_ADDSTRING, handle, offset wfd.cFileName
invoke FindNextFile, handle, offset wfd
.endw
Edited by zako
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...