NativeProxy.cs 942 B

123456789101112131415161718192021222324252627
  1. using System.Runtime.InteropServices;
  2. using System.Text;
  3. namespace WingAIDiagnosisService.URMManage
  4. {
  5. public class NativeProxy
  6. {
  7. [DllImport("VCL.dll", CharSet = CharSet.Ansi, EntryPoint = "UpdateSection")]
  8. private static extern void UpdateSectionImpl(string section, string key, string value);
  9. [DllImport("VCL.dll", CharSet = CharSet.Ansi)]
  10. public static extern void GetValue(string section, string key, StringBuilder lpString, int maxCount);
  11. public static void UpdateSection(string section, string key, string value, bool logit = true)
  12. {
  13. // Logger.ForceWriteLineIf(logit, "UpdateSection({0}.{1}: {2})", section, key, value);
  14. // var resourceManager = (ResourceManagerImpl)ResourceManager.Manager;
  15. // resourceManager.UpdateDefaultValue(section, key, value);
  16. UpdateSectionImpl(section, key, value);
  17. }
  18. }
  19. }