Serge Ivanov
[wine/multimedia.git] / dlls / ntdll / misc.c
blob514167c7cfa2533ae43c2dcffc44b3611470d3a8
1 /*
2 * Helper functions for ntdll
3 */
4 #include <time.h>
6 #include "config.h"
8 #include "debugtools.h"
9 #include "ntdll_misc.h"
11 DEFAULT_DEBUG_CHANNEL(ntdll);
13 void dump_ObjectAttributes (POBJECT_ATTRIBUTES oa)
15 if (oa)
16 TRACE("%p:(name=%s, attr=0x%08lx, hRoot=0x%08x, sd=%p) \n",
17 oa, debugstr_us(oa->ObjectName),
18 oa->Attributes, oa->RootDirectory, oa->SecurityDescriptor);
21 void dump_AnsiString(PANSI_STRING as, BOOLEAN showstring)
23 if (as)
25 if (showstring)
26 TRACE("%p %p(%s) (%u %u)\n", as, as->Buffer, debugstr_as(as), as->Length, as->MaximumLength);
27 else
28 TRACE("%p %p(<OUT>) (%u %u)\n", as, as->Buffer, as->Length, as->MaximumLength);
32 void dump_UnicodeString(PUNICODE_STRING us, BOOLEAN showstring)
34 if (us)
36 if (showstring)
37 TRACE("%p %p(%s) (%u %u)\n", us, us->Buffer, debugstr_us(us), us->Length, us->MaximumLength);
38 else
39 TRACE("%p %p(<OUT>) (%u %u)\n", us, us->Buffer, us->Length, us->MaximumLength);
43 LPCSTR debugstr_as (PANSI_STRING us)
45 if (!us) return NULL;
46 return debugstr_an(us->Buffer, us->Length);
49 LPCSTR debugstr_us (PUNICODE_STRING us)
51 if (!us) return NULL;
52 return debugstr_wn(us->Buffer, us->Length);