-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComHelper.cs
More file actions
29 lines (25 loc) · 724 Bytes
/
Copy pathComHelper.cs
File metadata and controls
29 lines (25 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Runtime.InteropServices;
namespace AutoVolumeControl
{
public static class ComHelper
{
[DllImport("ole32.dll")]
public static extern int CoInitializeEx(IntPtr pvReserved, COINIT dwCoInit);
[DllImport("ole32.dll")]
public static extern void CoUninitialize();
public enum COINIT : uint
{
COINIT_MULTITHREADED = 0x0,
COINIT_APARTMENTTHREADED = 0x2,
COINIT_DISABLE_OLE1DDE = 0x4,
COINIT_SPEED_OVER_MEMORY = 0x8
}
public enum HResult : int
{
S_OK = 0,
S_FALSE = 1,
RPC_E_CHANGED_MODE = unchecked((int)0x80010106)
}
}
}