OSDN Git Service

コア部分を共通プロジェクト化した
[fooeditengine/FooEditEngine.git] / DotNetTextStore / UnmanagedAPI / WinError.cs
1 using System;
2 using System.Reflection;
3 using System.Runtime.InteropServices;
4 using System.Security;
5
6
7 namespace DotNetTextStore.UnmanagedAPI.WinError
8 {
9     public static class HRESULT
10     {
11         /// <summary>i_errorCode が成功した値かどうか調べる。</summary>
12         public static bool Succeeded(int i_errorCode)
13         {
14             return i_errorCode >= 0;
15         }
16
17         /// <summary>
18         /// The method was successful.
19         /// </summary>
20         public const int S_OK = 0;
21         /// <summary>
22         /// The method was successful.
23         /// </summary>
24         public const int S_FALSE = 0x00000001;
25         /// <summary>
26         /// An unspecified error occurred.
27         /// </summary>
28         public const int E_FAIL = unchecked((int)0x80004005);
29         /// <summary>
30         /// An invalid parameter was passed to the returning function.
31         /// </summary>
32         public const int E_INVALIDARG = unchecked((int)0x80070057);
33         /// <summary>
34         /// The method is not implemented.
35         /// </summary>
36         public const int E_NOTIMPL = unchecked((int)0x80004001);
37         /// <summary>
38         ///  The data necessary to complete this operation is not yet available.
39         /// </summary>
40         public const int E_PENDING = unchecked((int)0x8000000A);
41         /// <summary>
42         /// There is insufficient disk space to complete operation.
43         /// </summary>
44         public const int STG_E_MEDIUMFULL = unchecked((int)0x80030070);
45         /// <summary>
46         /// Attempted to use an object that has ceased to exist.
47         /// </summary>
48         public const int STG_E_REVERTED = unchecked((int)0x80030102);
49     }
50 }