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
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
/* 
 * Functions to lookup dynamically at load on NT. 
 */ 
 
#ifdef __NT__ 
 
#ifndef NTLIB 
/* NTLIB(LIBNAME) */ 
#error NTLIB macro not defined. 
#endif 
#ifndef NTLIBFUNC 
/* NTLIBFUNC(LIBNAME, RETTYPE, SYMBOL, ARGLIST) */ 
#error NTLIBFUNC macro not defined. 
#endif 
 
NTLIB(kernel32); 
 
NTLIBFUNC(kernel32, BOOL, MoveFileExW, ( 
  LPCWSTR lpExistingFileName,  /* file name     */ 
  LPCWSTR lpNewFileName,       /* new file name */ 
  DWORD dwFlags                /* move options  */ 
)); 
 
/* The following are needed for pty handling, 
 * and taken from <consoleapi.h> and <processthreadsapi.h>. 
 */ 
 
NTLIBFUNC(kernel32, HRESULT, CreatePseudoConsole, ( 
  COORD size, 
  HANDLE hInput, 
  HANDLE hOutput, 
  DWORD dwFlags, 
  HPCON *phPC 
)); 
 
NTLIBFUNC(kernel32, HRESULT, ResizePseudoConsole, ( 
  HPCON hPC, 
  COORD size 
)); 
 
NTLIBFUNC(kernel32, VOID, ClosePseudoConsole, ( 
  HPCON hPC 
)); 
 
NTLIBFUNC(kernel32, BOOL, InitializeProcThreadAttributeList, ( 
  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, 
  DWORD dwAttributeCount, 
  DWORD dwFlags, 
  PSIZE_T lpSize 
)); 
 
NTLIBFUNC(kernel32, VOID, DeleteProcThreadAttributeList, ( 
  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList 
)); 
 
NTLIBFUNC(kernel32, BOOL, UpdateProcThreadAttribute, ( 
  LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList, 
  DWORD dwFlags, 
  DWORD_PTR Attribute, 
  PVOID lpValue, 
  SIZE_T cbSize, 
  PVOID lpPreviousValue, 
  PSIZE_T lpReturnSize 
)); 
 
#endif /* __NT__ */