home *** CD-ROM | disk | FTP | other *** search
- // Example: 042 from Library Reference
- #include "..\3D-Ware\dddware.h"
- #include <stdio.h>
- char buffer[]={"TESTING"};
- char filename[]={"3d-ware.tmp"};
- short filehandle;
- short main(void)
- {
- dddWriteFile(filename, buffer , 7); // Write a temporary file to disk.
- filehandle = dddFopen(filename); // Open the file.
- // Print the file handle or the error code.
- printf("\nfilehandle returned by dddFopen is :- %d\n\n",filehandle);
- if (filehandle == -1)
- {
- printf("Error opening file \"%s\".",filename); // Inform the user of an error.
- return 1; // Exit with error.
- }
- dddFclose(filehandle); // Close the file.
- return 0; // Success , so exit.
- }
-