winapi CreateFile 예제
#include #include int main() { // Open a handle to the file HANDLE hFile = CreateFile( L"C:\\NewFile.txt", // Filename GENERIC_WRITE, // Desired access FILE_SHARE_READ, // Share mode NULL, // Security attributes CREATE_NEW, // Creates a new file, only if it doesn't already exist FILE_ATTRIBUTE_NORMAL, // Flags and attributes NULL); // Template file handle if (hFile == INVALID_HANDLE_VALUE) { // ..