English
Regulars table & Café

WriteFile.

 


Description:

WriteFile writes data ex the actually position the Dateizeigers in a File.




Deklaration:

DEF @WriteFile(5) !kernel32,WriteFile




Parameter:

1.Parameter: lever the File, into one write wants.
2.Parameter: address of/ one variables with data or Memory-Variable with data, The written go should.
3.Parameter: Number of Bytes, The written go should as LongInt.
4.Parameter: Memory-Variable, The The Number of really written Bytes aufnimmt.
5.Parameter: Structure or 20 byte Memory-Variable for überlappendes reading and write. can zero his, if the lever the Files not $40000000 (with CreateFile Parameter 6) opened watts.
-byte 0-3 = for Systemgebrauch reserved.
-byte 4-7 = for Systemgebrauch reserved.
-byte 8-11 = The downstairs 32 bit the Startadresse for the write.
-byte 12-15 = The oberen 32 bit the Startadresse for the write.
-byte 16-19 = lever the Ereignisses, the one signal angibt, if The Übertragung exits is.



Return Value:

0 with failure, 1 with success.


Examples:

CompileMarkSeparation
DEF @CreateFile(7) !"kernel32","CreateFileA"
Def @CloseHandle(1) !"kernel32","CloseHandle"
DEF @WriteFile(5) !"kernel32","WriteFile"
Declare Dateiname$,Text$,Written#,DateiHandle&
Declare Button&
LET TEXT$="Hallo Welt!"
LET DATEINAME$="C:TEST.TXT"
LET DateiHandle&=@CreateFile(@ADDR(Dateiname$),$80000000+$40000000,0,0,4,$80,0)
Dim Written#,4
@WriteFile(DateiHandle&,@ADDR(TEXT$),@len(Text$),Written#,0)
Dispose Written#
@CloseHandle(DateiHandle&)
WINDOWSTYLE 31
Windowtitle "Datei erzeugen"
WINDOW 0,0-640,440
Let Button&=@Createbutton(%HWND,"Datei löschen",20,200,200,30)

While 0=0

    Waitinput

    IF @GetFocus(Button&)

        ASSIGN #1,Dateiname$
        Erase #1
        Enablewindow Button&,0
        Beep 1

    Endif

WEND

 
04/02/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.683 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie