/src/ext/BalExtension/mba/core/NativeMethods.cs
http://wix.codeplex.com · C# · 47 lines · 28 code · 4 blank · 15 comment · 0 complexity · 7a31d8172ef3e9e5c18bbdb230ee8291 MD5 · raw file
- //-------------------------------------------------------------------------------------------------
- // <copyright file="NativeMethods.cs" company="Outercurve Foundation">
- // Copyright (c) 2004, Outercurve Foundation.
- // This software is released under Microsoft Reciprocal License (MS-RL).
- // The license and further copyright text can be found in the file
- // LICENSE.TXT at the root directory of the distribution.
- // </copyright>
- //
- // <summary>
- // Container class for the IBootstrapperEngine interface passed to the IBootstrapperApplication.
- // </summary>
- //-------------------------------------------------------------------------------------------------
-
- namespace WixToolset.Bootstrapper
- {
- using System;
- using System.Runtime.InteropServices;
-
- /// <summary>
- /// Contains native constants, functions, and structures for this assembly.
- /// </summary>
- internal static class NativeMethods
- {
- #region Error Constants
- internal const int S_OK = 0;
- internal const int E_MOREDATA = unchecked((int)0x800700ea);
- internal const int E_INSUFFICIENT_BUFFER = unchecked((int)0x8007007a);
- internal const int E_CANCELLED = unchecked((int)0x800704c7);
- internal const int E_ALREADYINITIALIZED = unchecked((int)0x800704df);
- internal const int E_NOTFOUND = unchecked((int)0x80070490);
- internal const int E_UNEXPECTED = unchecked((int)0x8000ffff);
- #endregion
-
- #region Functions
- [DllImport("shell32.dll", ExactSpelling = true, SetLastError = true)]
- internal static extern IntPtr CommandLineToArgvW(
- [MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine,
- out int pNumArgs
- );
-
- [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)]
- internal static extern IntPtr LocalFree(
- IntPtr hMem
- );
- #endregion
- }
- }