flat assembler
Message board for the users of flat assembler.

Index > Windows > FASM Manipulate HDD

Author
Thread Post new topic Reply to topic
rever0lf



Joined: 04 May 2011
Posts: 15
rever0lf 06 May 2011, 13:40
Anyone can help me,, give me a codes that can manipulate hard drive. . .
example,, , , , Codes that can create or delete a folder int drive C:

thnx. . . .. nid ASAP
Post 06 May 2011, 13:40
View user's profile Send private message Yahoo Messenger Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 06 May 2011, 14:30
CreateFile function and DeleteFile function (check the Remarks section).

I'm sure using the forum's search will return many pieces of code.
Post 06 May 2011, 14:30
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1403
Location: Piraeus, Greece
Picnic 06 May 2011, 14:49
CreateDirectory

Here is a small piece of code to get you started Wink
Code:
        format pe console 4.0

        include "include\win32ax.inc"

        define ERROR_ALREADY_EXISTS 183

.data
        myDir db "C:\myDir",0

.code
main:
        ; Create a new directory
        invoke CreateDirectory, myDir, 0
        .if ~eax
            invoke GetLastError
            ;Possible errors
            .if eax = ERROR_ALREADY_EXISTS
                ; handle error
            .else
                ; handle error
            .endif
            mov eax, 1
            jmp .exit
        .endif


        xor eax, eax

            .exit:
        invoke ExitProcess,  eax

.end main
    
Post 06 May 2011, 14:49
View user's profile Send private message Visit poster's website Reply with quote
rever0lf



Joined: 04 May 2011
Posts: 15
rever0lf 06 May 2011, 23:16
thnx. . picnic. . .
Post 06 May 2011, 23:16
View user's profile Send private message Yahoo Messenger Reply with quote
rever0lf



Joined: 04 May 2011
Posts: 15
rever0lf 07 May 2011, 08:37
ca I ask a question?? what is the purpose of invoke? and format PE console 4.0
Post 07 May 2011, 08:37
View user's profile Send private message Yahoo Messenger Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz 07 May 2011, 11:29
rever0lf
It's pointing number of Windows version and means which version it supports. 4.0 = Program will run on Windows 95 and above. For more information, check this --> http://www.windows7hacker.com/index.php/2009/08/a-list-of-windows-operating-system-version-number/
Post 07 May 2011, 11:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.