Event query code error

hi there
We are trying to write a c++ code to query events from audit logs and when we run our code there is no output. the errors shown below. Can anyone help us to figure out what these errors mean and how we can fix it.

main.cpp: In function ‘int main()’:
main.cpp:79:13: error: invalid conversion from ‘wchar_t’ to ‘const wchar_t*’ [-fpermissive]
79 | wprintf((const wchar_t)DisplayEvents(Path,Query));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| wchar_t
In file included from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/cwchar:44,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/bits/postypes.h:40,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/iosfwd:40,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/ios:38,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/iostream:39,
from main.cpp:6:
/usr/include/wchar.h:292:14: note: initializing argument 1 of ‘int wprintf(const wchar_t*, …)’
292 | int wprintf (const wchar_t *__restrict, …);
| ^~~~~~~~~~~~~~~
main.cpp: In function ‘void* EvtQuery(EVT_HANDLE, LPCWSTR, LPCWSTR, DWORD)’:
main.cpp:132:1: warning: no return statement in function returning non-void [-Wreturn-type]
132 | };
| ^
main.cpp: In function ‘BOOL EvtNext(EVT_HANDLE, DWORD, EVT_HANDLE, DWORD, DWORD, PDWORD)’:
main.cpp:176:1: warning: no return statement in function returning non-void [-Wreturn-type]
176 | };
| ^
main.cpp: At global scope:
main.cpp:267:32: warning: ‘DWORD GetLastError()’ redeclared without dllimport attribute after being referenced with dll linkage
267 | Post_equals_last_error DWORD GetLastError();
| ^~~~~~~~~~~~

Thank u in advance