C:\Users\folle\Documents\wapi\vax\winapi.c:8:8: error: conflicting types for 'hIn'
DWORD hIn, hOut;
^
C:\Users\folle\Documents\wapi\vax\winapi.c:7:9: note: previous declaration of 'hIn' was here
HANDLE hIn, hOut;
^
C:\Users\folle\Documents\wapi\vax\winapi.c:8:13: error: conflicting types for 'hOut'
DWORD hIn, hOut;
^
C:\Users\folle\Documents\wapi\vax\winapi.c:7:14: note: previous declaration of 'hOut' was here
HANDLE hIn, hOut;
^
C:\Users\folle\Documents\wapi\vax\winapi.c:15:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
hIn = CreateFile(argv [1], GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
^
C:\Users\folle\Documents\wapi\vax\winapi.c:16:12: warning: comparison between pointer and integer
if (hIn == INVALID_HANDLE_VALUE)
^
C:\Users\folle\Documents\wapi\vax\winapi.c:22:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
hOut = CreateFile(argv[2], GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
^
C:\Users\folle\Documents\wapi\vax\winapi.c:23:12: warning: comparison between pointer and integer
if (hOut == INVALID_HANDLE_VALUE)
^
C:\Users\folle\Documents\wapi\vax\winapi.c:28:20: warning: passing argument 1 of 'ReadFile' makes pointer from integer without a cast [-Wint-conversion]
while (ReadFile(hIn, Buffer, BUF_SIZE, &hIn, NULL) && hIn > 0)
^
In file included from c:\mingw\include\windows.h:44:0,
from C:\Users\folle\Documents\wapi\vax\winapi.c:1:
c:\mingw\include\winbase.h:2013:24: note: expected 'HANDLE {aka void *}' but argument is of type 'DWORD {aka long unsigned int}'
WINBASEAPI BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED);
^
C:\Users\folle\Documents\wapi\vax\winapi.c:30:14: warning: passing argument 1 of 'WriteFile' makes pointer from integer without a cast [-Wint-conversion]
WriteFile(hOut, Buffer, hIn, &hOut, NULL);
^
In file included from c:\mingw\include\windows.h:44:0,
from C:\Users\folle\Documents\wapi\vax\winapi.c:1:
c:\mingw\include\winbase.h:2207:24: note: expected 'HANDLE {aka void *}' but argument is of type 'DWORD {aka long unsigned int}'
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,PCVOID,DWORD,PDWORD,LPOVERLAPPED);
^
C:\Users\folle\Documents\wapi\vax\winapi.c:38:15: warning: passing argument 1 of 'CloseHandle' makes pointer from integer without a cast [-Wint-conversion]
CloseHandle(hIn);
^
In file included from c:\mingw\include\windows.h:44:0,
from C:\Users\folle\Documents\wapi\vax\winapi.c:1:
c:\mingw\include\winbase.h:1328:24: note: expected 'HANDLE {aka void *}' but argument is of type 'DWORD {aka long unsigned int}'
WINBASEAPI BOOL WINAPI CloseHandle(HANDLE);
^
C:\Users\folle\Documents\wapi\vax\winapi.c:39:15: warning: passing argument 1 of 'CloseHandle' makes pointer from integer without a cast [-Wint-conversion]
CloseHandle(hOut);
^
In file included from c:\mingw\include\windows.h:44:0,
from C:\Users\folle\Documents\wapi\vax\winapi.c:1:
c:\mingw\include\winbase.h:1328:24: note: expected 'HANDLE {aka void *}' but argument is of type 'DWORD {aka long unsigned int}'
WINBASEAPI BOOL WINAPI CloseHandle(HANDLE);
^