public void ProcessParamsRequests() { DllMap dllmap = new DllMap(); MapNode node = new MapNode(); // dllmap.nodes = node; LP_SETTING_STRUCT seting1 = new LP_SETTING_STRUCT(); seting1.type = LP_SETTING_TYPE.LP_SETTING_TYPE_INTEGER; seting1.value = Marshal.AllocCoTaskMem(IQlite_Common_Define.MID_BUFFER_LEN); seting1.unit = Marshal.AllocCoTaskMem(IQlite_Common_Define.MID_BUFFER_LEN); seting1.helpText = Marshal.AllocCoTaskMem(IQlite_Common_Define.MID_BUFFER_LEN); Marshal.Copy(Encoding.ASCII.GetBytes("No1 Value"), 0, seting1.value, "No1 Value".Length); Marshal.Copy(Encoding.ASCII.GetBytes("No1 Unit"), 0, seting1.unit, "No1 Unit".Length); Marshal.Copy(Encoding.ASCII.GetBytes("No1 HelpText"), 0, seting1.helpText, "No1 helpText".Length); // dllmap.inis }
[DllImport(CONST_DEFIN.DllTestFunc, EntryPoint = "ProcessParamsRequests", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)] //, CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] private static extern int DLL_ProcessParamsRequests(ref DllMap dllmap);