home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex042.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
947b
|
21 lines
// 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.
}