forked from amdf/NativeShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ntfile.h
29 lines (18 loc) · 1.06 KB
/
ntfile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef NATIVEFILE_FUNCTIONS_H
#define NATIVEFILE_FUNCTIONS_H 1
//#define DEBUGMODE
#include <ntndk.h> // include this for its native functions and defn's
//#include "stdio.h"
BOOLEAN NtFileOpenFile(HANDLE* phRetFile, WCHAR* pwszFileName, BOOLEAN bWrite, BOOLEAN bOverwrite);
BOOLEAN NtFileOpenDirectory(HANDLE* phRetFile, WCHAR* pwszFileName, BOOLEAN bWrite, BOOLEAN bOverwrite);
BOOLEAN NtFileReadFile(HANDLE hFile, LPVOID pOutBuffer, DWORD dwOutBufferSize, DWORD* pRetReadedSize);
BOOLEAN NtFileWriteFile(HANDLE hFile, LPVOID lpData, DWORD dwBufferSize, DWORD* pRetWrittenSize);
BOOLEAN NtFileSeekFile(HANDLE hFile, LONGLONG lAmount);
BOOLEAN NtFileGetFilePosition(HANDLE hFile, LONGLONG* pRetCurrentPosition);
BOOLEAN NtFileGetFileSize(HANDLE hFile, LONGLONG* pRetFileSize);
BOOLEAN NtFileCloseFile(HANDLE hFile);
BOOLEAN NtFileCopyFile(WCHAR* pszSrc, WCHAR* pszDst);
BOOLEAN NtFileDeleteFile(PCWSTR filename);
BOOLEAN NtFileCreateDirectory(PCWSTR dirname);
BOOLEAN NtFileMoveFile(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, BOOLEAN ReplaceIfExists);
#endif