private static void LoadPerfCounterDll() { if (s_perfCounterDllLoaded) { return; } string installPath = SharedUtils.GetLatestBuildDllDirectory("."); string perfcounterPath = Path.Combine(installPath, "perfcounter.dll"); if (Interop.Kernel32.LoadLibrary(perfcounterPath) == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } s_perfCounterDllLoaded = true; }
internal static string GetDllPath(string machineName) { return(Path.Combine(SharedUtils.GetLatestBuildDllDirectory(machineName), "EventLogMessages.dll")); }