WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (6) [1] 2 3 4 5 6   ( Go to first unread post )

GetNextFile doesn't work, it gives an error in my program but it should be working?

rilm
Quote Post


Active Member
***

Group: Members
Posts: 56
Member No.: 18425
Joined: 9-February 09


Hi,

mov eax,sizeof szUsername
mov dwLen, eax
invoke GetUserName,offset szUsername,offset dwLen
invoke lstrcat,offset StartFolder,offset szUsername
invoke lstrcat,offset StartFolder,offset cookies
invoke MessageBox,NULL,offset StartFolder,offset szUsername,MB_OK

invoke SetupGetNextFile,StartFolder,FileSpec
jmp del
jmp ende
del:
.repeat
inv GetNextFile,offset FoundFile
.break .if Carry?
inv DeleteFile, offset FoundFile
.until 0
ret
ende:
.endif

if i change invoke SetupGetNextFile,StartFolder,FileSpec into this:

invoke SetupGetNextFile,addr StartFolder,addr FileSpec

it gives an error in my program but it should be working?

thanks
PMEmail Poster
Top
rilm
Quote Post


Active Member
***

Group: Members
Posts: 56
Member No.: 18425
Joined: 9-February 09


here is my code

Attached File ( Number of downloads: 8 )
 Login or Register to download
PMEmail Poster
Top
JimG
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 725
Member No.: 11
Joined: 16-May 04


I could not find where FileSpec was defined in your program. Using addr should be correct for StartFolder. If FileSpec is defined in a data section, then addr should work.

If FileSpec contains the the address of a string, then don't use addr. Like I say, I couldn't find it in your program, so I don't know which is correct in your case.

I don't have your version of bmbuttons.inc, so I couldn't really test your program otherwise, there were dozens of errors using my version.

Also, here's the latest version of GetNextFile. It uses the heap for storage rather than putting a lot of stuff in your .data section, and has some other small changes.

Attached File ( Number of downloads: 5 )
 Login or Register to download
PMEmail Poster
Top
rilm
Quote Post


Active Member
***

Group: Members
Posts: 56
Member No.: 18425
Joined: 9-February 09


HI JIM,
i defined it in a include file as FileSpec db "*.*",0

the problem is when i define this startfolder db "whole path name",0
this wil delete the files but i don't know the user name on a nother computer so when do it like in my file in the topic it wont work.
grt
sad.gif
PMEmail Poster
Top
rilm
Quote Post


Active Member
***

Group: Members
Posts: 56
Member No.: 18425
Joined: 9-February 09


many thanks for your efforts on your include file
grt cheers.gif
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (6) [1] 2 3 4 5 6  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google