Beispiel #1
0
 public static void DeepDuplicateStrings(
     [DNNE.C99Type("struct string_container")] StringContainerNative strings,
     [DNNE.C99Type("struct string_container*")] StringContainerNative *pStringsOut)
 {
     // Round trip through the managed view to allocate a new native instance.
     *pStringsOut = StringContainerMarshaller.In.ConvertToUnmanaged(StringContainerMarshaller.Out.ConvertToManaged(strings));
 }
Beispiel #2
0
 public static void DeepDuplicateStrings(
     [DNNE.C99Type("struct string_container")] StringContainerNative strings,
     [DNNE.C99Type("struct string_container*")] StringContainerNative *pStringsOut)
 {
     // Round trip through the managed view to allocate a new native instance.
     *pStringsOut = new StringContainerNative(strings.ToManaged());
 }
Beispiel #3
0
 public static void ReverseStrings(
     [DNNE.C99Type("struct string_container*")] StringContainerNative *strings)
 {
     strings->str1 = (IntPtr)Strings.Reverse((byte *)strings->str1);
     strings->str2 = (IntPtr)Strings.Reverse((byte *)strings->str2);
 }