cl /Gz /Od test2.c user32.lib ntdll.lib /link /opt:nowin98 /subsystem:console /NODEFAULTLIB

#define _X86_
#define _WIN32_WINNT 0x0500
#include <Winternl.h>

#pragma comment(lib,"ntdll.lib")
#pragma comment(linker, "/entry:start")
#pragma comment(linker, "/subsystem:console")


void start()
{
HANDLE F;
ACCESS_MASK mask;
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK statusBlock;

NTSTATUS status;

static const wchar_t file_name_text[]=L"\??\c:\Temp\1";

static UNICODE_STRING file_name = { sizeof(file_name_text) - sizeof(wchar_t),
sizeof(file_name_text),(PWSTR) file_name_text };

mask=0x80000000L;//GENERIC_READ

attr.RootDirectory=NULL;
attr.ObjectName=&file_name;
attr.SecurityDescriptor=NULL;
attr.Length=sizeof(OBJECT_ATTRIBUTES);
attr.SecurityQualityOfService=NULL;
attr.Attributes=0x00000040L;//OBJ_CASE_INSENSITIVE

status=NtCreateFile(&F, mask, &attr, &statusBlock,
NULL, 0, 0, 0, 0, NULL, 0);

NtClose(F);
return;
}