Understanding an NDR wide char string

Jelmer Vernooij jelmer at samba.org
Fri Sep 9 12:09:56 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Scott,

Scott Warfield wrote:

> I hope this is the appropriate forum for something like this, but I
> am trying to understand some NDR strings. I've read through
> http://www.opengroup.org/onlinepubs/9629399/chap14.htm a bit. A
> wchar_t * as I understand it would be represented as follows;

That would be a wchar_t * with a [string] attribute.

> DWORD FormatLabel

What exactly would this field do? Other then that, your comments look ok.

> DWORD MaxCount DWORD Offset DWORD ActualCount WORD
> Character[ActualCount]

Character would not necessarily be at this position but might be
deferred (if the wchar_t * is embedded).

> Is this correct? A real world example would be; 28 13 00 01 0F 00
> 00 00 00 00 00 00 0F 00 00 00 5C 00 5C 00 66 00 6F 00 6F 00 5C 00
> 62 00 61 00 72 00 5C 00 66 00 30 00 30 00 64 00 00 00 00 00
>
> \.\.f.o.o.\.b.a.r.\.f.0.0.d.
>
> The format label is "28 13 00 01"

What exactly do you mean by 'format label' ? The example here would match:
[string] wchar_t data[] or wchar_t *data if there is no other data
after data.

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDIXuTPa9Uoh7vUnYRAvJ6AKCCfiV1lB1t5p4U33XX7RK8AuC2MgCeIwXg
OAQzQEF9K6QVIH+wJnoKoE0=
=gRU8
-----END PGP SIGNATURE-----



More information about the samba-technical mailing list