Answer the question
In order to leave comments, you need to log in
How to write text to a file using copyFileA?
How to correctly write the name of all folders to a file? Thanks in advance
, here's what I got:
.386
.model flat,STDCALL
extrn SHGetSpecialFolderLocation:Proc
extrn MessageBoxA:Proc
extrn ExitProcess:Proc
extrn SHGetPathFromIDList:Proc
extrn CopyFileA:Proc
.data
INDEX dd 0
DIRECTORY_ID dd 0
DIRECTORY_NAME db 512 dup(0)
T db ' Cпеціальний каталог:',0
K db ' Індекс:', 0
H db ' Хендл:', 0
outText db 'out.txt', 0
.code
Start: push offset DIRECTORY_ID
push INDEX
push 0
call SHGetSpecialFolderLocation
inc INDEX
cmp INDEX,65
jnc STOP
or eax,eax
jnz Start
push offset DIRECTORY_NAME
push DIRECTORY_ID
call SHGetPathFromIDList
call CopyFileA,offset DIRECTORY_NAME, offset outText,0
;call MessageBoxA,0,offset DIRECTORY_NAME, offset T,0
;call MessageBoxA,0,offset INDEX, offset K,0
;call MessageBoxA,0,offset DIRECTORY_ID, offset H,0
jmp Start
STOP: call ExitProcess,0
end Start
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question