From: Magefire k'V. <ti...@ya...> - 2002-07-26 21:08:50
|
At 02:14 AM 7/26/2002 +0200, Robert K. wrote: >Where is my Fault? > > NT::UNICODE_STRING unistr; > NT::NTSTATUS stat; > NT::OBJECT_ATTRIBUTES oa = {sizeof oa, 0, &unistr, > NT::OBJ_CASE_INSENSITIVE, 0, 0}; > > // init String still bevore use. > NT::RtlInitUnicodeString( &unistr, L"\\\\.\\Beep" ); > ---------------------------^ >This results in >misc/error.cpp:36: passing `const __wchar_t *' as argument 2 of >`NT::RtlInitUnicodeString(NT::_UNICODE_STRING *, const short unsigned int *)' Check your gcc configuration - Unix (and thus, on average gcc) traditionally use a 4-byte wchar_t; Win32 uses a 2-byte one. Try building and running the following program, and see what it says. #include <stdio.h> #include <wchar.h> int main(int argc, char **argv) { printf("sizeof(__wchar_t) = %d\n", sizeof(__wchar_t)); } -- BKS |