home *** CD-ROM | disk | FTP | other *** search
- #include<dos.h>
- #include<stdio.h>
- /***********************************************************
- * Subroutinen für Quick-C (c) 1990 by toolbox & U.Schmitz *
- ************************************************************
- * FUNKTION: create_file: Erstellt eine Datei *
- * Eingabe: create_file(segment,offset,attribut) *
- * segment : Segmentadresse Filename *
- * offset : Offsetadresse Filename *
- * attribut : Attribut-Byte *
- * Bit-0:READ ONLY *
- * Bit-1:HIDDEN *
- * Bit-2:SYSTEMDATEI *
- * Rückgabe: Nummer des Datei-Handles oder -1 bei Fehler *
- ***********************************************************/
- extern int create_file( int, int, int);
-
- unsigned int segment, offset, handle, attribut;
- char filename[12]="DADDEL.DAT\0";
- char far *z;
-
- main()
- {
- /* Adresse des Filenamens ermitteln - - - - - - - - - - - */
- z = (void far*) filename;
- offset = FP_OFF(z);
- segment = FP_SEG(z);
-
- attribut = 2; /* HIDDEN */
- handle = create_file(segment, offset, attribut);
- return(handle);
- }
-