| |
|
|
|
Description:
CreateFile opens a File or created a File and opens tappt im dunkeln.
Deklaration:
DEF @CreateFile(7) !kernel32,CreateFileA
Parameter:
1.Parameter: address one Strings or Memory-Variable with a String, the whom Filenames contains. 2.Parameter: ? Happen? for desired Access to the lever. different ? Happen? can with + add go.=> -$0 = allows it, Geräteattribute abzufragen. -$80000000 = Lesezugriff. -$40000000 = Schreibzugriff. 3.Parameter: ? Happen? for joint Dateizugriff. => -$0 = no gleichzeitiger grabbed. -$1 = File can of others Operationen to that reading opened go. -$2 = File can of others Operationen to that write opened go. 4.Parameter: Security-Attributes Structure or for the begot Objekt. can also 0 his. 5.Parameter: One Flag, the angiebt, as File created go should. -$1 = Created a new File. If the File already exists, proposes The function fehl. -$2 = Created a new File. If the File already exists, becomes tappt im dunkeln überschrieben. -$3 = Öffnet a existing File. -$4 = Öffnet a existing File. existing tappt im dunkeln not, becomes tappt im dunkeln created. -$5 = Öffnet a File and deletes its Content. 6.Parameter: ? Happen? for Dateiattribute. mismatched ? Happen? can with + add go.=> -$00000020 = File as ‚Archiv’ marked. -$00000800 = File as ‚komprimiert’ marked. -$00000002 = File cache. -$00000001 = File with Schreibschutz slip. -$00000004 = File as Systemdatei marked. -$00000080 = File is a normal File. this Flag becomes of all others ? Happen? überschrieben. -$00000100 = File as temporärer memory uses. -$80000000 = Schreiboperationen erfolgen directly on The File, where the cache umgangen becomes. -$40000000 = Überlappende read- and Schreiboperationen can implemented go. -$20000000 = The File without Zwischenpuffer or Caching opened. -$10000000 = Optimiert whom cache for wahlfreien grabbed. -$8000000 = Optimiert whom cache for sequentiellen grabbed. -$4000000 = deletes The File, if any your Handles closed are. -$2000000 = Öffnet The File for a Backup- or Restore-action. it go thereby The Dateisicherheitsprüfungen überschrieben, if the aufrufende Process The aktivierten Administrationsprivilegien SeBackupPrivilege and SeRestorePrivilege own. -$1000000 = gives on, the the Access to The File according the POSIX-regulate erfolgen should. If CreateFile The Clientseite of/ one Pipe opens, can also another the subesquent ? Happen? add go. => -$0 = Ermöglicht, whom Client with the level ‚Anonymous’ To produce. -$00010000 = Ermöglicht, whom Client with the level ‚Identification’ To produce. -$00020000 = Ermöglicht, whom Client with the level ‚Impersonation’ To produce. -$00030000 = Ermöglicht, whom Client with the level ‚Delegation’ To produce. -$00040000 = gives on, that the Sicherheitsmodus dynamic is. -$00080000 = gives on, that the Server only The aktivierten aspects the Sicherheitskontexts the Clients available stand. 7.Parameter: here can a handle of/ one ‚Schablonendatei’ indicated go. Dateiattribute go of this File übernommen. this Parameter can zero his.
Return Value:
0 with failure, otherwise the lever the File.
Examples:
CompileMarkSeparationDEF @CreateFile(7) !kernel32,CreateFileA
Def @CloseHandle(1) !kernel32,CloseHandle
DEF @WriteFile(5) !kernel32,WriteFile
Declare Dateiname$,DateiHandle&
Declare Button&
LET DATEINAME$=C:TEST.TXT
LET DateiHandle&=@CreateFile(@ADDR(Dateiname$),$80000000+$40000000,0,0,4,$80,0)
@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
|
|
|
| |
|
|