public static void freeLangIntPtr(IntPtr ptr, BP_WORD size) { if (null == ptr || IntPtr.Zero == ptr) { return; } long LongPtr = ptr.ToInt64(); // Must work both on x86 and x64 unsafe { for (BP_WORD i = 0; i < size; i++) { IntPtr *tmpIntPtr = (IntPtr *)LongPtr; Tools.freeIntPtr(*tmpIntPtr); LongPtr += Marshal.SizeOf(typeof(IntPtr)); } } Tools.freeIntPtr(ptr); }
public static extern IntPtr BP_SetCusSigEnumLang(IntPtr cus_sig_enum_lang, BP_WORD cus_sig_enum_lang_size);
public static extern IntPtr BP_SetCusSigUnitLang(IntPtr cus_sig_unit_lang, BP_WORD cus_sig_unit_lang_size);
public static extern IntPtr BP_SetCusSigGroupLang(IntPtr cus_sig_group_lang, BP_WORD cus_sig_group_lang_size);
public static extern IntPtr BP_SetCusSigNameLang(IntPtr cus_sig_name_lang, BP_WORD cus_sig_name_lang_size);