pub fn netshareenum_stub(shares: &[ShareInfo]) -> Vec<u8> ⓘExpand description
Build the NDR stub for a NetShareEnumAll level-1 response ([MS-SRVS] §3.1.4.8, §2.2.4.33) marshalled per [MS-RPCE] NDR rules.
The SHARE_INFO_1_CONTAINER union arm is emitted in full — the array of
SHARE_INFO_1 fixed parts (netname pointer, type, remark pointer) first,
then every pointee string deferred in pointer-appearance order — before the
trailing TotalEntries, ResumeHandle and return-code out-parameters.
Deferring the strings (rather than inlining each after its referent id) is
the NDR rule for pointers embedded in a conformant array; the ms-ndr
primitive layer handles referent ids, 4-byte alignment and the
[size_is][length_is] wchar payload.