From: Robert K. <ro...@ko...> - 2002-07-26 23:21:21
|
The code fragment eric gave me works for the compiler. However, (atleast for me) there is the question wether it does actually the right. But why should it. BTW your program returns 2. But I used wchar_t instead, cos there was no __wchar_t Magefire k'Vala schrieb: > 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 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > reactos-kernel mailing list > rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel |