style(design): apply Minimal Dark Mode design system\n\n- Switched to complete Dark Mode (OLED-friendly)\n- Established standard color palette matching modern technical aesthetics\n- Changed font to Plus Jakarta Sans for increased legibility\n- Enforced dark mode as default in App.tsx\n- Fixed several React cascading render (setState in useEffect) warnings
This commit is contained in:
1 parent
b80531f8a8
commit
bac7b5591e
738 files changed
+138513
-138123
No files matched your search
@@ -1,26 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
|
||||
<section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
<wix.bootstrapper>
|
||||
<!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. -->
|
||||
<!--
|
||||
<supportedFramework version="v4\Client" />
|
||||
<supportedFramework version="v3.5" />
|
||||
<supportedFramework version="v3.0" />
|
||||
-->
|
||||
|
||||
<!-- Example only. Replace the host/@assemblyName attribute with assembly that implements BootstrapperApplication. -->
|
||||
<host assemblyName="AssemblyWithClassThatInheritsFromBootstrapperApplication" />
|
||||
</wix.bootstrapper>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
|
||||
<section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
<wix.bootstrapper>
|
||||
<!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. -->
|
||||
<!--
|
||||
<supportedFramework version="v4\Client" />
|
||||
<supportedFramework version="v3.5" />
|
||||
<supportedFramework version="v3.0" />
|
||||
-->
|
||||
|
||||
<!-- Example only. Replace the host/@assemblyName attribute with assembly that implements BootstrapperApplication. -->
|
||||
<host assemblyName="AssemblyWithClassThatInheritsFromBootstrapperApplication" />
|
||||
</wix.bootstrapper>
|
||||
</configuration>
|
||||
+2813
-2813
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" />
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -1,495 +1,495 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Deployment.Compression.Cab</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabPacker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabEngine">
|
||||
<summary>
|
||||
Engine capable of packing and unpacking archives in the cabinet format.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.#ctor">
|
||||
<summary>
|
||||
Creates a new instance of the cabinet engine.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly
|
||||
or indirectly by a user's code, so managed and unmanaged resources
|
||||
will be disposed. If false, the method has been called by the runtime
|
||||
from inside the finalizer, and only unmanaged resources will be
|
||||
disposed.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Pack(Microsoft.Deployment.Compression.IPackStreamContext,System.Collections.Generic.IEnumerable{System.String},System.Int64)">
|
||||
<summary>
|
||||
Creates a cabinet or chain of cabinets.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="files">The paths of the files in the archive (not
|
||||
external file paths).</param>
|
||||
<param name="maxArchiveSize">The maximum number of bytes for one
|
||||
cabinet before the contents are chained to the next cabinet, or zero
|
||||
for unlimited cabinet size.</param>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet could not be
|
||||
created.</exception>
|
||||
<remarks>
|
||||
The stream context implementation may provide a mapping from the
|
||||
file paths within the cabinet to the external file paths.
|
||||
<para>Smaller folder sizes can make it more efficient to extract
|
||||
individual files out of large cabinet packages.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.IsArchive(System.IO.Stream)">
|
||||
<summary>
|
||||
Checks whether a Stream begins with a header that indicates
|
||||
it is a valid cabinet file.
|
||||
</summary>
|
||||
<param name="stream">Stream for reading the cabinet file.</param>
|
||||
<returns>True if the stream is a valid cabinet file
|
||||
(with no offset); false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.GetFileInfo(Microsoft.Deployment.Compression.IUnpackStreamContext,System.Predicate{System.String})">
|
||||
<summary>
|
||||
Gets information about files in a cabinet or cabinet chain.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="fileFilter">A predicate that can determine
|
||||
which files to process, optional.</param>
|
||||
<returns>Information about files in the cabinet stream.</returns>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet provided
|
||||
by the stream context is not valid.</exception>
|
||||
<remarks>
|
||||
The <paramref name="fileFilter"/> predicate takes an internal file
|
||||
path and returns true to include the file or false to exclude it.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Unpack(Microsoft.Deployment.Compression.IUnpackStreamContext,System.Predicate{System.String})">
|
||||
<summary>
|
||||
Extracts files from a cabinet or cabinet chain.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="fileFilter">An optional predicate that can determine
|
||||
which files to process.</param>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet provided
|
||||
by the stream context is not valid.</exception>
|
||||
<remarks>
|
||||
The <paramref name="fileFilter"/> predicate takes an internal file
|
||||
path and returns true to include the file or false to exclude it.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabWorker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabException">
|
||||
<summary>
|
||||
Exception class for cabinet operations.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates a new CabException with a specified error message and a reference to the
|
||||
inner exception that is the cause of this exception.
|
||||
</summary>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception. If the
|
||||
innerException parameter is not a null reference (Nothing in Visual Basic), the current exception
|
||||
is raised in a catch block that handles the inner exception.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new CabException with a specified error message.
|
||||
</summary>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor">
|
||||
<summary>
|
||||
Creates a new CabException.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabException class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabException.Error">
|
||||
<summary>
|
||||
Gets the FCI or FDI cabinet engine error number.
|
||||
</summary>
|
||||
<value>A cabinet engine error number, or 0 if the exception was
|
||||
not related to a cabinet engine error number.</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabException.ErrorCode">
|
||||
<summary>
|
||||
Gets the Win32 error code.
|
||||
</summary>
|
||||
<value>A Win32 error code, or 0 if the exception was
|
||||
not related to a Win32 error.</value>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Sets the SerializationInfo with information about the exception.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabUnpacker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabFileInfo">
|
||||
<summary>
|
||||
Object representing a compressed file within a cabinet package; provides operations for getting
|
||||
the file properties and extracting the file.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(Microsoft.Deployment.Compression.Cab.CabInfo,System.String)">
|
||||
<summary>
|
||||
Creates a new CabinetFileInfo object representing a file within a cabinet in a specified path.
|
||||
</summary>
|
||||
<param name="cabinetInfo">An object representing the cabinet containing the file.</param>
|
||||
<param name="filePath">The path to the file within the cabinet. Usually, this is a simple file
|
||||
name, but if the cabinet contains a directory structure this may include the directory.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(System.String,System.Int32,System.Int32,System.IO.FileAttributes,System.DateTime,System.Int64)">
|
||||
<summary>
|
||||
Creates a new CabinetFileInfo object with all parameters specified,
|
||||
used internally when reading the metadata out of a cab.
|
||||
</summary>
|
||||
<param name="filePath">The internal path and name of the file in the cab.</param>
|
||||
<param name="cabFolder">The folder number containing the file.</param>
|
||||
<param name="cabNumber">The cabinet number where the file starts.</param>
|
||||
<param name="attributes">The stored attributes of the file.</param>
|
||||
<param name="lastWriteTime">The stored last write time of the file.</param>
|
||||
<param name="length">The uncompressed size of the file.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabinetFileInfo class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Sets the SerializationInfo with information about the archive.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information
|
||||
about the source or destination.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.Cabinet">
|
||||
<summary>
|
||||
Gets or sets the cabinet that contains this file.
|
||||
</summary>
|
||||
<value>
|
||||
The CabinetInfo instance that retrieved this file information -- this
|
||||
may be null if the CabinetFileInfo object was returned directly from a
|
||||
stream.
|
||||
</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetName">
|
||||
<summary>
|
||||
Gets the full path of the cabinet that contains this file.
|
||||
</summary>
|
||||
<value>The full path of the cabinet that contains this file.</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetFolderNumber">
|
||||
<summary>
|
||||
Gets the number of the folder containing this file.
|
||||
</summary>
|
||||
<value>The number of the cabinet folder containing this file.</value>
|
||||
<remarks>A single folder or the first folder of a cabinet
|
||||
(or chain of cabinets) is numbered 0.</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.Refresh(Microsoft.Deployment.Compression.ArchiveFileInfo)">
|
||||
<summary>
|
||||
Refreshes the information in this object with new data retrieved
|
||||
from an archive.
|
||||
</summary>
|
||||
<param name="newFileInfo">Fresh instance for the same file just
|
||||
read from the archive.</param>
|
||||
<remarks>
|
||||
This implementation refreshes the <see cref="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetFolderNumber"/>.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabInfo">
|
||||
<summary>
|
||||
Object representing a cabinet file on disk; provides access to
|
||||
file-based operations on the cabinet file.
|
||||
</summary>
|
||||
<remarks>
|
||||
Generally, the methods on this class are much easier to use than the
|
||||
stream-based interfaces provided by the <see cref="T:Microsoft.Deployment.Compression.Cab.CabEngine"/> class.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new CabinetInfo object representing a cabinet file in a specified path.
|
||||
</summary>
|
||||
<param name="path">The path to the cabinet file. When creating a cabinet file, this file does not
|
||||
necessarily exist yet.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabinetInfo class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.CreateCompressionEngine">
|
||||
<summary>
|
||||
Creates a compression engine that does the low-level work for
|
||||
this object.
|
||||
</summary>
|
||||
<returns>A new <see cref="T:Microsoft.Deployment.Compression.Cab.CabEngine"/> instance.</returns>
|
||||
<remarks>
|
||||
Each instance will be <see cref="M:Microsoft.Deployment.Compression.CompressionEngine.Dispose"/>d
|
||||
immediately after use.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.GetFiles">
|
||||
<summary>
|
||||
Gets information about the files contained in the archive.
|
||||
</summary>
|
||||
<returns>A list of <see cref="T:Microsoft.Deployment.Compression.Cab.CabFileInfo"/> objects, each
|
||||
containing information about a file in the archive.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.GetFiles(System.String)">
|
||||
<summary>
|
||||
Gets information about the certain files contained in the archive file.
|
||||
</summary>
|
||||
<param name="searchPattern">The search string, such as
|
||||
"*.txt".</param>
|
||||
<returns>A list of <see cref="T:Microsoft.Deployment.Compression.Cab.CabFileInfo"/> objects, each containing
|
||||
information about a file in the archive.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.HandleManager`1">
|
||||
<summary>
|
||||
Generic class for managing allocations of integer handles
|
||||
for objects of a certain type.
|
||||
</summary>
|
||||
<typeparam name="T">The type of objects the handles refer to.</typeparam>
|
||||
</member>
|
||||
<member name="F:Microsoft.Deployment.Compression.Cab.HandleManager`1.handles">
|
||||
<summary>
|
||||
Auto-resizing list of objects for which handles have been allocated.
|
||||
Each handle is just an index into this list. When a handle is freed,
|
||||
the list item at that index is set to null.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.#ctor">
|
||||
<summary>
|
||||
Creates a new HandleManager instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.HandleManager`1.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets the object of a handle, or null if the handle is invalid.
|
||||
</summary>
|
||||
<param name="handle">The integer handle previously allocated
|
||||
for the desired object.</param>
|
||||
<returns>The object for which the handle was allocated.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.AllocHandle(`0)">
|
||||
<summary>
|
||||
Allocates a new handle for an object.
|
||||
</summary>
|
||||
<param name="obj">Object that the handle will refer to.</param>
|
||||
<returns>New handle that can be later used to retrieve the object.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.FreeHandle(System.Int32)">
|
||||
<summary>
|
||||
Frees a handle that was previously allocated. Afterward the handle
|
||||
will be invalid and the object it referred to can no longer retrieved.
|
||||
</summary>
|
||||
<param name="handle">Handle to be freed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods">
|
||||
<summary>
|
||||
Native DllImport methods and related structures and constants used for
|
||||
cabinet creation and extraction via cabinet.dll.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI">
|
||||
<summary>
|
||||
A direct import of constants, enums, structures, delegates, and functions from fci.h.
|
||||
Refer to comments in fci.h for documentation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.ERROR">
|
||||
<summary>
|
||||
Error codes that can be returned by FCI.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.TCOMP">
|
||||
<summary>
|
||||
FCI compression algorithm types and parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.STATUS">
|
||||
<summary>
|
||||
Reason for FCI status callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.CCAB">
|
||||
<summary>
|
||||
Cabinet information structure used for FCI initialization and GetNextCabinet callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle">
|
||||
<summary>
|
||||
Ensures that the FCI handle is safely released.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.#ctor">
|
||||
<summary>
|
||||
Creates a new unintialized handle. The handle will be initialized
|
||||
when it is marshalled back from native code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.IsInvalid">
|
||||
<summary>
|
||||
Checks if the handle is invalid. An FCI handle is invalid when it is zero.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.ReleaseHandle">
|
||||
<summary>
|
||||
Releases the handle by calling FDIDestroy().
|
||||
</summary>
|
||||
<returns>True if the release succeeded.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI">
|
||||
<summary>
|
||||
A direct import of constants, enums, structures, delegates, and functions from fdi.h.
|
||||
Refer to comments in fdi.h for documentation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.ERROR">
|
||||
<summary>
|
||||
Error codes that can be returned by FDI.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.NOTIFICATIONTYPE">
|
||||
<summary>
|
||||
Type of notification message for the FDI Notify callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.CABINFO">
|
||||
<summary>
|
||||
Cabinet information structure filled in by FDI IsCabinet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.NOTIFICATION">
|
||||
<summary>
|
||||
Cabinet notification details passed to the FDI Notify callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle">
|
||||
<summary>
|
||||
Ensures that the FDI handle is safely released.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.#ctor">
|
||||
<summary>
|
||||
Creates a new unintialized handle. The handle will be initialized
|
||||
when it is marshalled back from native code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.IsInvalid">
|
||||
<summary>
|
||||
Checks if the handle is invalid. An FDI handle is invalid when it is zero.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.ReleaseHandle">
|
||||
<summary>
|
||||
Releases the handle by calling FDIDestroy().
|
||||
</summary>
|
||||
<returns>True if the release succeeded.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF">
|
||||
<summary>
|
||||
Error info structure for FCI and FDI.
|
||||
</summary>
|
||||
<remarks>Before being passed to FCI or FDI, this structure is
|
||||
pinned in memory via a GCHandle. The pinning is necessary
|
||||
to be able to read the results, since the ERF structure doesn't
|
||||
get marshalled back out after an error.</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Oper">
|
||||
<summary>
|
||||
Gets or sets the cabinet error code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Type">
|
||||
<summary>
|
||||
Gets or sets the Win32 error code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Error">
|
||||
<summary>
|
||||
GCHandle doesn't like the bool type, so use an int underneath.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Clear">
|
||||
<summary>
|
||||
Clears the error information.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Tools.WindowsInstallerXml.WixDistribution">
|
||||
<summary>
|
||||
Distribution specific strings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.NewsUrl">
|
||||
<summary>
|
||||
News URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.ShortProduct">
|
||||
<summary>
|
||||
Short product name for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.SupportUrl">
|
||||
<summary>
|
||||
Support URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.TelemetryUrlFormat">
|
||||
<summary>
|
||||
Telemetry URL format for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.VSExtensionsLandingUrl">
|
||||
<summary>
|
||||
VS Extensions Landing page Url for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Deployment.Compression.Cab</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabPacker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabEngine">
|
||||
<summary>
|
||||
Engine capable of packing and unpacking archives in the cabinet format.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.#ctor">
|
||||
<summary>
|
||||
Creates a new instance of the cabinet engine.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly
|
||||
or indirectly by a user's code, so managed and unmanaged resources
|
||||
will be disposed. If false, the method has been called by the runtime
|
||||
from inside the finalizer, and only unmanaged resources will be
|
||||
disposed.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Pack(Microsoft.Deployment.Compression.IPackStreamContext,System.Collections.Generic.IEnumerable{System.String},System.Int64)">
|
||||
<summary>
|
||||
Creates a cabinet or chain of cabinets.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="files">The paths of the files in the archive (not
|
||||
external file paths).</param>
|
||||
<param name="maxArchiveSize">The maximum number of bytes for one
|
||||
cabinet before the contents are chained to the next cabinet, or zero
|
||||
for unlimited cabinet size.</param>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet could not be
|
||||
created.</exception>
|
||||
<remarks>
|
||||
The stream context implementation may provide a mapping from the
|
||||
file paths within the cabinet to the external file paths.
|
||||
<para>Smaller folder sizes can make it more efficient to extract
|
||||
individual files out of large cabinet packages.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.IsArchive(System.IO.Stream)">
|
||||
<summary>
|
||||
Checks whether a Stream begins with a header that indicates
|
||||
it is a valid cabinet file.
|
||||
</summary>
|
||||
<param name="stream">Stream for reading the cabinet file.</param>
|
||||
<returns>True if the stream is a valid cabinet file
|
||||
(with no offset); false otherwise.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.GetFileInfo(Microsoft.Deployment.Compression.IUnpackStreamContext,System.Predicate{System.String})">
|
||||
<summary>
|
||||
Gets information about files in a cabinet or cabinet chain.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="fileFilter">A predicate that can determine
|
||||
which files to process, optional.</param>
|
||||
<returns>Information about files in the cabinet stream.</returns>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet provided
|
||||
by the stream context is not valid.</exception>
|
||||
<remarks>
|
||||
The <paramref name="fileFilter"/> predicate takes an internal file
|
||||
path and returns true to include the file or false to exclude it.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabEngine.Unpack(Microsoft.Deployment.Compression.IUnpackStreamContext,System.Predicate{System.String})">
|
||||
<summary>
|
||||
Extracts files from a cabinet or cabinet chain.
|
||||
</summary>
|
||||
<param name="streamContext">A context interface to handle opening
|
||||
and closing of cabinet and file streams.</param>
|
||||
<param name="fileFilter">An optional predicate that can determine
|
||||
which files to process.</param>
|
||||
<exception cref="T:Microsoft.Deployment.Compression.ArchiveException">The cabinet provided
|
||||
by the stream context is not valid.</exception>
|
||||
<remarks>
|
||||
The <paramref name="fileFilter"/> predicate takes an internal file
|
||||
path and returns true to include the file or false to exclude it.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabWorker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabException">
|
||||
<summary>
|
||||
Exception class for cabinet operations.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.String,System.Exception)">
|
||||
<summary>
|
||||
Creates a new CabException with a specified error message and a reference to the
|
||||
inner exception that is the cause of this exception.
|
||||
</summary>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
<param name="innerException">The exception that is the cause of the current exception. If the
|
||||
innerException parameter is not a null reference (Nothing in Visual Basic), the current exception
|
||||
is raised in a catch block that handles the inner exception.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new CabException with a specified error message.
|
||||
</summary>
|
||||
<param name="message">The message that describes the error.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor">
|
||||
<summary>
|
||||
Creates a new CabException.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabException class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabException.Error">
|
||||
<summary>
|
||||
Gets the FCI or FDI cabinet engine error number.
|
||||
</summary>
|
||||
<value>A cabinet engine error number, or 0 if the exception was
|
||||
not related to a cabinet engine error number.</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabException.ErrorCode">
|
||||
<summary>
|
||||
Gets the Win32 error code.
|
||||
</summary>
|
||||
<value>A Win32 error code, or 0 if the exception was
|
||||
not related to a Win32 error.</value>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Sets the SerializationInfo with information about the exception.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabUnpacker.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Disposes of resources allocated by the cabinet engine.
|
||||
</summary>
|
||||
<param name="disposing">If true, the method has been called directly or indirectly by a user's code,
|
||||
so managed and unmanaged resources will be disposed. If false, the method has been called by the
|
||||
runtime from inside the finalizer, and only unmanaged resources will be disposed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabFileInfo">
|
||||
<summary>
|
||||
Object representing a compressed file within a cabinet package; provides operations for getting
|
||||
the file properties and extracting the file.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(Microsoft.Deployment.Compression.Cab.CabInfo,System.String)">
|
||||
<summary>
|
||||
Creates a new CabinetFileInfo object representing a file within a cabinet in a specified path.
|
||||
</summary>
|
||||
<param name="cabinetInfo">An object representing the cabinet containing the file.</param>
|
||||
<param name="filePath">The path to the file within the cabinet. Usually, this is a simple file
|
||||
name, but if the cabinet contains a directory structure this may include the directory.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(System.String,System.Int32,System.Int32,System.IO.FileAttributes,System.DateTime,System.Int64)">
|
||||
<summary>
|
||||
Creates a new CabinetFileInfo object with all parameters specified,
|
||||
used internally when reading the metadata out of a cab.
|
||||
</summary>
|
||||
<param name="filePath">The internal path and name of the file in the cab.</param>
|
||||
<param name="cabFolder">The folder number containing the file.</param>
|
||||
<param name="cabNumber">The cabinet number where the file starts.</param>
|
||||
<param name="attributes">The stored attributes of the file.</param>
|
||||
<param name="lastWriteTime">The stored last write time of the file.</param>
|
||||
<param name="length">The uncompressed size of the file.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabinetFileInfo class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Sets the SerializationInfo with information about the archive.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information
|
||||
about the source or destination.</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.Cabinet">
|
||||
<summary>
|
||||
Gets or sets the cabinet that contains this file.
|
||||
</summary>
|
||||
<value>
|
||||
The CabinetInfo instance that retrieved this file information -- this
|
||||
may be null if the CabinetFileInfo object was returned directly from a
|
||||
stream.
|
||||
</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetName">
|
||||
<summary>
|
||||
Gets the full path of the cabinet that contains this file.
|
||||
</summary>
|
||||
<value>The full path of the cabinet that contains this file.</value>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetFolderNumber">
|
||||
<summary>
|
||||
Gets the number of the folder containing this file.
|
||||
</summary>
|
||||
<value>The number of the cabinet folder containing this file.</value>
|
||||
<remarks>A single folder or the first folder of a cabinet
|
||||
(or chain of cabinets) is numbered 0.</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabFileInfo.Refresh(Microsoft.Deployment.Compression.ArchiveFileInfo)">
|
||||
<summary>
|
||||
Refreshes the information in this object with new data retrieved
|
||||
from an archive.
|
||||
</summary>
|
||||
<param name="newFileInfo">Fresh instance for the same file just
|
||||
read from the archive.</param>
|
||||
<remarks>
|
||||
This implementation refreshes the <see cref="P:Microsoft.Deployment.Compression.Cab.CabFileInfo.CabinetFolderNumber"/>.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.CabInfo">
|
||||
<summary>
|
||||
Object representing a cabinet file on disk; provides access to
|
||||
file-based operations on the cabinet file.
|
||||
</summary>
|
||||
<remarks>
|
||||
Generally, the methods on this class are much easier to use than the
|
||||
stream-based interfaces provided by the <see cref="T:Microsoft.Deployment.Compression.Cab.CabEngine"/> class.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new CabinetInfo object representing a cabinet file in a specified path.
|
||||
</summary>
|
||||
<param name="path">The path to the cabinet file. When creating a cabinet file, this file does not
|
||||
necessarily exist yet.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||
<summary>
|
||||
Initializes a new instance of the CabinetInfo class with serialized data.
|
||||
</summary>
|
||||
<param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
|
||||
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.CreateCompressionEngine">
|
||||
<summary>
|
||||
Creates a compression engine that does the low-level work for
|
||||
this object.
|
||||
</summary>
|
||||
<returns>A new <see cref="T:Microsoft.Deployment.Compression.Cab.CabEngine"/> instance.</returns>
|
||||
<remarks>
|
||||
Each instance will be <see cref="M:Microsoft.Deployment.Compression.CompressionEngine.Dispose"/>d
|
||||
immediately after use.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.GetFiles">
|
||||
<summary>
|
||||
Gets information about the files contained in the archive.
|
||||
</summary>
|
||||
<returns>A list of <see cref="T:Microsoft.Deployment.Compression.Cab.CabFileInfo"/> objects, each
|
||||
containing information about a file in the archive.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.CabInfo.GetFiles(System.String)">
|
||||
<summary>
|
||||
Gets information about the certain files contained in the archive file.
|
||||
</summary>
|
||||
<param name="searchPattern">The search string, such as
|
||||
"*.txt".</param>
|
||||
<returns>A list of <see cref="T:Microsoft.Deployment.Compression.Cab.CabFileInfo"/> objects, each containing
|
||||
information about a file in the archive.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.HandleManager`1">
|
||||
<summary>
|
||||
Generic class for managing allocations of integer handles
|
||||
for objects of a certain type.
|
||||
</summary>
|
||||
<typeparam name="T">The type of objects the handles refer to.</typeparam>
|
||||
</member>
|
||||
<member name="F:Microsoft.Deployment.Compression.Cab.HandleManager`1.handles">
|
||||
<summary>
|
||||
Auto-resizing list of objects for which handles have been allocated.
|
||||
Each handle is just an index into this list. When a handle is freed,
|
||||
the list item at that index is set to null.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.#ctor">
|
||||
<summary>
|
||||
Creates a new HandleManager instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.HandleManager`1.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets the object of a handle, or null if the handle is invalid.
|
||||
</summary>
|
||||
<param name="handle">The integer handle previously allocated
|
||||
for the desired object.</param>
|
||||
<returns>The object for which the handle was allocated.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.AllocHandle(`0)">
|
||||
<summary>
|
||||
Allocates a new handle for an object.
|
||||
</summary>
|
||||
<param name="obj">Object that the handle will refer to.</param>
|
||||
<returns>New handle that can be later used to retrieve the object.</returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.HandleManager`1.FreeHandle(System.Int32)">
|
||||
<summary>
|
||||
Frees a handle that was previously allocated. Afterward the handle
|
||||
will be invalid and the object it referred to can no longer retrieved.
|
||||
</summary>
|
||||
<param name="handle">Handle to be freed.</param>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods">
|
||||
<summary>
|
||||
Native DllImport methods and related structures and constants used for
|
||||
cabinet creation and extraction via cabinet.dll.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI">
|
||||
<summary>
|
||||
A direct import of constants, enums, structures, delegates, and functions from fci.h.
|
||||
Refer to comments in fci.h for documentation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.ERROR">
|
||||
<summary>
|
||||
Error codes that can be returned by FCI.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.TCOMP">
|
||||
<summary>
|
||||
FCI compression algorithm types and parameters.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.STATUS">
|
||||
<summary>
|
||||
Reason for FCI status callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.CCAB">
|
||||
<summary>
|
||||
Cabinet information structure used for FCI initialization and GetNextCabinet callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle">
|
||||
<summary>
|
||||
Ensures that the FCI handle is safely released.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.#ctor">
|
||||
<summary>
|
||||
Creates a new unintialized handle. The handle will be initialized
|
||||
when it is marshalled back from native code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.IsInvalid">
|
||||
<summary>
|
||||
Checks if the handle is invalid. An FCI handle is invalid when it is zero.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FCI.Handle.ReleaseHandle">
|
||||
<summary>
|
||||
Releases the handle by calling FDIDestroy().
|
||||
</summary>
|
||||
<returns>True if the release succeeded.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI">
|
||||
<summary>
|
||||
A direct import of constants, enums, structures, delegates, and functions from fdi.h.
|
||||
Refer to comments in fdi.h for documentation.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.ERROR">
|
||||
<summary>
|
||||
Error codes that can be returned by FDI.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.NOTIFICATIONTYPE">
|
||||
<summary>
|
||||
Type of notification message for the FDI Notify callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.CABINFO">
|
||||
<summary>
|
||||
Cabinet information structure filled in by FDI IsCabinet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.NOTIFICATION">
|
||||
<summary>
|
||||
Cabinet notification details passed to the FDI Notify callback.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle">
|
||||
<summary>
|
||||
Ensures that the FDI handle is safely released.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.#ctor">
|
||||
<summary>
|
||||
Creates a new unintialized handle. The handle will be initialized
|
||||
when it is marshalled back from native code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.IsInvalid">
|
||||
<summary>
|
||||
Checks if the handle is invalid. An FDI handle is invalid when it is zero.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.FDI.Handle.ReleaseHandle">
|
||||
<summary>
|
||||
Releases the handle by calling FDIDestroy().
|
||||
</summary>
|
||||
<returns>True if the release succeeded.</returns>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF">
|
||||
<summary>
|
||||
Error info structure for FCI and FDI.
|
||||
</summary>
|
||||
<remarks>Before being passed to FCI or FDI, this structure is
|
||||
pinned in memory via a GCHandle. The pinning is necessary
|
||||
to be able to read the results, since the ERF structure doesn't
|
||||
get marshalled back out after an error.</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Oper">
|
||||
<summary>
|
||||
Gets or sets the cabinet error code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Type">
|
||||
<summary>
|
||||
Gets or sets the Win32 error code.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Error">
|
||||
<summary>
|
||||
GCHandle doesn't like the bool type, so use an int underneath.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.Compression.Cab.NativeMethods.ERF.Clear">
|
||||
<summary>
|
||||
Clears the error information.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Tools.WindowsInstallerXml.WixDistribution">
|
||||
<summary>
|
||||
Distribution specific strings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.NewsUrl">
|
||||
<summary>
|
||||
News URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.ShortProduct">
|
||||
<summary>
|
||||
Short product name for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.SupportUrl">
|
||||
<summary>
|
||||
Support URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.TelemetryUrlFormat">
|
||||
<summary>
|
||||
Telemetry URL format for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.VSExtensionsLandingUrl">
|
||||
<summary>
|
||||
VS Extensions Landing page Url for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,464 +1,464 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Deployment.WindowsInstaller.Linq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute">
|
||||
<summary>
|
||||
Apply to a subclass of QRecord to indicate the name of
|
||||
the table the record type is to be used with.
|
||||
</summary>
|
||||
<remarks>
|
||||
If this attribute is not used on a record type, the default
|
||||
table name will be derived from the record type name. (An
|
||||
optional underscore suffix is stripped.)
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new DatabaseTableAttribute for the specified table.
|
||||
</summary>
|
||||
<param name="table">name of the table associated with the record type</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute.Table">
|
||||
<summary>
|
||||
Gets or sets the table associated with the record type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute">
|
||||
<summary>
|
||||
Apply to a property on a subclass of QRecord to indicate
|
||||
the name of the column the property is to be associated with.
|
||||
</summary>
|
||||
<remarks>
|
||||
If this attribute is not used on a property, the default
|
||||
column name will be the same as the property name.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new DatabaseColumnAttribute which maps a
|
||||
record property to a column.
|
||||
</summary>
|
||||
<param name="column">name of the column associated with the property</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute.Column">
|
||||
<summary>
|
||||
Gets or sets the column associated with the record property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.Queryable">
|
||||
<summary>
|
||||
Allows any Database instance to be converted into a queryable database.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.Queryable.AsQueryable(Microsoft.Deployment.WindowsInstaller.Database)">
|
||||
<summary>
|
||||
Converts any Database instance into a queryable database.
|
||||
</summary>
|
||||
<param name="db"></param>
|
||||
<returns>Queryable database instance that operates on the same
|
||||
MSI handle.</returns>
|
||||
<remarks>
|
||||
This extension method is meant for convenient on-the-fly conversion.
|
||||
If the existing database instance already happens to be a QDatabase,
|
||||
then it is returned unchanged. Otherwise since the new database
|
||||
carries the same MSI handle, only one of the instances needs to be
|
||||
closed, not both.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase">
|
||||
<summary>
|
||||
Queryable MSI database - extends the base Database class with
|
||||
LINQ query functionality along with predefined entity types
|
||||
for common tables.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String)">
|
||||
<summary>
|
||||
Opens an existing database in read-only mode.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database file.</param>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
Because this constructor initiates database access, it cannot be used with a
|
||||
running installation.
|
||||
<para>The Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String,System.String)">
|
||||
<summary>
|
||||
Opens an existing database with another database as output.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database to be read.</param>
|
||||
<param name="outputPath">Open mode for the database</param>
|
||||
<returns>Database object representing the created or opened database</returns>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
When a database is opened as the output of another database, the summary information stream
|
||||
of the output database is actually a read-only mirror of the original database and thus cannot
|
||||
be changed. Additionally, it is not persisted with the database. To create or modify the
|
||||
summary information for the output database it must be closed and re-opened.
|
||||
<para>The returned Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String,Microsoft.Deployment.WindowsInstaller.DatabaseOpenMode)">
|
||||
<summary>
|
||||
Opens an existing database or creates a new one.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database file. If an empty string
|
||||
is supplied, a temporary database is created that is not persisted.</param>
|
||||
<param name="mode">Open mode for the database</param>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
To make and save changes to a database first open the database in transaction,
|
||||
create or, or direct mode. After making the changes, always call the Commit method
|
||||
before closing the database handle. The Commit method flushes all buffers.
|
||||
<para>Always call the Commit method on a database that has been opened in direct
|
||||
mode before closing the database. Failure to do this may corrupt the database.</para>
|
||||
<para>Because this constructor initiates database access, it cannot be used with a
|
||||
running installation.</para>
|
||||
<para>The Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.IntPtr,System.Boolean,System.String,Microsoft.Deployment.WindowsInstaller.DatabaseOpenMode)">
|
||||
<summary>
|
||||
Creates a new database from an MSI handle.
|
||||
</summary>
|
||||
<param name="handle">Native MSI database handle.</param>
|
||||
<param name="ownsHandle">True if the handle should be closed
|
||||
when the database object is disposed</param>
|
||||
<param name="filePath">Path of the database file, if known</param>
|
||||
<param name="openMode">Mode the handle was originally opened in</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Log">
|
||||
<summary>
|
||||
Gets or sets a log where all MSI SQL queries are written.
|
||||
</summary>
|
||||
<remarks>
|
||||
The log can be useful for debugging, or simply to watch the LINQ magic in action.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Item(System.String)">
|
||||
<summary>
|
||||
Gets a queryable table from the datbaase.
|
||||
</summary>
|
||||
<param name="table">name of the table</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Components">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.CreateFolders">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.CustomActions">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Directories">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.DuplicateFiles">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Features">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.FeatureComponents">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Files">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.FileHashes">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.InstallExecuteSequences">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.InstallUISequences">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.LaunchConditions">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Medias">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Properties">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Registries">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.RemoveFiles">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QRecord">
|
||||
<summary>
|
||||
Generic record entity for queryable databases,
|
||||
and base for strongly-typed entity subclasses.
|
||||
</summary>
|
||||
<remarks>
|
||||
Several predefined specialized subclasses are provided for common
|
||||
standard tables. Subclasses for additional standard tables
|
||||
or custom tables are not necessary, but they are easy to create
|
||||
and make the coding experience much nicer.
|
||||
<para>When creating subclasses, the following attributes may be
|
||||
useful: <see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute"/>,
|
||||
<see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute"/></para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.#ctor">
|
||||
<summary>
|
||||
Do not call. Use QTable.NewRecord() instead.
|
||||
</summary>
|
||||
<remarks>
|
||||
Subclasses must also provide a public parameterless constructor.
|
||||
<para>QRecord constructors are only public due to implementation
|
||||
reasons (to satisfy the new() constraint on the QTable generic
|
||||
class). They are not intended to be called by user code other than
|
||||
a subclass constructor. If the constructor is invoked directly,
|
||||
the record instance will not be properly initialized (associated
|
||||
with a database table) and calls to methods on the instance
|
||||
will throw a NullReferenceException.</para>
|
||||
</remarks>
|
||||
<seealso cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.FieldCount">
|
||||
<summary>
|
||||
Gets the number of fields in the record.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Item(System.String)">
|
||||
<summary>
|
||||
Gets or sets a record field.
|
||||
</summary>
|
||||
<param name="field">column name of the field</param>
|
||||
<remarks>
|
||||
Setting a field value will automatically update the database.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets or sets a record field.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
<remarks>
|
||||
Setting a field value will automatically update the database.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.I(System.Int32)">
|
||||
<summary>
|
||||
Used by subclasses to get a field as an integer.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.NI(System.Int32)">
|
||||
<summary>
|
||||
Used by subclasses to get a field as a nullable integer.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ToString">
|
||||
<summary>
|
||||
Dumps all record fields to a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Update(System.Collections.Generic.IList{System.String},System.Collections.Generic.IList{System.String})">
|
||||
<summary>
|
||||
Update multiple fields in the record (and the database).
|
||||
</summary>
|
||||
<param name="fields">column names of fields to update</param>
|
||||
<param name="values">new values for each field being updated</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Update(System.Collections.Generic.IList{System.Int32},System.Collections.Generic.IList{System.String})">
|
||||
<summary>
|
||||
Update multiple fields in the record (and the database).
|
||||
</summary>
|
||||
<param name="indexes">column indexes of fields to update</param>
|
||||
<param name="values">new values for each field being updated</param>
|
||||
<remarks>
|
||||
The record (primary keys) must already exist in the table.
|
||||
<para>Updating primary key fields is not yet implemented; use Delete()
|
||||
and Insert() instead.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Insert">
|
||||
<summary>
|
||||
Inserts the record in the database.
|
||||
</summary>
|
||||
<remarks>
|
||||
The record (primary keys) may not already exist in the table.
|
||||
<para>Use <see cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/> to get a new
|
||||
record. Prmary keys and all required fields
|
||||
must be filled in before insertion.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Insert(System.Boolean)">
|
||||
<summary>
|
||||
Inserts the record into the table.
|
||||
</summary>
|
||||
<param name="temporary">true if the record is temporarily
|
||||
inserted, to be visible only as long as the database is open</param>
|
||||
<remarks>
|
||||
The record (primary keys) may not already exist in the table.
|
||||
<para>Use <see cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/> to get a new
|
||||
record. Prmary keys and all required fields
|
||||
must be filled in before insertion.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Delete">
|
||||
<summary>
|
||||
Deletes the record from the table if it exists.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Refresh">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Assign">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Merge">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Validate">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateNew">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateFields">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateDelete">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1">
|
||||
<summary>
|
||||
Represents one table in a LINQ-queryable Database.
|
||||
</summary>
|
||||
<typeparam name="TRecord">type that represents one record in the table</typeparam>
|
||||
<remarks>
|
||||
This class is the primary gateway to all LINQ to MSI query functionality.
|
||||
<para>The TRecord generic parameter may be the general <see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.QRecord" />
|
||||
class, or a specialized subclass of QRecord.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.InferTableName">
|
||||
<summary>
|
||||
Infers the name of the table this instance will be
|
||||
associated with.
|
||||
</summary>
|
||||
<returns>table name</returns>
|
||||
<remarks>
|
||||
The table name is retrieved from a DatabaseTableAttribute
|
||||
on the record type if it exists; otherwise the name is
|
||||
derived from the name of the record type itself.
|
||||
(An optional underscore suffix on the record type name is dropped.)
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.#ctor(Microsoft.Deployment.WindowsInstaller.Linq.QDatabase)">
|
||||
<summary>
|
||||
Creates a new QTable, inferring the table name
|
||||
from the name of the record type parameter.
|
||||
</summary>
|
||||
<param name="db">database that contains the table</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.#ctor(Microsoft.Deployment.WindowsInstaller.Linq.QDatabase,System.String)">
|
||||
<summary>
|
||||
Creates a new QTable with an explicit table name.
|
||||
</summary>
|
||||
<param name="db">database that contains the table</param>
|
||||
<param name="table">name of the table</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.TableInfo">
|
||||
<summary>
|
||||
Gets schema information about the table.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.Database">
|
||||
<summary>
|
||||
Gets the database this table is associated with.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.GetEnumerator">
|
||||
<summary>
|
||||
Enumerates over all records in the table.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord">
|
||||
<summary>
|
||||
Creates a new record that can be inserted into this table.
|
||||
</summary>
|
||||
<returns>a record with all fields initialized to null</returns>
|
||||
<remarks>
|
||||
Primary keys and required fields must be filled in with
|
||||
non-null values before the record can be inserted.
|
||||
<para>The record is tied to this table in this database;
|
||||
it cannot be inserted into another table or database.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.Query`1">
|
||||
<summary>
|
||||
Implements the LINQ to MSI query functionality.
|
||||
</summary>
|
||||
<typeparam name="T">the result type of the current query --
|
||||
either some kind of QRecord, or some projection of record data</typeparam>
|
||||
</member>
|
||||
<member name="T:Microsoft.Tools.WindowsInstallerXml.WixDistribution">
|
||||
<summary>
|
||||
Distribution specific strings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.NewsUrl">
|
||||
<summary>
|
||||
News URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.ShortProduct">
|
||||
<summary>
|
||||
Short product name for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.SupportUrl">
|
||||
<summary>
|
||||
Support URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.TelemetryUrlFormat">
|
||||
<summary>
|
||||
Telemetry URL format for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.VSExtensionsLandingUrl">
|
||||
<summary>
|
||||
VS Extensions Landing page Url for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Deployment.WindowsInstaller.Linq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute">
|
||||
<summary>
|
||||
Apply to a subclass of QRecord to indicate the name of
|
||||
the table the record type is to be used with.
|
||||
</summary>
|
||||
<remarks>
|
||||
If this attribute is not used on a record type, the default
|
||||
table name will be derived from the record type name. (An
|
||||
optional underscore suffix is stripped.)
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new DatabaseTableAttribute for the specified table.
|
||||
</summary>
|
||||
<param name="table">name of the table associated with the record type</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute.Table">
|
||||
<summary>
|
||||
Gets or sets the table associated with the record type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute">
|
||||
<summary>
|
||||
Apply to a property on a subclass of QRecord to indicate
|
||||
the name of the column the property is to be associated with.
|
||||
</summary>
|
||||
<remarks>
|
||||
If this attribute is not used on a property, the default
|
||||
column name will be the same as the property name.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new DatabaseColumnAttribute which maps a
|
||||
record property to a column.
|
||||
</summary>
|
||||
<param name="column">name of the column associated with the property</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute.Column">
|
||||
<summary>
|
||||
Gets or sets the column associated with the record property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.Queryable">
|
||||
<summary>
|
||||
Allows any Database instance to be converted into a queryable database.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.Queryable.AsQueryable(Microsoft.Deployment.WindowsInstaller.Database)">
|
||||
<summary>
|
||||
Converts any Database instance into a queryable database.
|
||||
</summary>
|
||||
<param name="db"></param>
|
||||
<returns>Queryable database instance that operates on the same
|
||||
MSI handle.</returns>
|
||||
<remarks>
|
||||
This extension method is meant for convenient on-the-fly conversion.
|
||||
If the existing database instance already happens to be a QDatabase,
|
||||
then it is returned unchanged. Otherwise since the new database
|
||||
carries the same MSI handle, only one of the instances needs to be
|
||||
closed, not both.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase">
|
||||
<summary>
|
||||
Queryable MSI database - extends the base Database class with
|
||||
LINQ query functionality along with predefined entity types
|
||||
for common tables.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String)">
|
||||
<summary>
|
||||
Opens an existing database in read-only mode.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database file.</param>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
Because this constructor initiates database access, it cannot be used with a
|
||||
running installation.
|
||||
<para>The Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String,System.String)">
|
||||
<summary>
|
||||
Opens an existing database with another database as output.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database to be read.</param>
|
||||
<param name="outputPath">Open mode for the database</param>
|
||||
<returns>Database object representing the created or opened database</returns>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
When a database is opened as the output of another database, the summary information stream
|
||||
of the output database is actually a read-only mirror of the original database and thus cannot
|
||||
be changed. Additionally, it is not persisted with the database. To create or modify the
|
||||
summary information for the output database it must be closed and re-opened.
|
||||
<para>The returned Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.String,Microsoft.Deployment.WindowsInstaller.DatabaseOpenMode)">
|
||||
<summary>
|
||||
Opens an existing database or creates a new one.
|
||||
</summary>
|
||||
<param name="filePath">Path to the database file. If an empty string
|
||||
is supplied, a temporary database is created that is not persisted.</param>
|
||||
<param name="mode">Open mode for the database</param>
|
||||
<exception cref="T:Microsoft.Deployment.WindowsInstaller.InstallerException">the database could not be created/opened</exception>
|
||||
<remarks>
|
||||
To make and save changes to a database first open the database in transaction,
|
||||
create or, or direct mode. After making the changes, always call the Commit method
|
||||
before closing the database handle. The Commit method flushes all buffers.
|
||||
<para>Always call the Commit method on a database that has been opened in direct
|
||||
mode before closing the database. Failure to do this may corrupt the database.</para>
|
||||
<para>Because this constructor initiates database access, it cannot be used with a
|
||||
running installation.</para>
|
||||
<para>The Database object should be <see cref="M:Microsoft.Deployment.WindowsInstaller.InstallerHandle.Close"/>d after use.
|
||||
The finalizer will close the handle if it is still open, however due to the nondeterministic
|
||||
nature of finalization it is best that the handle be closed manually as soon as it is no
|
||||
longer needed, as leaving lots of unused handles open can degrade performance.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.#ctor(System.IntPtr,System.Boolean,System.String,Microsoft.Deployment.WindowsInstaller.DatabaseOpenMode)">
|
||||
<summary>
|
||||
Creates a new database from an MSI handle.
|
||||
</summary>
|
||||
<param name="handle">Native MSI database handle.</param>
|
||||
<param name="ownsHandle">True if the handle should be closed
|
||||
when the database object is disposed</param>
|
||||
<param name="filePath">Path of the database file, if known</param>
|
||||
<param name="openMode">Mode the handle was originally opened in</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Log">
|
||||
<summary>
|
||||
Gets or sets a log where all MSI SQL queries are written.
|
||||
</summary>
|
||||
<remarks>
|
||||
The log can be useful for debugging, or simply to watch the LINQ magic in action.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Item(System.String)">
|
||||
<summary>
|
||||
Gets a queryable table from the datbaase.
|
||||
</summary>
|
||||
<param name="table">name of the table</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Components">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.CreateFolders">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.CustomActions">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Directories">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.DuplicateFiles">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Features">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.FeatureComponents">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Files">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.FileHashes">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.InstallExecuteSequences">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.InstallUISequences">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.LaunchConditions">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Medias">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Properties">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.Registries">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QDatabase.RemoveFiles">
|
||||
<summary>Queryable standard table with predefined specialized record type.</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QRecord">
|
||||
<summary>
|
||||
Generic record entity for queryable databases,
|
||||
and base for strongly-typed entity subclasses.
|
||||
</summary>
|
||||
<remarks>
|
||||
Several predefined specialized subclasses are provided for common
|
||||
standard tables. Subclasses for additional standard tables
|
||||
or custom tables are not necessary, but they are easy to create
|
||||
and make the coding experience much nicer.
|
||||
<para>When creating subclasses, the following attributes may be
|
||||
useful: <see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseTableAttribute"/>,
|
||||
<see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.DatabaseColumnAttribute"/></para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.#ctor">
|
||||
<summary>
|
||||
Do not call. Use QTable.NewRecord() instead.
|
||||
</summary>
|
||||
<remarks>
|
||||
Subclasses must also provide a public parameterless constructor.
|
||||
<para>QRecord constructors are only public due to implementation
|
||||
reasons (to satisfy the new() constraint on the QTable generic
|
||||
class). They are not intended to be called by user code other than
|
||||
a subclass constructor. If the constructor is invoked directly,
|
||||
the record instance will not be properly initialized (associated
|
||||
with a database table) and calls to methods on the instance
|
||||
will throw a NullReferenceException.</para>
|
||||
</remarks>
|
||||
<seealso cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.FieldCount">
|
||||
<summary>
|
||||
Gets the number of fields in the record.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Item(System.String)">
|
||||
<summary>
|
||||
Gets or sets a record field.
|
||||
</summary>
|
||||
<param name="field">column name of the field</param>
|
||||
<remarks>
|
||||
Setting a field value will automatically update the database.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets or sets a record field.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
<remarks>
|
||||
Setting a field value will automatically update the database.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.I(System.Int32)">
|
||||
<summary>
|
||||
Used by subclasses to get a field as an integer.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.NI(System.Int32)">
|
||||
<summary>
|
||||
Used by subclasses to get a field as a nullable integer.
|
||||
</summary>
|
||||
<param name="index">zero-based column index of the field</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ToString">
|
||||
<summary>
|
||||
Dumps all record fields to a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Update(System.Collections.Generic.IList{System.String},System.Collections.Generic.IList{System.String})">
|
||||
<summary>
|
||||
Update multiple fields in the record (and the database).
|
||||
</summary>
|
||||
<param name="fields">column names of fields to update</param>
|
||||
<param name="values">new values for each field being updated</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Update(System.Collections.Generic.IList{System.Int32},System.Collections.Generic.IList{System.String})">
|
||||
<summary>
|
||||
Update multiple fields in the record (and the database).
|
||||
</summary>
|
||||
<param name="indexes">column indexes of fields to update</param>
|
||||
<param name="values">new values for each field being updated</param>
|
||||
<remarks>
|
||||
The record (primary keys) must already exist in the table.
|
||||
<para>Updating primary key fields is not yet implemented; use Delete()
|
||||
and Insert() instead.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Insert">
|
||||
<summary>
|
||||
Inserts the record in the database.
|
||||
</summary>
|
||||
<remarks>
|
||||
The record (primary keys) may not already exist in the table.
|
||||
<para>Use <see cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/> to get a new
|
||||
record. Prmary keys and all required fields
|
||||
must be filled in before insertion.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Insert(System.Boolean)">
|
||||
<summary>
|
||||
Inserts the record into the table.
|
||||
</summary>
|
||||
<param name="temporary">true if the record is temporarily
|
||||
inserted, to be visible only as long as the database is open</param>
|
||||
<remarks>
|
||||
The record (primary keys) may not already exist in the table.
|
||||
<para>Use <see cref="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord"/> to get a new
|
||||
record. Prmary keys and all required fields
|
||||
must be filled in before insertion.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Delete">
|
||||
<summary>
|
||||
Deletes the record from the table if it exists.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Refresh">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Assign">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Merge">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.Validate">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateNew">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateFields">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QRecord.ValidateDelete">
|
||||
<summary>
|
||||
Not yet implemented.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1">
|
||||
<summary>
|
||||
Represents one table in a LINQ-queryable Database.
|
||||
</summary>
|
||||
<typeparam name="TRecord">type that represents one record in the table</typeparam>
|
||||
<remarks>
|
||||
This class is the primary gateway to all LINQ to MSI query functionality.
|
||||
<para>The TRecord generic parameter may be the general <see cref="T:Microsoft.Deployment.WindowsInstaller.Linq.QRecord" />
|
||||
class, or a specialized subclass of QRecord.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.InferTableName">
|
||||
<summary>
|
||||
Infers the name of the table this instance will be
|
||||
associated with.
|
||||
</summary>
|
||||
<returns>table name</returns>
|
||||
<remarks>
|
||||
The table name is retrieved from a DatabaseTableAttribute
|
||||
on the record type if it exists; otherwise the name is
|
||||
derived from the name of the record type itself.
|
||||
(An optional underscore suffix on the record type name is dropped.)
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.#ctor(Microsoft.Deployment.WindowsInstaller.Linq.QDatabase)">
|
||||
<summary>
|
||||
Creates a new QTable, inferring the table name
|
||||
from the name of the record type parameter.
|
||||
</summary>
|
||||
<param name="db">database that contains the table</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.#ctor(Microsoft.Deployment.WindowsInstaller.Linq.QDatabase,System.String)">
|
||||
<summary>
|
||||
Creates a new QTable with an explicit table name.
|
||||
</summary>
|
||||
<param name="db">database that contains the table</param>
|
||||
<param name="table">name of the table</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.TableInfo">
|
||||
<summary>
|
||||
Gets schema information about the table.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.Database">
|
||||
<summary>
|
||||
Gets the database this table is associated with.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.GetEnumerator">
|
||||
<summary>
|
||||
Enumerates over all records in the table.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Microsoft.Deployment.WindowsInstaller.Linq.QTable`1.NewRecord">
|
||||
<summary>
|
||||
Creates a new record that can be inserted into this table.
|
||||
</summary>
|
||||
<returns>a record with all fields initialized to null</returns>
|
||||
<remarks>
|
||||
Primary keys and required fields must be filled in with
|
||||
non-null values before the record can be inserted.
|
||||
<para>The record is tied to this table in this database;
|
||||
it cannot be inserted into another table or database.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Microsoft.Deployment.WindowsInstaller.Linq.Query`1">
|
||||
<summary>
|
||||
Implements the LINQ to MSI query functionality.
|
||||
</summary>
|
||||
<typeparam name="T">the result type of the current query --
|
||||
either some kind of QRecord, or some projection of record data</typeparam>
|
||||
</member>
|
||||
<member name="T:Microsoft.Tools.WindowsInstallerXml.WixDistribution">
|
||||
<summary>
|
||||
Distribution specific strings.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.NewsUrl">
|
||||
<summary>
|
||||
News URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.ShortProduct">
|
||||
<summary>
|
||||
Short product name for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.SupportUrl">
|
||||
<summary>
|
||||
Support URL for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.TelemetryUrlFormat">
|
||||
<summary>
|
||||
Telemetry URL format for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Microsoft.Tools.WindowsInstallerXml.WixDistribution.VSExtensionsLandingUrl">
|
||||
<summary>
|
||||
VS Extensions Landing page Url for the distribution.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,29 +1,29 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "IBootstrapperEngine.h"
|
||||
|
||||
interface IBootstrapperBAFunction
|
||||
{
|
||||
STDMETHOD(OnDetect)() = 0;
|
||||
STDMETHOD(OnDetectComplete)() = 0;
|
||||
STDMETHOD(OnPlan)() = 0;
|
||||
STDMETHOD(OnPlanComplete)() = 0;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef HRESULT (WINAPI *PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE)(
|
||||
__in IBootstrapperEngine* pEngine,
|
||||
__in HMODULE hModule,
|
||||
__out IBootstrapperBAFunction** ppBAFunction
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "IBootstrapperEngine.h"
|
||||
|
||||
interface IBootstrapperBAFunction
|
||||
{
|
||||
STDMETHOD(OnDetect)() = 0;
|
||||
STDMETHOD(OnDetectComplete)() = 0;
|
||||
STDMETHOD(OnPlan)() = 0;
|
||||
STDMETHOD(OnPlanComplete)() = 0;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef HRESULT (WINAPI *PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE)(
|
||||
__in IBootstrapperEngine* pEngine,
|
||||
__in HMODULE hModule,
|
||||
__out IBootstrapperBAFunction** ppBAFunction
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,227 +1,227 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define IDERROR -1
|
||||
#define IDNOACTION 0
|
||||
|
||||
#ifndef FACILITY_WIX
|
||||
#define FACILITY_WIX 500
|
||||
#endif
|
||||
|
||||
static const HRESULT E_SUSPECTED_AV_INTERFERENCE = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 2000);
|
||||
|
||||
#define IDDOWNLOAD 101 // Only valid as a return code from OnResolveSource() to instruct the engine to use the download source.
|
||||
#define IDRESTART 102
|
||||
#define IDSUSPEND 103
|
||||
#define IDRELOAD_BOOTSTRAPPER 104
|
||||
|
||||
// Note that ordering of the enumeration values is important.
|
||||
// Some code paths use < or > comparisions and simply reording values will break those comparisons.
|
||||
enum BOOTSTRAPPER_ACTION
|
||||
{
|
||||
BOOTSTRAPPER_ACTION_UNKNOWN,
|
||||
BOOTSTRAPPER_ACTION_HELP,
|
||||
BOOTSTRAPPER_ACTION_LAYOUT,
|
||||
BOOTSTRAPPER_ACTION_UNINSTALL,
|
||||
BOOTSTRAPPER_ACTION_CACHE,
|
||||
BOOTSTRAPPER_ACTION_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_MODIFY,
|
||||
BOOTSTRAPPER_ACTION_REPAIR,
|
||||
BOOTSTRAPPER_ACTION_UPDATE_REPLACE,
|
||||
BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_ACTION_STATE
|
||||
{
|
||||
BOOTSTRAPPER_ACTION_STATE_NONE,
|
||||
BOOTSTRAPPER_ACTION_STATE_UNINSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_MODIFY,
|
||||
BOOTSTRAPPER_ACTION_STATE_REPAIR,
|
||||
BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE,
|
||||
BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE,
|
||||
BOOTSTRAPPER_ACTION_STATE_PATCH,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_PACKAGE_STATE
|
||||
{
|
||||
BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_ABSENT,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_CACHED,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_PRESENT,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_REQUEST_STATE
|
||||
{
|
||||
BOOTSTRAPPER_REQUEST_STATE_NONE,
|
||||
BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_ABSENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_CACHE,
|
||||
BOOTSTRAPPER_REQUEST_STATE_PRESENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_REPAIR,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_FEATURE_STATE
|
||||
{
|
||||
BOOTSTRAPPER_FEATURE_STATE_UNKNOWN,
|
||||
BOOTSTRAPPER_FEATURE_STATE_ABSENT,
|
||||
BOOTSTRAPPER_FEATURE_STATE_ADVERTISED,
|
||||
BOOTSTRAPPER_FEATURE_STATE_LOCAL,
|
||||
BOOTSTRAPPER_FEATURE_STATE_SOURCE,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_FEATURE_ACTION
|
||||
{
|
||||
BOOTSTRAPPER_FEATURE_ACTION_NONE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_REINSTALL,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_REMOVE,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_LOG_LEVEL
|
||||
{
|
||||
BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel())
|
||||
BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on
|
||||
BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on
|
||||
BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code
|
||||
BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_UPDATE_HASH_TYPE
|
||||
{
|
||||
BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE,
|
||||
BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA1,
|
||||
};
|
||||
|
||||
|
||||
DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB")
|
||||
{
|
||||
STDMETHOD(GetPackageCount)(
|
||||
__out DWORD* pcPackages
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableNumeric)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out LONGLONG* pllValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableString)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR wzValue,
|
||||
__inout DWORD* pcchValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableVersion)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out DWORD64* pqwValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(FormatString)(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__out_ecount_opt(*pcchOut) LPWSTR wzOut,
|
||||
__inout DWORD* pcchOut
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(EscapeString)(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__out_ecount_opt(*pcchOut) LPWSTR wzOut,
|
||||
__inout DWORD* pcchOut
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(EvaluateCondition)(
|
||||
__in_z LPCWSTR wzCondition,
|
||||
__out BOOL* pf
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Log)(
|
||||
__in BOOTSTRAPPER_LOG_LEVEL level,
|
||||
__in_z LPCWSTR wzMessage
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SendEmbeddedError)(
|
||||
__in DWORD dwErrorCode,
|
||||
__in_z_opt LPCWSTR wzMessage,
|
||||
__in DWORD dwUIHint,
|
||||
__out int* pnResult
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SendEmbeddedProgress)(
|
||||
__in DWORD dwProgressPercentage,
|
||||
__in DWORD dwOverallProgressPercentage,
|
||||
__out int* pnResult
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetUpdate)(
|
||||
__in_z_opt LPCWSTR wzLocalSource,
|
||||
__in_z_opt LPCWSTR wzDownloadSource,
|
||||
__in DWORD64 qwSize,
|
||||
__in BOOTSTRAPPER_UPDATE_HASH_TYPE hashType,
|
||||
__in_bcount_opt(cbHash) BYTE* rgbHash,
|
||||
__in DWORD cbHash
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetLocalSource)(
|
||||
__in_z LPCWSTR wzPackageOrContainerId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in_z LPCWSTR wzPath
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetDownloadSource)(
|
||||
__in_z LPCWSTR wzPackageOrContainerId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in_z LPCWSTR wzUrl,
|
||||
__in_z_opt LPCWSTR wzUser,
|
||||
__in_z_opt LPCWSTR wzPassword
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableNumeric)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in LONGLONG llValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableString)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableVersion)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in DWORD64 qwValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(CloseSplashScreen)() = 0;
|
||||
|
||||
STDMETHOD(Detect)(
|
||||
__in_opt HWND hwndParent = NULL
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Plan)(
|
||||
__in BOOTSTRAPPER_ACTION action
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Elevate)(
|
||||
__in_opt HWND hwndParent
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Apply)(
|
||||
__in_opt HWND hwndParent
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Quit)(
|
||||
__in DWORD dwExitCode
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(LaunchApprovedExe)(
|
||||
__in_opt HWND hwndParent,
|
||||
__in_z LPCWSTR wzApprovedExeForElevationId,
|
||||
__in_z_opt LPCWSTR wzArguments,
|
||||
__in DWORD dwWaitForInputIdleTimeout
|
||||
) = 0;
|
||||
};
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define IDERROR -1
|
||||
#define IDNOACTION 0
|
||||
|
||||
#ifndef FACILITY_WIX
|
||||
#define FACILITY_WIX 500
|
||||
#endif
|
||||
|
||||
static const HRESULT E_SUSPECTED_AV_INTERFERENCE = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 2000);
|
||||
|
||||
#define IDDOWNLOAD 101 // Only valid as a return code from OnResolveSource() to instruct the engine to use the download source.
|
||||
#define IDRESTART 102
|
||||
#define IDSUSPEND 103
|
||||
#define IDRELOAD_BOOTSTRAPPER 104
|
||||
|
||||
// Note that ordering of the enumeration values is important.
|
||||
// Some code paths use < or > comparisions and simply reording values will break those comparisons.
|
||||
enum BOOTSTRAPPER_ACTION
|
||||
{
|
||||
BOOTSTRAPPER_ACTION_UNKNOWN,
|
||||
BOOTSTRAPPER_ACTION_HELP,
|
||||
BOOTSTRAPPER_ACTION_LAYOUT,
|
||||
BOOTSTRAPPER_ACTION_UNINSTALL,
|
||||
BOOTSTRAPPER_ACTION_CACHE,
|
||||
BOOTSTRAPPER_ACTION_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_MODIFY,
|
||||
BOOTSTRAPPER_ACTION_REPAIR,
|
||||
BOOTSTRAPPER_ACTION_UPDATE_REPLACE,
|
||||
BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_ACTION_STATE
|
||||
{
|
||||
BOOTSTRAPPER_ACTION_STATE_NONE,
|
||||
BOOTSTRAPPER_ACTION_STATE_UNINSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL,
|
||||
BOOTSTRAPPER_ACTION_STATE_MODIFY,
|
||||
BOOTSTRAPPER_ACTION_STATE_REPAIR,
|
||||
BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE,
|
||||
BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE,
|
||||
BOOTSTRAPPER_ACTION_STATE_PATCH,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_PACKAGE_STATE
|
||||
{
|
||||
BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_ABSENT,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_CACHED,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_PRESENT,
|
||||
BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_REQUEST_STATE
|
||||
{
|
||||
BOOTSTRAPPER_REQUEST_STATE_NONE,
|
||||
BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_ABSENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_CACHE,
|
||||
BOOTSTRAPPER_REQUEST_STATE_PRESENT,
|
||||
BOOTSTRAPPER_REQUEST_STATE_REPAIR,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_FEATURE_STATE
|
||||
{
|
||||
BOOTSTRAPPER_FEATURE_STATE_UNKNOWN,
|
||||
BOOTSTRAPPER_FEATURE_STATE_ABSENT,
|
||||
BOOTSTRAPPER_FEATURE_STATE_ADVERTISED,
|
||||
BOOTSTRAPPER_FEATURE_STATE_LOCAL,
|
||||
BOOTSTRAPPER_FEATURE_STATE_SOURCE,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_FEATURE_ACTION
|
||||
{
|
||||
BOOTSTRAPPER_FEATURE_ACTION_NONE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_REINSTALL,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE,
|
||||
BOOTSTRAPPER_FEATURE_ACTION_REMOVE,
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_LOG_LEVEL
|
||||
{
|
||||
BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel())
|
||||
BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on
|
||||
BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on
|
||||
BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code
|
||||
BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified
|
||||
};
|
||||
|
||||
enum BOOTSTRAPPER_UPDATE_HASH_TYPE
|
||||
{
|
||||
BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE,
|
||||
BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA1,
|
||||
};
|
||||
|
||||
|
||||
DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB")
|
||||
{
|
||||
STDMETHOD(GetPackageCount)(
|
||||
__out DWORD* pcPackages
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableNumeric)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out LONGLONG* pllValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableString)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR wzValue,
|
||||
__inout DWORD* pcchValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(GetVariableVersion)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out DWORD64* pqwValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(FormatString)(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__out_ecount_opt(*pcchOut) LPWSTR wzOut,
|
||||
__inout DWORD* pcchOut
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(EscapeString)(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__out_ecount_opt(*pcchOut) LPWSTR wzOut,
|
||||
__inout DWORD* pcchOut
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(EvaluateCondition)(
|
||||
__in_z LPCWSTR wzCondition,
|
||||
__out BOOL* pf
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Log)(
|
||||
__in BOOTSTRAPPER_LOG_LEVEL level,
|
||||
__in_z LPCWSTR wzMessage
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SendEmbeddedError)(
|
||||
__in DWORD dwErrorCode,
|
||||
__in_z_opt LPCWSTR wzMessage,
|
||||
__in DWORD dwUIHint,
|
||||
__out int* pnResult
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SendEmbeddedProgress)(
|
||||
__in DWORD dwProgressPercentage,
|
||||
__in DWORD dwOverallProgressPercentage,
|
||||
__out int* pnResult
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetUpdate)(
|
||||
__in_z_opt LPCWSTR wzLocalSource,
|
||||
__in_z_opt LPCWSTR wzDownloadSource,
|
||||
__in DWORD64 qwSize,
|
||||
__in BOOTSTRAPPER_UPDATE_HASH_TYPE hashType,
|
||||
__in_bcount_opt(cbHash) BYTE* rgbHash,
|
||||
__in DWORD cbHash
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetLocalSource)(
|
||||
__in_z LPCWSTR wzPackageOrContainerId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in_z LPCWSTR wzPath
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetDownloadSource)(
|
||||
__in_z LPCWSTR wzPackageOrContainerId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in_z LPCWSTR wzUrl,
|
||||
__in_z_opt LPCWSTR wzUser,
|
||||
__in_z_opt LPCWSTR wzPassword
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableNumeric)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in LONGLONG llValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableString)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(SetVariableVersion)(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__in DWORD64 qwValue
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(CloseSplashScreen)() = 0;
|
||||
|
||||
STDMETHOD(Detect)(
|
||||
__in_opt HWND hwndParent = NULL
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Plan)(
|
||||
__in BOOTSTRAPPER_ACTION action
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Elevate)(
|
||||
__in_opt HWND hwndParent
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Apply)(
|
||||
__in_opt HWND hwndParent
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(Quit)(
|
||||
__in DWORD dwExitCode
|
||||
) = 0;
|
||||
|
||||
STDMETHOD(LaunchApprovedExe)(
|
||||
__in_opt HWND hwndParent,
|
||||
__in_z LPCWSTR wzApprovedExeForElevationId,
|
||||
__in_z_opt LPCWSTR wzArguments,
|
||||
__in DWORD dwWaitForInputIdleTimeout
|
||||
) = 0;
|
||||
};
|
||||
+153
-153
@@ -1,153 +1,153 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <aclapi.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#define ReleaseSid(x) if (x) { AclFreeSid(x); }
|
||||
#define ReleaseNullSid(x) if (x) { AclFreeSid(x); x = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
struct ACL_ACCESS
|
||||
{
|
||||
BOOL fDenyAccess;
|
||||
DWORD dwAccessMask;
|
||||
|
||||
// TODO: consider using a union
|
||||
LPCWSTR pwzAccountName; // NOTE: the last three items in this structure are ignored if this is not NULL
|
||||
|
||||
SID_IDENTIFIER_AUTHORITY sia; // used if pwzAccountName is NULL
|
||||
BYTE nSubAuthorityCount;
|
||||
DWORD nSubAuthority[8];
|
||||
};
|
||||
|
||||
struct ACL_ACE
|
||||
{
|
||||
DWORD dwFlags;
|
||||
DWORD dwMask;
|
||||
PSID psid;
|
||||
};
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI AclCheckAccess(
|
||||
__in HANDLE hToken,
|
||||
__in ACL_ACCESS* paa
|
||||
);
|
||||
HRESULT DAPI AclCheckAdministratorAccess(
|
||||
__in HANDLE hToken
|
||||
);
|
||||
HRESULT DAPI AclCheckLocalSystemAccess(
|
||||
__in HANDLE hToken
|
||||
);
|
||||
|
||||
HRESULT DAPI AclGetWellKnownSid(
|
||||
__in WELL_KNOWN_SID_TYPE wkst,
|
||||
__deref_out PSID* ppsid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSid(
|
||||
__in_opt LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out PSID* ppsid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSidString(
|
||||
__in_z LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out_z LPWSTR* ppwzSid
|
||||
);
|
||||
|
||||
HRESULT DAPI AclCreateDacl(
|
||||
__in_ecount(cDeny) ACL_ACE rgaaDeny[],
|
||||
__in DWORD cDeny,
|
||||
__in_ecount(cAllow) ACL_ACE rgaaAllow[],
|
||||
__in DWORD cAllow,
|
||||
__deref_out ACL** ppAcl
|
||||
);
|
||||
HRESULT DAPI AclAddToDacl(
|
||||
__in ACL* pAcl,
|
||||
__in_ecount_opt(cDeny) const ACL_ACE rgaaDeny[],
|
||||
__in DWORD cDeny,
|
||||
__in_ecount_opt(cAllow) const ACL_ACE rgaaAllow[],
|
||||
__in DWORD cAllow,
|
||||
__deref_out ACL** ppAclNew
|
||||
);
|
||||
HRESULT DAPI AclMergeDacls(
|
||||
__in const ACL* pAcl1,
|
||||
__in const ACL* pAcl2,
|
||||
__deref_out ACL** ppAclNew
|
||||
);
|
||||
HRESULT DAPI AclCreateDaclOld(
|
||||
__in_ecount(cAclAccesses) ACL_ACCESS* paa,
|
||||
__in DWORD cAclAccesses,
|
||||
__deref_out ACL** ppAcl
|
||||
);
|
||||
HRESULT DAPI AclCreateSecurityDescriptor(
|
||||
__in_ecount(cAclAccesses) ACL_ACCESS* paa,
|
||||
__in DWORD cAclAccesses,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclCreateSecurityDescriptorFromDacl(
|
||||
__in ACL* pACL,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT __cdecl AclCreateSecurityDescriptorFromString(
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd,
|
||||
__in_z __format_string LPCWSTR wzSddlFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI AclDuplicateSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* psd,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclGetSecurityDescriptor(
|
||||
__in_z LPCWSTR wzObject,
|
||||
__in SE_OBJECT_TYPE sot,
|
||||
__in SECURITY_INFORMATION securityInformation,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclSetSecurityWithRetry(
|
||||
__in_z LPCWSTR wzObject,
|
||||
__in SE_OBJECT_TYPE sot,
|
||||
__in SECURITY_INFORMATION securityInformation,
|
||||
__in_opt PSID psidOwner,
|
||||
__in_opt PSID psidGroup,
|
||||
__in_opt PACL pDacl,
|
||||
__in_opt PACL pSacl,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
|
||||
HRESULT DAPI AclFreeSid(
|
||||
__in PSID psid
|
||||
);
|
||||
HRESULT DAPI AclFreeDacl(
|
||||
__in ACL* pACL
|
||||
);
|
||||
HRESULT DAPI AclFreeSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* psd
|
||||
);
|
||||
|
||||
HRESULT DAPI AclAddAdminToSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* pSecurity,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppSecurityNew
|
||||
);
|
||||
|
||||
// Following code in acl2util.cpp due to dependency on crypt32.dll.
|
||||
HRESULT DAPI AclCalculateServiceSidString(
|
||||
__in LPCWSTR wzServiceName,
|
||||
__in int cchServiceName,
|
||||
__deref_out_z LPWSTR* psczSid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSidStringEx(
|
||||
__in_z LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out_z LPWSTR* psczSid
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <aclapi.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#define ReleaseSid(x) if (x) { AclFreeSid(x); }
|
||||
#define ReleaseNullSid(x) if (x) { AclFreeSid(x); x = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
struct ACL_ACCESS
|
||||
{
|
||||
BOOL fDenyAccess;
|
||||
DWORD dwAccessMask;
|
||||
|
||||
// TODO: consider using a union
|
||||
LPCWSTR pwzAccountName; // NOTE: the last three items in this structure are ignored if this is not NULL
|
||||
|
||||
SID_IDENTIFIER_AUTHORITY sia; // used if pwzAccountName is NULL
|
||||
BYTE nSubAuthorityCount;
|
||||
DWORD nSubAuthority[8];
|
||||
};
|
||||
|
||||
struct ACL_ACE
|
||||
{
|
||||
DWORD dwFlags;
|
||||
DWORD dwMask;
|
||||
PSID psid;
|
||||
};
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI AclCheckAccess(
|
||||
__in HANDLE hToken,
|
||||
__in ACL_ACCESS* paa
|
||||
);
|
||||
HRESULT DAPI AclCheckAdministratorAccess(
|
||||
__in HANDLE hToken
|
||||
);
|
||||
HRESULT DAPI AclCheckLocalSystemAccess(
|
||||
__in HANDLE hToken
|
||||
);
|
||||
|
||||
HRESULT DAPI AclGetWellKnownSid(
|
||||
__in WELL_KNOWN_SID_TYPE wkst,
|
||||
__deref_out PSID* ppsid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSid(
|
||||
__in_opt LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out PSID* ppsid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSidString(
|
||||
__in_z LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out_z LPWSTR* ppwzSid
|
||||
);
|
||||
|
||||
HRESULT DAPI AclCreateDacl(
|
||||
__in_ecount(cDeny) ACL_ACE rgaaDeny[],
|
||||
__in DWORD cDeny,
|
||||
__in_ecount(cAllow) ACL_ACE rgaaAllow[],
|
||||
__in DWORD cAllow,
|
||||
__deref_out ACL** ppAcl
|
||||
);
|
||||
HRESULT DAPI AclAddToDacl(
|
||||
__in ACL* pAcl,
|
||||
__in_ecount_opt(cDeny) const ACL_ACE rgaaDeny[],
|
||||
__in DWORD cDeny,
|
||||
__in_ecount_opt(cAllow) const ACL_ACE rgaaAllow[],
|
||||
__in DWORD cAllow,
|
||||
__deref_out ACL** ppAclNew
|
||||
);
|
||||
HRESULT DAPI AclMergeDacls(
|
||||
__in const ACL* pAcl1,
|
||||
__in const ACL* pAcl2,
|
||||
__deref_out ACL** ppAclNew
|
||||
);
|
||||
HRESULT DAPI AclCreateDaclOld(
|
||||
__in_ecount(cAclAccesses) ACL_ACCESS* paa,
|
||||
__in DWORD cAclAccesses,
|
||||
__deref_out ACL** ppAcl
|
||||
);
|
||||
HRESULT DAPI AclCreateSecurityDescriptor(
|
||||
__in_ecount(cAclAccesses) ACL_ACCESS* paa,
|
||||
__in DWORD cAclAccesses,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclCreateSecurityDescriptorFromDacl(
|
||||
__in ACL* pACL,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT __cdecl AclCreateSecurityDescriptorFromString(
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd,
|
||||
__in_z __format_string LPCWSTR wzSddlFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI AclDuplicateSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* psd,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclGetSecurityDescriptor(
|
||||
__in_z LPCWSTR wzObject,
|
||||
__in SE_OBJECT_TYPE sot,
|
||||
__in SECURITY_INFORMATION securityInformation,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppsd
|
||||
);
|
||||
HRESULT DAPI AclSetSecurityWithRetry(
|
||||
__in_z LPCWSTR wzObject,
|
||||
__in SE_OBJECT_TYPE sot,
|
||||
__in SECURITY_INFORMATION securityInformation,
|
||||
__in_opt PSID psidOwner,
|
||||
__in_opt PSID psidGroup,
|
||||
__in_opt PACL pDacl,
|
||||
__in_opt PACL pSacl,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
|
||||
HRESULT DAPI AclFreeSid(
|
||||
__in PSID psid
|
||||
);
|
||||
HRESULT DAPI AclFreeDacl(
|
||||
__in ACL* pACL
|
||||
);
|
||||
HRESULT DAPI AclFreeSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* psd
|
||||
);
|
||||
|
||||
HRESULT DAPI AclAddAdminToSecurityDescriptor(
|
||||
__in SECURITY_DESCRIPTOR* pSecurity,
|
||||
__deref_out SECURITY_DESCRIPTOR** ppSecurityNew
|
||||
);
|
||||
|
||||
// Following code in acl2util.cpp due to dependency on crypt32.dll.
|
||||
HRESULT DAPI AclCalculateServiceSidString(
|
||||
__in LPCWSTR wzServiceName,
|
||||
__in int cchServiceName,
|
||||
__deref_out_z LPWSTR* psczSid
|
||||
);
|
||||
HRESULT DAPI AclGetAccountSidStringEx(
|
||||
__in_z LPCWSTR wzSystem,
|
||||
__in_z LPCWSTR wzAccount,
|
||||
__deref_out_z LPWSTR* psczSid
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,45 +1,45 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// functions
|
||||
|
||||
/********************************************************************
|
||||
AppFreeCommandLineArgs - frees argv from AppParseCommandLine.
|
||||
|
||||
********************************************************************/
|
||||
void DAPI AppFreeCommandLineArgs(
|
||||
__in LPWSTR* argv
|
||||
);
|
||||
|
||||
void DAPI AppInitialize(
|
||||
__in_ecount(cSafelyLoadSystemDlls) LPCWSTR rgsczSafelyLoadSystemDlls[],
|
||||
__in DWORD cSafelyLoadSystemDlls
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
AppInitializeUnsafe - initializes without the full standard safety
|
||||
precautions for an application.
|
||||
|
||||
********************************************************************/
|
||||
void DAPI AppInitializeUnsafe();
|
||||
|
||||
/********************************************************************
|
||||
AppParseCommandLine - parses the command line using CommandLineToArgvW.
|
||||
The caller must free the value of pArgv on success
|
||||
by calling AppFreeCommandLineArgs.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) AppParseCommandLine(
|
||||
__in LPCWSTR wzCommandLine,
|
||||
__in int* argc,
|
||||
__in LPWSTR** pArgv
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// functions
|
||||
|
||||
/********************************************************************
|
||||
AppFreeCommandLineArgs - frees argv from AppParseCommandLine.
|
||||
|
||||
********************************************************************/
|
||||
void DAPI AppFreeCommandLineArgs(
|
||||
__in LPWSTR* argv
|
||||
);
|
||||
|
||||
void DAPI AppInitialize(
|
||||
__in_ecount(cSafelyLoadSystemDlls) LPCWSTR rgsczSafelyLoadSystemDlls[],
|
||||
__in DWORD cSafelyLoadSystemDlls
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
AppInitializeUnsafe - initializes without the full standard safety
|
||||
precautions for an application.
|
||||
|
||||
********************************************************************/
|
||||
void DAPI AppInitializeUnsafe();
|
||||
|
||||
/********************************************************************
|
||||
AppParseCommandLine - parses the command line using CommandLineToArgvW.
|
||||
The caller must free the value of pArgv on success
|
||||
by calling AppFreeCommandLineArgs.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) AppParseCommandLine(
|
||||
__in LPCWSTR wzCommandLine,
|
||||
__in int* argc,
|
||||
__in LPWSTR** pArgv
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,86 +1,86 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
|
||||
#define ReleaseNullApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
|
||||
|
||||
|
||||
const LPCWSTR APPLICATION_SYNDICATION_NAMESPACE = L"http://appsyndication.org/2006/appsyn";
|
||||
|
||||
typedef enum APUP_HASH_ALGORITHM
|
||||
{
|
||||
APUP_HASH_ALGORITHM_UNKNOWN,
|
||||
APUP_HASH_ALGORITHM_MD5,
|
||||
APUP_HASH_ALGORITHM_SHA1,
|
||||
APUP_HASH_ALGORITHM_SHA256,
|
||||
} APUP_HASH_ALGORITHM;
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_ENCLOSURE
|
||||
{
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzLocalName;
|
||||
DWORD64 dw64Size;
|
||||
|
||||
BYTE* rgbDigest;
|
||||
DWORD cbDigest;
|
||||
APUP_HASH_ALGORITHM digestAlgorithm;
|
||||
|
||||
BOOL fInstaller;
|
||||
};
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_ENTRY
|
||||
{
|
||||
LPWSTR wzApplicationId;
|
||||
LPWSTR wzApplicationType;
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzSummary;
|
||||
LPWSTR wzContentType;
|
||||
LPWSTR wzContent;
|
||||
|
||||
LPWSTR wzUpgradeId;
|
||||
BOOL fUpgradeExclusive;
|
||||
DWORD64 dw64Version;
|
||||
DWORD64 dw64UpgradeVersion;
|
||||
|
||||
DWORD64 dw64TotalSize;
|
||||
|
||||
DWORD cEnclosures;
|
||||
APPLICATION_UPDATE_ENCLOSURE* rgEnclosures;
|
||||
};
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_CHAIN
|
||||
{
|
||||
LPWSTR wzDefaultApplicationId;
|
||||
LPWSTR wzDefaultApplicationType;
|
||||
|
||||
DWORD cEntries;
|
||||
APPLICATION_UPDATE_ENTRY* rgEntries;
|
||||
};
|
||||
|
||||
|
||||
HRESULT DAPI ApupAllocChainFromAtom(
|
||||
__in ATOM_FEED* pFeed,
|
||||
__out APPLICATION_UPDATE_CHAIN** ppChain
|
||||
);
|
||||
|
||||
HRESULT DAPI ApupFilterChain(
|
||||
__in APPLICATION_UPDATE_CHAIN* pChain,
|
||||
__in DWORD64 dw64Version,
|
||||
__out APPLICATION_UPDATE_CHAIN** ppFilteredChain
|
||||
);
|
||||
|
||||
void DAPI ApupFreeChain(
|
||||
__in APPLICATION_UPDATE_CHAIN* pChain
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
|
||||
#define ReleaseNullApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
|
||||
|
||||
|
||||
const LPCWSTR APPLICATION_SYNDICATION_NAMESPACE = L"http://appsyndication.org/2006/appsyn";
|
||||
|
||||
typedef enum APUP_HASH_ALGORITHM
|
||||
{
|
||||
APUP_HASH_ALGORITHM_UNKNOWN,
|
||||
APUP_HASH_ALGORITHM_MD5,
|
||||
APUP_HASH_ALGORITHM_SHA1,
|
||||
APUP_HASH_ALGORITHM_SHA256,
|
||||
} APUP_HASH_ALGORITHM;
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_ENCLOSURE
|
||||
{
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzLocalName;
|
||||
DWORD64 dw64Size;
|
||||
|
||||
BYTE* rgbDigest;
|
||||
DWORD cbDigest;
|
||||
APUP_HASH_ALGORITHM digestAlgorithm;
|
||||
|
||||
BOOL fInstaller;
|
||||
};
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_ENTRY
|
||||
{
|
||||
LPWSTR wzApplicationId;
|
||||
LPWSTR wzApplicationType;
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzSummary;
|
||||
LPWSTR wzContentType;
|
||||
LPWSTR wzContent;
|
||||
|
||||
LPWSTR wzUpgradeId;
|
||||
BOOL fUpgradeExclusive;
|
||||
DWORD64 dw64Version;
|
||||
DWORD64 dw64UpgradeVersion;
|
||||
|
||||
DWORD64 dw64TotalSize;
|
||||
|
||||
DWORD cEnclosures;
|
||||
APPLICATION_UPDATE_ENCLOSURE* rgEnclosures;
|
||||
};
|
||||
|
||||
|
||||
struct APPLICATION_UPDATE_CHAIN
|
||||
{
|
||||
LPWSTR wzDefaultApplicationId;
|
||||
LPWSTR wzDefaultApplicationType;
|
||||
|
||||
DWORD cEntries;
|
||||
APPLICATION_UPDATE_ENTRY* rgEntries;
|
||||
};
|
||||
|
||||
|
||||
HRESULT DAPI ApupAllocChainFromAtom(
|
||||
__in ATOM_FEED* pFeed,
|
||||
__out APPLICATION_UPDATE_CHAIN** ppChain
|
||||
);
|
||||
|
||||
HRESULT DAPI ApupFilterChain(
|
||||
__in APPLICATION_UPDATE_CHAIN* pChain,
|
||||
__in DWORD64 dw64Version,
|
||||
__out APPLICATION_UPDATE_CHAIN** ppFilteredChain
|
||||
);
|
||||
|
||||
void DAPI ApupFreeChain(
|
||||
__in APPLICATION_UPDATE_CHAIN* pChain
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+146
-146
@@ -1,146 +1,146 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseAtomFeed(p) if (p) { AtomFreeFeed(p); }
|
||||
#define ReleaseNullAtomFeed(p) if (p) { AtomFreeFeed(p); p = NULL; }
|
||||
|
||||
|
||||
struct ATOM_UNKNOWN_ATTRIBUTE
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzAttribute;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pNext;
|
||||
};
|
||||
|
||||
struct ATOM_UNKNOWN_ELEMENT
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzElement;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pAttributes;
|
||||
ATOM_UNKNOWN_ELEMENT* pNext;
|
||||
};
|
||||
|
||||
struct ATOM_LINK
|
||||
{
|
||||
LPWSTR wzRel;
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzType;
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzValue;
|
||||
DWORD64 dw64Length;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pUnknownAttributes;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_CONTENT
|
||||
{
|
||||
LPWSTR wzType;
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_AUTHOR
|
||||
{
|
||||
LPWSTR wzName;
|
||||
LPWSTR wzEmail;
|
||||
LPWSTR wzUrl;
|
||||
};
|
||||
|
||||
struct ATOM_CATEGORY
|
||||
{
|
||||
LPWSTR wzLabel;
|
||||
LPWSTR wzScheme;
|
||||
LPWSTR wzTerm;
|
||||
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_ENTRY
|
||||
{
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzSummary;
|
||||
LPWSTR wzTitle;
|
||||
FILETIME ftPublished;
|
||||
FILETIME ftUpdated;
|
||||
|
||||
ATOM_CONTENT* pContent;
|
||||
|
||||
DWORD cAuthors;
|
||||
ATOM_AUTHOR* rgAuthors;
|
||||
|
||||
DWORD cCategories;
|
||||
ATOM_CATEGORY* rgCategories;
|
||||
|
||||
DWORD cLinks;
|
||||
ATOM_LINK* rgLinks;
|
||||
|
||||
IXMLDOMNode* pixn;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_FEED
|
||||
{
|
||||
LPWSTR wzGenerator;
|
||||
LPWSTR wzIcon;
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzLogo;
|
||||
LPWSTR wzSubtitle;
|
||||
LPWSTR wzTitle;
|
||||
FILETIME ftUpdated;
|
||||
|
||||
DWORD cAuthors;
|
||||
ATOM_AUTHOR* rgAuthors;
|
||||
|
||||
DWORD cCategories;
|
||||
ATOM_CATEGORY* rgCategories;
|
||||
|
||||
DWORD cEntries;
|
||||
ATOM_ENTRY* rgEntries;
|
||||
|
||||
DWORD cLinks;
|
||||
ATOM_LINK* rgLinks;
|
||||
|
||||
IXMLDOMNode* pixn;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
HRESULT DAPI AtomInitialize(
|
||||
);
|
||||
|
||||
void DAPI AtomUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromString(
|
||||
__in_z LPCWSTR wzAtomString,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromFile(
|
||||
__in_z LPCWSTR wzAtomFile,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromDocument(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
void DAPI AtomFreeFeed(
|
||||
__in_xcount(pFeed->cItems) ATOM_FEED *pFEED
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseAtomFeed(p) if (p) { AtomFreeFeed(p); }
|
||||
#define ReleaseNullAtomFeed(p) if (p) { AtomFreeFeed(p); p = NULL; }
|
||||
|
||||
|
||||
struct ATOM_UNKNOWN_ATTRIBUTE
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzAttribute;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pNext;
|
||||
};
|
||||
|
||||
struct ATOM_UNKNOWN_ELEMENT
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzElement;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pAttributes;
|
||||
ATOM_UNKNOWN_ELEMENT* pNext;
|
||||
};
|
||||
|
||||
struct ATOM_LINK
|
||||
{
|
||||
LPWSTR wzRel;
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzType;
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzValue;
|
||||
DWORD64 dw64Length;
|
||||
|
||||
ATOM_UNKNOWN_ATTRIBUTE* pUnknownAttributes;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_CONTENT
|
||||
{
|
||||
LPWSTR wzType;
|
||||
LPWSTR wzUrl;
|
||||
LPWSTR wzValue;
|
||||
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_AUTHOR
|
||||
{
|
||||
LPWSTR wzName;
|
||||
LPWSTR wzEmail;
|
||||
LPWSTR wzUrl;
|
||||
};
|
||||
|
||||
struct ATOM_CATEGORY
|
||||
{
|
||||
LPWSTR wzLabel;
|
||||
LPWSTR wzScheme;
|
||||
LPWSTR wzTerm;
|
||||
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_ENTRY
|
||||
{
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzSummary;
|
||||
LPWSTR wzTitle;
|
||||
FILETIME ftPublished;
|
||||
FILETIME ftUpdated;
|
||||
|
||||
ATOM_CONTENT* pContent;
|
||||
|
||||
DWORD cAuthors;
|
||||
ATOM_AUTHOR* rgAuthors;
|
||||
|
||||
DWORD cCategories;
|
||||
ATOM_CATEGORY* rgCategories;
|
||||
|
||||
DWORD cLinks;
|
||||
ATOM_LINK* rgLinks;
|
||||
|
||||
IXMLDOMNode* pixn;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct ATOM_FEED
|
||||
{
|
||||
LPWSTR wzGenerator;
|
||||
LPWSTR wzIcon;
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzLogo;
|
||||
LPWSTR wzSubtitle;
|
||||
LPWSTR wzTitle;
|
||||
FILETIME ftUpdated;
|
||||
|
||||
DWORD cAuthors;
|
||||
ATOM_AUTHOR* rgAuthors;
|
||||
|
||||
DWORD cCategories;
|
||||
ATOM_CATEGORY* rgCategories;
|
||||
|
||||
DWORD cEntries;
|
||||
ATOM_ENTRY* rgEntries;
|
||||
|
||||
DWORD cLinks;
|
||||
ATOM_LINK* rgLinks;
|
||||
|
||||
IXMLDOMNode* pixn;
|
||||
ATOM_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
HRESULT DAPI AtomInitialize(
|
||||
);
|
||||
|
||||
void DAPI AtomUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromString(
|
||||
__in_z LPCWSTR wzAtomString,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromFile(
|
||||
__in_z LPCWSTR wzAtomFile,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
HRESULT DAPI AtomParseFromDocument(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__out ATOM_FEED **ppFeed
|
||||
);
|
||||
|
||||
void DAPI AtomFreeFeed(
|
||||
__in_xcount(pFeed->cItems) ATOM_FEED *pFEED
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,58 +1,58 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _BAL_CONDITION
|
||||
{
|
||||
LPWSTR sczCondition;
|
||||
LPWSTR sczMessage;
|
||||
} BAL_CONDITION;
|
||||
|
||||
|
||||
typedef struct _BAL_CONDITIONS
|
||||
{
|
||||
BAL_CONDITION* rgConditions;
|
||||
DWORD cConditions;
|
||||
} BAL_CONDITIONS;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionsParseFromXml - loads the conditions from the UX manifest.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalConditionsParseFromXml(
|
||||
__in BAL_CONDITIONS* pConditions,
|
||||
__in IXMLDOMDocument* pixdManifest,
|
||||
__in_opt WIX_LOCALIZATION* pWixLoc
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionEvaluate - evaluates condition against the provided IBurnCore.
|
||||
|
||||
NOTE: psczMessage is optional.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalConditionEvaluate(
|
||||
__in BAL_CONDITION* pCondition,
|
||||
__in IBootstrapperEngine* pEngine,
|
||||
__out BOOL* pfResult,
|
||||
__out_z_opt LPWSTR* psczMessage
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionsUninitialize - uninitializes any conditions previously loaded.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalConditionsUninitialize(
|
||||
__in BAL_CONDITIONS* pConditions
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _BAL_CONDITION
|
||||
{
|
||||
LPWSTR sczCondition;
|
||||
LPWSTR sczMessage;
|
||||
} BAL_CONDITION;
|
||||
|
||||
|
||||
typedef struct _BAL_CONDITIONS
|
||||
{
|
||||
BAL_CONDITION* rgConditions;
|
||||
DWORD cConditions;
|
||||
} BAL_CONDITIONS;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionsParseFromXml - loads the conditions from the UX manifest.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalConditionsParseFromXml(
|
||||
__in BAL_CONDITIONS* pConditions,
|
||||
__in IXMLDOMDocument* pixdManifest,
|
||||
__in_opt WIX_LOCALIZATION* pWixLoc
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionEvaluate - evaluates condition against the provided IBurnCore.
|
||||
|
||||
NOTE: psczMessage is optional.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalConditionEvaluate(
|
||||
__in BAL_CONDITION* pCondition,
|
||||
__in IBootstrapperEngine* pEngine,
|
||||
__out BOOL* pfResult,
|
||||
__out_z_opt LPWSTR* psczMessage
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalConditionsUninitialize - uninitializes any conditions previously loaded.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalConditionsUninitialize(
|
||||
__in BAL_CONDITIONS* pConditions
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+109
-109
@@ -1,109 +1,109 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum BAL_INFO_PACKAGE_TYPE
|
||||
{
|
||||
BAL_INFO_PACKAGE_TYPE_UNKNOWN,
|
||||
BAL_INFO_PACKAGE_TYPE_EXE,
|
||||
BAL_INFO_PACKAGE_TYPE_MSI,
|
||||
BAL_INFO_PACKAGE_TYPE_MSP,
|
||||
BAL_INFO_PACKAGE_TYPE_MSU,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH,
|
||||
} BAL_INFO_PACKAGE_TYPE;
|
||||
|
||||
typedef enum BAL_INFO_CACHE_TYPE
|
||||
{
|
||||
BAL_INFO_CACHE_TYPE_NO,
|
||||
BAL_INFO_CACHE_TYPE_YES,
|
||||
BAL_INFO_CACHE_TYPE_ALWAYS,
|
||||
} BAL_INFO_CACHE_TYPE;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_PACKAGE
|
||||
{
|
||||
LPWSTR sczId;
|
||||
LPWSTR sczDisplayName;
|
||||
LPWSTR sczDescription;
|
||||
BAL_INFO_PACKAGE_TYPE type;
|
||||
BOOL fPermanent;
|
||||
BOOL fVital;
|
||||
BOOL fDisplayInternalUI;
|
||||
LPWSTR sczProductCode;
|
||||
LPWSTR sczUpgradeCode;
|
||||
LPWSTR sczVersion;
|
||||
LPWSTR sczInstallCondition;
|
||||
BAL_INFO_CACHE_TYPE cacheType;
|
||||
BOOTSTRAPPER_ACTION_STATE executeAction; // this must be set by the BA in OnPlanPackageComplete.
|
||||
BOOTSTRAPPER_ACTION_STATE rollbackAction; // this must be set by the BA in OnPlanPackageComplete.
|
||||
} BAL_INFO_PACKAGE;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_PACKAGES
|
||||
{
|
||||
BAL_INFO_PACKAGE* rgPackages;
|
||||
DWORD cPackages;
|
||||
} BAL_INFO_PACKAGES;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_BUNDLE
|
||||
{
|
||||
BOOL fPerMachine;
|
||||
LPWSTR sczName;
|
||||
LPWSTR sczLogVariable;
|
||||
BAL_INFO_PACKAGES packages;
|
||||
} BAL_INFO_BUNDLE;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoParseFromXml - loads the bundle and package info from the UX
|
||||
manifest.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoParseFromXml(
|
||||
__in BAL_INFO_BUNDLE* pBundle,
|
||||
__in IXMLDOMDocument* pixdManifest
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoAddRelatedBundleAsPackage - adds a related bundle as a package.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage(
|
||||
__in BAL_INFO_PACKAGES* pPackages,
|
||||
__in LPCWSTR wzId,
|
||||
__in BOOTSTRAPPER_RELATION_TYPE relationType,
|
||||
__in BOOL fPerMachine
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoFindPackageById - finds a package by its id.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoFindPackageById(
|
||||
__in BAL_INFO_PACKAGES* pPackages,
|
||||
__in LPCWSTR wzId,
|
||||
__out BAL_INFO_PACKAGE** ppPackage
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoUninitialize - uninitializes any info previously loaded.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalInfoUninitialize(
|
||||
__in BAL_INFO_BUNDLE* pBundle
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum BAL_INFO_PACKAGE_TYPE
|
||||
{
|
||||
BAL_INFO_PACKAGE_TYPE_UNKNOWN,
|
||||
BAL_INFO_PACKAGE_TYPE_EXE,
|
||||
BAL_INFO_PACKAGE_TYPE_MSI,
|
||||
BAL_INFO_PACKAGE_TYPE_MSP,
|
||||
BAL_INFO_PACKAGE_TYPE_MSU,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON,
|
||||
BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH,
|
||||
} BAL_INFO_PACKAGE_TYPE;
|
||||
|
||||
typedef enum BAL_INFO_CACHE_TYPE
|
||||
{
|
||||
BAL_INFO_CACHE_TYPE_NO,
|
||||
BAL_INFO_CACHE_TYPE_YES,
|
||||
BAL_INFO_CACHE_TYPE_ALWAYS,
|
||||
} BAL_INFO_CACHE_TYPE;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_PACKAGE
|
||||
{
|
||||
LPWSTR sczId;
|
||||
LPWSTR sczDisplayName;
|
||||
LPWSTR sczDescription;
|
||||
BAL_INFO_PACKAGE_TYPE type;
|
||||
BOOL fPermanent;
|
||||
BOOL fVital;
|
||||
BOOL fDisplayInternalUI;
|
||||
LPWSTR sczProductCode;
|
||||
LPWSTR sczUpgradeCode;
|
||||
LPWSTR sczVersion;
|
||||
LPWSTR sczInstallCondition;
|
||||
BAL_INFO_CACHE_TYPE cacheType;
|
||||
BOOTSTRAPPER_ACTION_STATE executeAction; // this must be set by the BA in OnPlanPackageComplete.
|
||||
BOOTSTRAPPER_ACTION_STATE rollbackAction; // this must be set by the BA in OnPlanPackageComplete.
|
||||
} BAL_INFO_PACKAGE;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_PACKAGES
|
||||
{
|
||||
BAL_INFO_PACKAGE* rgPackages;
|
||||
DWORD cPackages;
|
||||
} BAL_INFO_PACKAGES;
|
||||
|
||||
|
||||
typedef struct _BAL_INFO_BUNDLE
|
||||
{
|
||||
BOOL fPerMachine;
|
||||
LPWSTR sczName;
|
||||
LPWSTR sczLogVariable;
|
||||
BAL_INFO_PACKAGES packages;
|
||||
} BAL_INFO_BUNDLE;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoParseFromXml - loads the bundle and package info from the UX
|
||||
manifest.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoParseFromXml(
|
||||
__in BAL_INFO_BUNDLE* pBundle,
|
||||
__in IXMLDOMDocument* pixdManifest
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoAddRelatedBundleAsPackage - adds a related bundle as a package.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage(
|
||||
__in BAL_INFO_PACKAGES* pPackages,
|
||||
__in LPCWSTR wzId,
|
||||
__in BOOTSTRAPPER_RELATION_TYPE relationType,
|
||||
__in BOOL fPerMachine
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoFindPackageById - finds a package by its id.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalInfoFindPackageById(
|
||||
__in BAL_INFO_PACKAGES* pPackages,
|
||||
__in LPCWSTR wzId,
|
||||
__out BAL_INFO_PACKAGE** ppPackage
|
||||
);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInfoUninitialize - uninitializes any info previously loaded.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalInfoUninitialize(
|
||||
__in BAL_INFO_BUNDLE* pBundle
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,64 +1,64 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum BALRETRY_TYPE
|
||||
{
|
||||
BALRETRY_TYPE_CACHE,
|
||||
BALRETRY_TYPE_EXECUTE,
|
||||
} BALRETRY_TYPE;
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryInitialize - initialize the retry count and timeout between
|
||||
retries (in milliseconds).
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryInitialize(
|
||||
__in DWORD dwMaxRetries,
|
||||
__in DWORD dwTimeout
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryUninitialize - call to cleanup any memory allocated during
|
||||
use of the retry utility.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryUninitialize();
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryStartPackage - call when a package begins to be modified. If
|
||||
the package is being retried, the function will
|
||||
wait the specified timeout.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryStartPackage(
|
||||
__in BALRETRY_TYPE type,
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in_z_opt LPCWSTR wzPayloadId
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryErrorOccured - call when an error occurs for the retry utility
|
||||
to consider.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryErrorOccurred(
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in DWORD dwError
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryEndPackage - returns IDRETRY is a retry is recommended or
|
||||
IDNOACTION if a retry is not recommended.
|
||||
********************************************************************/
|
||||
DAPI_(int) BalRetryEndPackage(
|
||||
__in BALRETRY_TYPE type,
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in HRESULT hrError
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum BALRETRY_TYPE
|
||||
{
|
||||
BALRETRY_TYPE_CACHE,
|
||||
BALRETRY_TYPE_EXECUTE,
|
||||
} BALRETRY_TYPE;
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryInitialize - initialize the retry count and timeout between
|
||||
retries (in milliseconds).
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryInitialize(
|
||||
__in DWORD dwMaxRetries,
|
||||
__in DWORD dwTimeout
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryUninitialize - call to cleanup any memory allocated during
|
||||
use of the retry utility.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryUninitialize();
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryStartPackage - call when a package begins to be modified. If
|
||||
the package is being retried, the function will
|
||||
wait the specified timeout.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryStartPackage(
|
||||
__in BALRETRY_TYPE type,
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in_z_opt LPCWSTR wzPayloadId
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryErrorOccured - call when an error occurs for the retry utility
|
||||
to consider.
|
||||
********************************************************************/
|
||||
DAPI_(void) BalRetryErrorOccurred(
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in DWORD dwError
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalRetryEndPackage - returns IDRETRY is a retry is recommended or
|
||||
IDNOACTION if a retry is not recommended.
|
||||
********************************************************************/
|
||||
DAPI_(int) BalRetryEndPackage(
|
||||
__in BALRETRY_TYPE type,
|
||||
__in_z_opt LPCWSTR wzPackageId,
|
||||
__in_z_opt LPCWSTR wzPayloadId,
|
||||
__in HRESULT hrError
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+118
-118
@@ -1,118 +1,118 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "dutil.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BalExitOnFailure(x, f) if (FAILED(x)) { BalLogError(x, f); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define BalExitOnFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define BalExitOnFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define BalExitOnRootFailure(x, f) if (FAILED(x)) { BalLogError(x, f); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnRootFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define BalExitOnRootFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define BalExitOnRootFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define BalExitOnNullWithLastError(p, x, f) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnNullWithLastError1(p, x, f, s) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; }
|
||||
|
||||
#ifndef FACILITY_WIX
|
||||
#define FACILITY_WIX 500
|
||||
#endif
|
||||
|
||||
static const HRESULT E_WIXSTDBA_CONDITION_FAILED = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 1);
|
||||
|
||||
static const HRESULT E_MBAHOST_NET452_ON_WIN7RTM = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 1000);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInitialize - remembers the engine interface to enable logging and
|
||||
other functions.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalInitialize(
|
||||
__in IBootstrapperEngine* pEngine
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalUninitialize - cleans up utility layer internals.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalUninitialize();
|
||||
|
||||
/*******************************************************************
|
||||
BalManifestLoad - loads the Application manifest into an XML document.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalManifestLoad(
|
||||
__in HMODULE hUXModule,
|
||||
__out IXMLDOMDocument** ppixdManifest
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalFormatString - formats a string using variables in the engine.
|
||||
|
||||
Note: Use StrFree() to release psczOut.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalFormatString(
|
||||
__in_z LPCWSTR wzFormat,
|
||||
__inout LPWSTR* psczOut
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalGetNumericVariable - gets a number from a variable in the engine.
|
||||
|
||||
Note: Returns E_NOTFOUND if variable does not exist.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalGetNumericVariable(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out LONGLONG* pllValue
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalStringVariableExists - checks if a string variable exists in the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(BOOL) BalStringVariableExists(
|
||||
__in_z LPCWSTR wzVariable
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalGetStringVariable - gets a string from a variable in the engine.
|
||||
|
||||
Note: Use StrFree() to release psczValue.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalGetStringVariable(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__inout LPWSTR* psczValue
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalLog - logs a message with the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPIV_(HRESULT) BalLog(
|
||||
__in BOOTSTRAPPER_LOG_LEVEL level,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalLogError - logs an error message with the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPIV_(HRESULT) BalLogError(
|
||||
__in HRESULT hr,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "dutil.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BalExitOnFailure(x, f) if (FAILED(x)) { BalLogError(x, f); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define BalExitOnFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define BalExitOnFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define BalExitOnRootFailure(x, f) if (FAILED(x)) { BalLogError(x, f); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnRootFailure1(x, f, s) if (FAILED(x)) { BalLogError(x, f, s); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define BalExitOnRootFailure2(x, f, s, t) if (FAILED(x)) { BalLogError(x, f, s, t); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define BalExitOnRootFailure3(x, f, s, t, u) if (FAILED(x)) { BalLogError(x, f, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define BalExitOnNullWithLastError(p, x, f) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f); ExitTrace(x, f); goto LExit; }
|
||||
#define BalExitOnNullWithLastError1(p, x, f, s) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, s); ExitTrace1(x, f, s); goto LExit; }
|
||||
|
||||
#ifndef FACILITY_WIX
|
||||
#define FACILITY_WIX 500
|
||||
#endif
|
||||
|
||||
static const HRESULT E_WIXSTDBA_CONDITION_FAILED = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 1);
|
||||
|
||||
static const HRESULT E_MBAHOST_NET452_ON_WIN7RTM = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 1000);
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
BalInitialize - remembers the engine interface to enable logging and
|
||||
other functions.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalInitialize(
|
||||
__in IBootstrapperEngine* pEngine
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalUninitialize - cleans up utility layer internals.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(void) BalUninitialize();
|
||||
|
||||
/*******************************************************************
|
||||
BalManifestLoad - loads the Application manifest into an XML document.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalManifestLoad(
|
||||
__in HMODULE hUXModule,
|
||||
__out IXMLDOMDocument** ppixdManifest
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalFormatString - formats a string using variables in the engine.
|
||||
|
||||
Note: Use StrFree() to release psczOut.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalFormatString(
|
||||
__in_z LPCWSTR wzFormat,
|
||||
__inout LPWSTR* psczOut
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalGetNumericVariable - gets a number from a variable in the engine.
|
||||
|
||||
Note: Returns E_NOTFOUND if variable does not exist.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalGetNumericVariable(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__out LONGLONG* pllValue
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalStringVariableExists - checks if a string variable exists in the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPI_(BOOL) BalStringVariableExists(
|
||||
__in_z LPCWSTR wzVariable
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalGetStringVariable - gets a string from a variable in the engine.
|
||||
|
||||
Note: Use StrFree() to release psczValue.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) BalGetStringVariable(
|
||||
__in_z LPCWSTR wzVariable,
|
||||
__inout LPWSTR* psczValue
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalLog - logs a message with the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPIV_(HRESULT) BalLog(
|
||||
__in BOOTSTRAPPER_LOG_LEVEL level,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
BalLogError - logs an error message with the engine.
|
||||
|
||||
********************************************************************/
|
||||
DAPIV_(HRESULT) BalLogError(
|
||||
__in HRESULT hr,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,80 +1,80 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// macro definitions
|
||||
|
||||
#define ReleaseBuffer ReleaseMem
|
||||
#define ReleaseNullBuffer ReleaseNullMem
|
||||
#define BuffFree MemFree
|
||||
|
||||
|
||||
// function declarations
|
||||
|
||||
HRESULT BuffReadNumber(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__out DWORD* pdw
|
||||
);
|
||||
HRESULT BuffReadNumber64(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__out DWORD64* pdw64
|
||||
);
|
||||
HRESULT BuffReadString(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_z LPWSTR* pscz
|
||||
);
|
||||
HRESULT BuffReadStringAnsi(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_z LPSTR* pscz
|
||||
);
|
||||
HRESULT BuffReadStream(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_bcount(*pcbStream) BYTE** ppbStream,
|
||||
__out SIZE_T* pcbStream
|
||||
);
|
||||
|
||||
HRESULT BuffWriteNumber(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in DWORD dw
|
||||
);
|
||||
HRESULT BuffWriteNumber64(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in DWORD64 dw64
|
||||
);
|
||||
HRESULT BuffWriteString(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_z_opt LPCWSTR scz
|
||||
);
|
||||
HRESULT BuffWriteStringAnsi(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_z_opt LPCSTR scz
|
||||
);
|
||||
HRESULT BuffWriteStream(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_bcount(cbStream) const BYTE* pbStream,
|
||||
__in SIZE_T cbStream
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// macro definitions
|
||||
|
||||
#define ReleaseBuffer ReleaseMem
|
||||
#define ReleaseNullBuffer ReleaseNullMem
|
||||
#define BuffFree MemFree
|
||||
|
||||
|
||||
// function declarations
|
||||
|
||||
HRESULT BuffReadNumber(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__out DWORD* pdw
|
||||
);
|
||||
HRESULT BuffReadNumber64(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__out DWORD64* pdw64
|
||||
);
|
||||
HRESULT BuffReadString(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_z LPWSTR* pscz
|
||||
);
|
||||
HRESULT BuffReadStringAnsi(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_z LPSTR* pscz
|
||||
);
|
||||
HRESULT BuffReadStream(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__deref_out_bcount(*pcbStream) BYTE** ppbStream,
|
||||
__out SIZE_T* pcbStream
|
||||
);
|
||||
|
||||
HRESULT BuffWriteNumber(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in DWORD dw
|
||||
);
|
||||
HRESULT BuffWriteNumber64(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in DWORD64 dw64
|
||||
);
|
||||
HRESULT BuffWriteString(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_z_opt LPCWSTR scz
|
||||
);
|
||||
HRESULT BuffWriteStringAnsi(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_z_opt LPCSTR scz
|
||||
);
|
||||
HRESULT BuffWriteStream(
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer,
|
||||
__in_bcount(cbStream) const BYTE* pbStream,
|
||||
__in SIZE_T cbStream
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,31 +1,31 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum BUNDLE_INSTALL_CONTEXT
|
||||
{
|
||||
BUNDLE_INSTALL_CONTEXT_MACHINE,
|
||||
BUNDLE_INSTALL_CONTEXT_USER,
|
||||
};
|
||||
|
||||
HRESULT DAPI BundleGetBundleInfo(
|
||||
__in LPCWSTR szBundleId, // Bundle code
|
||||
__in LPCWSTR szAttribute, // attribute name
|
||||
__out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf, // returned value, NULL if not desired
|
||||
__inout_opt LPDWORD pcchValueBuf // in/out buffer character count
|
||||
);
|
||||
|
||||
HRESULT DAPI BundleEnumRelatedBundle(
|
||||
__in LPCWSTR lpUpgradeCode,
|
||||
__in BUNDLE_INSTALL_CONTEXT context,
|
||||
__inout PDWORD pdwStartIndex,
|
||||
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpBundleIdBuf
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum BUNDLE_INSTALL_CONTEXT
|
||||
{
|
||||
BUNDLE_INSTALL_CONTEXT_MACHINE,
|
||||
BUNDLE_INSTALL_CONTEXT_USER,
|
||||
};
|
||||
|
||||
HRESULT DAPI BundleGetBundleInfo(
|
||||
__in LPCWSTR szBundleId, // Bundle code
|
||||
__in LPCWSTR szAttribute, // attribute name
|
||||
__out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf, // returned value, NULL if not desired
|
||||
__inout_opt LPDWORD pcchValueBuf // in/out buffer character count
|
||||
);
|
||||
|
||||
HRESULT DAPI BundleEnumRelatedBundle(
|
||||
__in LPCWSTR lpUpgradeCode,
|
||||
__in BUNDLE_INSTALL_CONTEXT context,
|
||||
__inout PDWORD pdwStartIndex,
|
||||
__out_ecount(MAX_GUID_CHARS+1) LPWSTR lpBundleIdBuf
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,62 +1,62 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <fci.h>
|
||||
#include <fcntl.h>
|
||||
#include <msi.h>
|
||||
|
||||
// Callback from PFNFCIGETNEXTCABINET CabCGetNextCabinet method
|
||||
// First argument is the name of splitting cabinet without extension e.g. "cab1"
|
||||
// Second argument is name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"
|
||||
// Third argument is the file token of the first file present in the splitting cabinet
|
||||
typedef void (__stdcall * FileSplitCabNamesCallback)(LPWSTR, LPWSTR, LPWSTR);
|
||||
|
||||
#define CAB_MAX_SIZE 0x7FFFFFFF // (see KB: Q174866)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const int CABC_HANDLE_BYTES;
|
||||
|
||||
// time vs. space trade-off
|
||||
typedef enum COMPRESSION_TYPE
|
||||
{
|
||||
COMPRESSION_TYPE_NONE, // fastest
|
||||
COMPRESSION_TYPE_LOW,
|
||||
COMPRESSION_TYPE_MEDIUM,
|
||||
COMPRESSION_TYPE_HIGH, // smallest
|
||||
COMPRESSION_TYPE_MSZIP
|
||||
} COMPRESSION_TYPE;
|
||||
|
||||
// functions
|
||||
HRESULT DAPI CabCBegin(
|
||||
__in_z LPCWSTR wzCab,
|
||||
__in_z LPCWSTR wzCabDir,
|
||||
__in DWORD dwMaxFiles,
|
||||
__in DWORD dwMaxSize,
|
||||
__in DWORD dwMaxThresh,
|
||||
__in COMPRESSION_TYPE ct,
|
||||
__out_bcount(CABC_HANDLE_BYTES) HANDLE *phContext
|
||||
);
|
||||
HRESULT DAPI CabCNextCab(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
HRESULT DAPI CabCAddFile(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in_z_opt LPCWSTR wzToken,
|
||||
__in_opt PMSIFILEHASHINFO pmfHash,
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
HRESULT DAPI CabCFinish(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext,
|
||||
__in_opt FileSplitCabNamesCallback fileSplitCabNamesCallback
|
||||
);
|
||||
void DAPI CabCCancel(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <fci.h>
|
||||
#include <fcntl.h>
|
||||
#include <msi.h>
|
||||
|
||||
// Callback from PFNFCIGETNEXTCABINET CabCGetNextCabinet method
|
||||
// First argument is the name of splitting cabinet without extension e.g. "cab1"
|
||||
// Second argument is name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"
|
||||
// Third argument is the file token of the first file present in the splitting cabinet
|
||||
typedef void (__stdcall * FileSplitCabNamesCallback)(LPWSTR, LPWSTR, LPWSTR);
|
||||
|
||||
#define CAB_MAX_SIZE 0x7FFFFFFF // (see KB: Q174866)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const int CABC_HANDLE_BYTES;
|
||||
|
||||
// time vs. space trade-off
|
||||
typedef enum COMPRESSION_TYPE
|
||||
{
|
||||
COMPRESSION_TYPE_NONE, // fastest
|
||||
COMPRESSION_TYPE_LOW,
|
||||
COMPRESSION_TYPE_MEDIUM,
|
||||
COMPRESSION_TYPE_HIGH, // smallest
|
||||
COMPRESSION_TYPE_MSZIP
|
||||
} COMPRESSION_TYPE;
|
||||
|
||||
// functions
|
||||
HRESULT DAPI CabCBegin(
|
||||
__in_z LPCWSTR wzCab,
|
||||
__in_z LPCWSTR wzCabDir,
|
||||
__in DWORD dwMaxFiles,
|
||||
__in DWORD dwMaxSize,
|
||||
__in DWORD dwMaxThresh,
|
||||
__in COMPRESSION_TYPE ct,
|
||||
__out_bcount(CABC_HANDLE_BYTES) HANDLE *phContext
|
||||
);
|
||||
HRESULT DAPI CabCNextCab(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
HRESULT DAPI CabCAddFile(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in_z_opt LPCWSTR wzToken,
|
||||
__in_opt PMSIFILEHASHINFO pmfHash,
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
HRESULT DAPI CabCFinish(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext,
|
||||
__in_opt FileSplitCabNamesCallback fileSplitCabNamesCallback
|
||||
);
|
||||
void DAPI CabCCancel(
|
||||
__in_bcount(CABC_HANDLE_BYTES) HANDLE hContext
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,56 +1,56 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <fdi.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
|
||||
// callback function prototypes
|
||||
typedef HRESULT (*CAB_CALLBACK_OPEN_FILE)(LPCWSTR wzFile, INT_PTR* ppFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_READ_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead);
|
||||
typedef HRESULT (*CAB_CALLBACK_WRITE_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead);
|
||||
typedef LONG (*CAB_CALLBACK_SEEK_FILE)(INT_PTR pFile, DWORD dwMove, DWORD dwMoveMethod);
|
||||
typedef HRESULT (*CAB_CALLBACK_CLOSE_FILE)(INT_PTR pFile);
|
||||
|
||||
typedef HRESULT (*CAB_CALLBACK_BEGIN_FILE)(LPCWSTR wzFileId, FILETIME* pftFileTime, DWORD cbFileSize, LPVOID pvContext, INT_PTR* ppFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_END_FILE)(LPCWSTR wzFileId, LPVOID pvContext, INT_PTR pFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext);
|
||||
|
||||
// function type with calling convention of __stdcall that .NET 1.1 understands only
|
||||
// .NET 2.0 will not need this
|
||||
typedef INT_PTR (FAR __stdcall *STDCALL_PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin);
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI CabInitialize(
|
||||
__in BOOL fDelayLoad
|
||||
);
|
||||
void DAPI CabUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI CabExtract(
|
||||
__in_z LPCWSTR wzCabinet,
|
||||
__in_z LPCWSTR wzExtractFile,
|
||||
__in_z LPCWSTR wzExtractDir,
|
||||
__in_opt CAB_CALLBACK_PROGRESS pfnProgress,
|
||||
__in_opt LPVOID pvContext,
|
||||
__in DWORD64 dw64EmbeddedOffset
|
||||
);
|
||||
|
||||
HRESULT DAPI CabEnumerate(
|
||||
__in_z LPCWSTR wzCabinet,
|
||||
__in_z LPCWSTR wzEnumerateFile,
|
||||
__in STDCALL_PFNFDINOTIFY pfnNotify,
|
||||
__in DWORD64 dw64EmbeddedOffset
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <fdi.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
|
||||
// callback function prototypes
|
||||
typedef HRESULT (*CAB_CALLBACK_OPEN_FILE)(LPCWSTR wzFile, INT_PTR* ppFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_READ_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead);
|
||||
typedef HRESULT (*CAB_CALLBACK_WRITE_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead);
|
||||
typedef LONG (*CAB_CALLBACK_SEEK_FILE)(INT_PTR pFile, DWORD dwMove, DWORD dwMoveMethod);
|
||||
typedef HRESULT (*CAB_CALLBACK_CLOSE_FILE)(INT_PTR pFile);
|
||||
|
||||
typedef HRESULT (*CAB_CALLBACK_BEGIN_FILE)(LPCWSTR wzFileId, FILETIME* pftFileTime, DWORD cbFileSize, LPVOID pvContext, INT_PTR* ppFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_END_FILE)(LPCWSTR wzFileId, LPVOID pvContext, INT_PTR pFile);
|
||||
typedef HRESULT (*CAB_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext);
|
||||
|
||||
// function type with calling convention of __stdcall that .NET 1.1 understands only
|
||||
// .NET 2.0 will not need this
|
||||
typedef INT_PTR (FAR __stdcall *STDCALL_PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin);
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI CabInitialize(
|
||||
__in BOOL fDelayLoad
|
||||
);
|
||||
void DAPI CabUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI CabExtract(
|
||||
__in_z LPCWSTR wzCabinet,
|
||||
__in_z LPCWSTR wzExtractFile,
|
||||
__in_z LPCWSTR wzExtractDir,
|
||||
__in_opt CAB_CALLBACK_PROGRESS pfnProgress,
|
||||
__in_opt LPVOID pvContext,
|
||||
__in DWORD64 dw64EmbeddedOffset
|
||||
);
|
||||
|
||||
HRESULT DAPI CabEnumerate(
|
||||
__in_z LPCWSTR wzCabinet,
|
||||
__in_z LPCWSTR wzEnumerateFile,
|
||||
__in STDCALL_PFNFDINOTIFY pfnNotify,
|
||||
__in DWORD64 dw64EmbeddedOffset
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,66 +1,66 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ReleaseCertStore(p) if (p) { ::CertCloseStore(p, 0); p = NULL; }
|
||||
#define ReleaseCertContext(p) if (p) { ::CertFreeCertificateContext(p); p = NULL; }
|
||||
#define ReleaseCertChain(p) if (p) { ::CertFreeCertificateChain(p); p = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI CertReadProperty(
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__in DWORD dwProperty,
|
||||
__out_bcount(*pcbValue) LPVOID pvValue,
|
||||
__out_opt DWORD* pcbValue
|
||||
);
|
||||
|
||||
HRESULT DAPI CertGetAuthenticodeSigningTimestamp(
|
||||
__in CMSG_SIGNER_INFO* pSignerInfo,
|
||||
__out FILETIME* pft
|
||||
);
|
||||
|
||||
HRESULT DAPI GetCryptProvFromCert(
|
||||
__in_opt HWND hwnd,
|
||||
__in PCCERT_CONTEXT pCert,
|
||||
__out HCRYPTPROV *phCryptProv,
|
||||
__out DWORD *pdwKeySpec,
|
||||
__in BOOL *pfDidCryptAcquire,
|
||||
__deref_opt_out LPWSTR *ppwszTmpContainer,
|
||||
__deref_opt_out LPWSTR *ppwszProviderName,
|
||||
__out DWORD *pdwProviderType
|
||||
);
|
||||
|
||||
HRESULT DAPI FreeCryptProvFromCert(
|
||||
__in BOOL fAcquired,
|
||||
__in HCRYPTPROV hProv,
|
||||
__in_opt LPWSTR pwszCapiProvider,
|
||||
__in DWORD dwProviderType,
|
||||
__in_opt LPWSTR pwszTmpContainer
|
||||
);
|
||||
|
||||
HRESULT DAPI GetProvSecurityDesc(
|
||||
__in HCRYPTPROV hProv,
|
||||
__deref_out SECURITY_DESCRIPTOR** pSecurity
|
||||
);
|
||||
|
||||
HRESULT DAPI SetProvSecurityDesc(
|
||||
__in HCRYPTPROV hProv,
|
||||
__in SECURITY_DESCRIPTOR* pSecurity
|
||||
);
|
||||
|
||||
BOOL DAPI CertHasPrivateKey(
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__out_opt DWORD* pdwKeySpec
|
||||
);
|
||||
|
||||
HRESULT DAPI CertInstallSingleCertificate(
|
||||
__in HCERTSTORE hStore,
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__in LPCWSTR wzName
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ReleaseCertStore(p) if (p) { ::CertCloseStore(p, 0); p = NULL; }
|
||||
#define ReleaseCertContext(p) if (p) { ::CertFreeCertificateContext(p); p = NULL; }
|
||||
#define ReleaseCertChain(p) if (p) { ::CertFreeCertificateChain(p); p = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI CertReadProperty(
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__in DWORD dwProperty,
|
||||
__out_bcount(*pcbValue) LPVOID pvValue,
|
||||
__out_opt DWORD* pcbValue
|
||||
);
|
||||
|
||||
HRESULT DAPI CertGetAuthenticodeSigningTimestamp(
|
||||
__in CMSG_SIGNER_INFO* pSignerInfo,
|
||||
__out FILETIME* pft
|
||||
);
|
||||
|
||||
HRESULT DAPI GetCryptProvFromCert(
|
||||
__in_opt HWND hwnd,
|
||||
__in PCCERT_CONTEXT pCert,
|
||||
__out HCRYPTPROV *phCryptProv,
|
||||
__out DWORD *pdwKeySpec,
|
||||
__in BOOL *pfDidCryptAcquire,
|
||||
__deref_opt_out LPWSTR *ppwszTmpContainer,
|
||||
__deref_opt_out LPWSTR *ppwszProviderName,
|
||||
__out DWORD *pdwProviderType
|
||||
);
|
||||
|
||||
HRESULT DAPI FreeCryptProvFromCert(
|
||||
__in BOOL fAcquired,
|
||||
__in HCRYPTPROV hProv,
|
||||
__in_opt LPWSTR pwszCapiProvider,
|
||||
__in DWORD dwProviderType,
|
||||
__in_opt LPWSTR pwszTmpContainer
|
||||
);
|
||||
|
||||
HRESULT DAPI GetProvSecurityDesc(
|
||||
__in HCRYPTPROV hProv,
|
||||
__deref_out SECURITY_DESCRIPTOR** pSecurity
|
||||
);
|
||||
|
||||
HRESULT DAPI SetProvSecurityDesc(
|
||||
__in HCRYPTPROV hProv,
|
||||
__in SECURITY_DESCRIPTOR* pSecurity
|
||||
);
|
||||
|
||||
BOOL DAPI CertHasPrivateKey(
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__out_opt DWORD* pdwKeySpec
|
||||
);
|
||||
|
||||
HRESULT DAPI CertInstallSingleCertificate(
|
||||
__in HCERTSTORE hStore,
|
||||
__in PCCERT_CONTEXT pCertContext,
|
||||
__in LPCWSTR wzName
|
||||
);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,97 +1,97 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ConsoleExitOnFailure(x, c, f, ...) if (FAILED(x)) { ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; }
|
||||
#define ConsoleExitOnFailure1 ConsoleExitOnFailure
|
||||
#define ConsoleExitOnFailure2 ConsoleExitOnFailure
|
||||
#define ConsoleExitOnFailure3 ConsoleExitOnFailure
|
||||
|
||||
#define ConsoleExitOnLastError(x, c, f, ...) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } }
|
||||
#define ConsoleExitOnLastError1 ConsoleExitOnLastError
|
||||
#define ConsoleExitOnLastError2 ConsoleExitOnLastError
|
||||
#define ConsoleExitOnLastError3 ConsoleExitOnLastError
|
||||
|
||||
#define ConsoleExitOnNull(p, x, e, c, f, ...) if (NULL == p) { x = e; ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; }
|
||||
|
||||
|
||||
// the following macros need to go away
|
||||
#define ConsoleTrace(l, f, ...) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f, __VA_ARGS__); Trace(l, f, __VA_ARGS__); }
|
||||
#define ConsoleTrace1 ConsoleTrace
|
||||
#define ConsoleTrace2 ConsoleTrace
|
||||
#define ConsoleTrace3 ConsoleTrace
|
||||
|
||||
#define ConsoleWarning(f, ...) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f, __VA_ARGS__); Trace(REPORT_STANDARD, f, __VA_ARGS__); }
|
||||
#define ConsoleWarning1 ConsoleWarning
|
||||
#define ConsoleWarning2 ConsoleWarning
|
||||
#define ConsoleWarning3 ConsoleWarning
|
||||
|
||||
#define ConsoleError(x, f, ...) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f, __VA_ARGS__); TraceError(x, f, __VA_ARGS__); }
|
||||
#define ConsoleError1 ConsoleError
|
||||
#define ConsoleError2 ConsoleError
|
||||
#define ConsoleError3 ConsoleError
|
||||
|
||||
|
||||
// enums
|
||||
typedef enum CONSOLE_COLOR { CONSOLE_COLOR_NORMAL, CONSOLE_COLOR_RED, CONSOLE_COLOR_YELLOW, CONSOLE_COLOR_GREEN } CONSOLE_COLOR;
|
||||
|
||||
// structs
|
||||
|
||||
// functions
|
||||
HRESULT DAPI ConsoleInitialize();
|
||||
void DAPI ConsoleUninitialize();
|
||||
|
||||
void DAPI ConsoleGreen();
|
||||
void DAPI ConsoleRed();
|
||||
void DAPI ConsoleYellow();
|
||||
void DAPI ConsoleNormal();
|
||||
|
||||
HRESULT DAPI ConsoleWrite(
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI ConsoleWriteLine(
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI ConsoleWriteError(
|
||||
HRESULT hrError,
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadW(
|
||||
__deref_out_z LPWSTR* ppwzBuffer
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadStringA(
|
||||
__deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPSTR* szCharBuffer,
|
||||
CONST DWORD cchCharBuffer,
|
||||
__out DWORD* pcchNumCharReturn
|
||||
);
|
||||
HRESULT DAPI ConsoleReadStringW(
|
||||
__deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPWSTR* szCharBuffer,
|
||||
CONST DWORD cchCharBuffer,
|
||||
__out DWORD* pcchNumCharReturn
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadNonBlockingW(
|
||||
__deref_out_ecount_opt(*pcchSize) LPWSTR* ppwzBuffer,
|
||||
__out DWORD* pcchSize,
|
||||
BOOL fReadLine
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleSetReadHidden(void);
|
||||
HRESULT DAPI ConsoleSetReadNormal(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ConsoleExitOnFailure(x, c, f, ...) if (FAILED(x)) { ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; }
|
||||
#define ConsoleExitOnFailure1 ConsoleExitOnFailure
|
||||
#define ConsoleExitOnFailure2 ConsoleExitOnFailure
|
||||
#define ConsoleExitOnFailure3 ConsoleExitOnFailure
|
||||
|
||||
#define ConsoleExitOnLastError(x, c, f, ...) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } }
|
||||
#define ConsoleExitOnLastError1 ConsoleExitOnLastError
|
||||
#define ConsoleExitOnLastError2 ConsoleExitOnLastError
|
||||
#define ConsoleExitOnLastError3 ConsoleExitOnLastError
|
||||
|
||||
#define ConsoleExitOnNull(p, x, e, c, f, ...) if (NULL == p) { x = e; ConsoleWriteError(x, c, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; }
|
||||
|
||||
|
||||
// the following macros need to go away
|
||||
#define ConsoleTrace(l, f, ...) { ConsoleWriteLine(CONSOLE_COLOR_NORMAL, f, __VA_ARGS__); Trace(l, f, __VA_ARGS__); }
|
||||
#define ConsoleTrace1 ConsoleTrace
|
||||
#define ConsoleTrace2 ConsoleTrace
|
||||
#define ConsoleTrace3 ConsoleTrace
|
||||
|
||||
#define ConsoleWarning(f, ...) { ConsoleWriteLine(CONSOLE_COLOR_YELLOW, f, __VA_ARGS__); Trace(REPORT_STANDARD, f, __VA_ARGS__); }
|
||||
#define ConsoleWarning1 ConsoleWarning
|
||||
#define ConsoleWarning2 ConsoleWarning
|
||||
#define ConsoleWarning3 ConsoleWarning
|
||||
|
||||
#define ConsoleError(x, f, ...) { ConsoleWriteError(x, CONSOLE_COLOR_RED, f, __VA_ARGS__); TraceError(x, f, __VA_ARGS__); }
|
||||
#define ConsoleError1 ConsoleError
|
||||
#define ConsoleError2 ConsoleError
|
||||
#define ConsoleError3 ConsoleError
|
||||
|
||||
|
||||
// enums
|
||||
typedef enum CONSOLE_COLOR { CONSOLE_COLOR_NORMAL, CONSOLE_COLOR_RED, CONSOLE_COLOR_YELLOW, CONSOLE_COLOR_GREEN } CONSOLE_COLOR;
|
||||
|
||||
// structs
|
||||
|
||||
// functions
|
||||
HRESULT DAPI ConsoleInitialize();
|
||||
void DAPI ConsoleUninitialize();
|
||||
|
||||
void DAPI ConsoleGreen();
|
||||
void DAPI ConsoleRed();
|
||||
void DAPI ConsoleYellow();
|
||||
void DAPI ConsoleNormal();
|
||||
|
||||
HRESULT DAPI ConsoleWrite(
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI ConsoleWriteLine(
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI ConsoleWriteError(
|
||||
HRESULT hrError,
|
||||
CONSOLE_COLOR cc,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadW(
|
||||
__deref_out_z LPWSTR* ppwzBuffer
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadStringA(
|
||||
__deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPSTR* szCharBuffer,
|
||||
CONST DWORD cchCharBuffer,
|
||||
__out DWORD* pcchNumCharReturn
|
||||
);
|
||||
HRESULT DAPI ConsoleReadStringW(
|
||||
__deref_out_ecount_part(cchCharBuffer,*pcchNumCharReturn) LPWSTR* szCharBuffer,
|
||||
CONST DWORD cchCharBuffer,
|
||||
__out DWORD* pcchNumCharReturn
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleReadNonBlockingW(
|
||||
__deref_out_ecount_opt(*pcchSize) LPWSTR* ppwzBuffer,
|
||||
__out DWORD* pcchSize,
|
||||
BOOL fReadLine
|
||||
);
|
||||
|
||||
HRESULT DAPI ConsoleSetReadHidden(void);
|
||||
HRESULT DAPI ConsoleSetReadNormal(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+103
-103
@@ -1,103 +1,103 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ReleaseCryptMsg(p) if (p) { ::CryptMsgClose(p); p = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Use CRYPTPROTECTMEMORY_BLOCK_SIZE, because it's larger and thus more restrictive than RTL_ENCRYPT_MEMORY_SIZE.
|
||||
#define CRYP_ENCRYPT_MEMORY_SIZE CRYPTPROTECTMEMORY_BLOCK_SIZE
|
||||
#define SHA1_HASH_LEN 20
|
||||
|
||||
typedef NTSTATUS (APIENTRY *PFN_RTLENCRYPTMEMORY)(
|
||||
__inout PVOID Memory,
|
||||
__in ULONG MemoryLength,
|
||||
__in ULONG OptionFlags
|
||||
);
|
||||
|
||||
typedef NTSTATUS (APIENTRY *PFN_RTLDECRYPTMEMORY)(
|
||||
__inout PVOID Memory,
|
||||
__in ULONG MemoryLength,
|
||||
__in ULONG OptionFlags
|
||||
);
|
||||
|
||||
typedef BOOL (APIENTRY *PFN_CRYPTPROTECTMEMORY)(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
typedef BOOL (APIENTRY *PFN_CRYPTUNPROTECTMEMORY)(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
// function declarations
|
||||
|
||||
HRESULT DAPI CrypInitialize();
|
||||
void DAPI CrypUninitialize();
|
||||
|
||||
HRESULT DAPI CrypDecodeObject(
|
||||
__in_z LPCSTR szStructType,
|
||||
__in_ecount(cbData) const BYTE* pbData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags,
|
||||
__out LPVOID* ppvObject,
|
||||
__out_opt DWORD* pcbObject
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypMsgGetParam(
|
||||
__in HCRYPTMSG hCryptMsg,
|
||||
__in DWORD dwType,
|
||||
__in DWORD dwIndex,
|
||||
__out LPVOID* ppvData,
|
||||
__out_opt DWORD* pcbData
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashFile(
|
||||
__in_z LPCWSTR wzFilePath,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash,
|
||||
__out_opt DWORD64* pqwBytesHashed
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashFileHandle(
|
||||
__in HANDLE hFile,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash,
|
||||
__out_opt DWORD64* pqwBytesHashed
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashBuffer(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypEncryptMemory(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypDecryptMemory(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ReleaseCryptMsg(p) if (p) { ::CryptMsgClose(p); p = NULL; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// Use CRYPTPROTECTMEMORY_BLOCK_SIZE, because it's larger and thus more restrictive than RTL_ENCRYPT_MEMORY_SIZE.
|
||||
#define CRYP_ENCRYPT_MEMORY_SIZE CRYPTPROTECTMEMORY_BLOCK_SIZE
|
||||
#define SHA1_HASH_LEN 20
|
||||
|
||||
typedef NTSTATUS (APIENTRY *PFN_RTLENCRYPTMEMORY)(
|
||||
__inout PVOID Memory,
|
||||
__in ULONG MemoryLength,
|
||||
__in ULONG OptionFlags
|
||||
);
|
||||
|
||||
typedef NTSTATUS (APIENTRY *PFN_RTLDECRYPTMEMORY)(
|
||||
__inout PVOID Memory,
|
||||
__in ULONG MemoryLength,
|
||||
__in ULONG OptionFlags
|
||||
);
|
||||
|
||||
typedef BOOL (APIENTRY *PFN_CRYPTPROTECTMEMORY)(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
typedef BOOL (APIENTRY *PFN_CRYPTUNPROTECTMEMORY)(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
// function declarations
|
||||
|
||||
HRESULT DAPI CrypInitialize();
|
||||
void DAPI CrypUninitialize();
|
||||
|
||||
HRESULT DAPI CrypDecodeObject(
|
||||
__in_z LPCSTR szStructType,
|
||||
__in_ecount(cbData) const BYTE* pbData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags,
|
||||
__out LPVOID* ppvObject,
|
||||
__out_opt DWORD* pcbObject
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypMsgGetParam(
|
||||
__in HCRYPTMSG hCryptMsg,
|
||||
__in DWORD dwType,
|
||||
__in DWORD dwIndex,
|
||||
__out LPVOID* ppvData,
|
||||
__out_opt DWORD* pcbData
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashFile(
|
||||
__in_z LPCWSTR wzFilePath,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash,
|
||||
__out_opt DWORD64* pqwBytesHashed
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashFileHandle(
|
||||
__in HANDLE hFile,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash,
|
||||
__out_opt DWORD64* pqwBytesHashed
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypHashBuffer(
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__in DWORD dwProvType,
|
||||
__in ALG_ID algid,
|
||||
__out_bcount(cbHash) BYTE* pbHash,
|
||||
__in DWORD cbHash
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypEncryptMemory(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
HRESULT DAPI CrypDecryptMemory(
|
||||
__inout LPVOID pData,
|
||||
__in DWORD cbData,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,130 +1,130 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define GLOBAL_ERROR_BASE 25501
|
||||
|
||||
#define msierrSecureObjectsFailedCreateSD 25520
|
||||
#define msierrSecureObjectsFailedSet 25521
|
||||
#define msierrSecureObjectsUnknownType 25522
|
||||
|
||||
#define msierrXmlFileFailedRead 25530
|
||||
#define msierrXmlFileFailedOpen 25531
|
||||
#define msierrXmlFileFailedSelect 25532
|
||||
#define msierrXmlFileFailedSave 25533
|
||||
|
||||
#define msierrXmlConfigFailedRead 25540
|
||||
#define msierrXmlConfigFailedOpen 25541
|
||||
#define msierrXmlConfigFailedSelect 25542
|
||||
#define msierrXmlConfigFailedSave 25543
|
||||
|
||||
#define msierrFirewallCannotConnect 25580
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Server CustomAction Errors
|
||||
// SERVER range: 26001-26100
|
||||
#define SERVER_ERROR_BASE 26000
|
||||
|
||||
#define msierrIISCannotConnect 26001
|
||||
#define msierrIISFailedReadWebSite 26002
|
||||
#define msierrIISFailedReadWebDirs 26003
|
||||
#define msierrIISFailedReadVDirs 26004
|
||||
#define msierrIISFailedReadFilters 26005
|
||||
#define msierrIISFailedReadAppPool 26006
|
||||
#define msierrIISFailedReadMimeMap 26007
|
||||
#define msierrIISFailedReadProp 26008
|
||||
#define msierrIISFailedReadWebSvcExt 26009
|
||||
#define msierrIISFailedReadWebError 26010
|
||||
#define msierrIISFailedReadHttpHeader 26011
|
||||
|
||||
#define msierrIISFailedSchedTransaction 26031
|
||||
#define msierrIISFailedSchedInstallWebs 26032
|
||||
#define msierrIISFailedSchedInstallWebDirs 26033
|
||||
#define msierrIISFailedSchedInstallVDirs 26034
|
||||
#define msierrIISFailedSchedInstallFilters 26035
|
||||
#define msierrIISFailedSchedInstallAppPool 26036
|
||||
#define msierrIISFailedSchedInstallProp 26037
|
||||
#define msierrIISFailedSchedInstallWebSvcExt 26038
|
||||
|
||||
#define msierrIISFailedSchedUninstallWebs 26051
|
||||
#define msierrIISFailedSchedUninstallWebDirs 26052
|
||||
#define msierrIISFailedSchedUninstallVDirs 26053
|
||||
#define msierrIISFailedSchedUninstallFilters 26054
|
||||
#define msierrIISFailedSchedUninstallAppPool 26055
|
||||
#define msierrIISFailedSchedUninstallProp 26056
|
||||
#define msierrIISFailedSchedUninstallWebSvcExt 26057
|
||||
|
||||
#define msierrIISFailedStartTransaction 26101
|
||||
#define msierrIISFailedOpenKey 26102
|
||||
#define msierrIISFailedCreateKey 26103
|
||||
#define msierrIISFailedWriteData 26104
|
||||
#define msierrIISFailedCreateApp 26105
|
||||
#define msierrIISFailedDeleteKey 26106
|
||||
#define msierrIISFailedDeleteApp 26107
|
||||
#define msierrIISFailedDeleteValue 26108
|
||||
#define msierrIISFailedCommitInUse 26109
|
||||
|
||||
#define msierrSQLFailedCreateDatabase 26201
|
||||
#define msierrSQLFailedDropDatabase 26202
|
||||
#define msierrSQLFailedConnectDatabase 26203
|
||||
#define msierrSQLFailedExecString 26204
|
||||
#define msierrSQLDatabaseAlreadyExists 26205
|
||||
|
||||
#define msierrPERFMONFailedRegisterDLL 26251
|
||||
#define msierrPERFMONFailedUnregisterDLL 26252
|
||||
#define msierrInstallPerfCounterData 26253
|
||||
#define msierrUninstallPerfCounterData 26254
|
||||
|
||||
#define msierrSMBFailedCreate 26301
|
||||
#define msierrSMBFailedDrop 26302
|
||||
|
||||
#define msierrCERTFailedOpen 26351
|
||||
#define msierrCERTFailedAdd 26352
|
||||
|
||||
#define msierrUSRFailedUserCreate 26401
|
||||
#define msierrUSRFailedUserCreatePswd 26402
|
||||
#define msierrUSRFailedUserGroupAdd 26403
|
||||
#define msierrUSRFailedUserCreateExists 26404
|
||||
#define msierrUSRFailedGrantLogonAsService 26405
|
||||
|
||||
#define msierrDependencyMissingDependencies 26451
|
||||
#define msierrDependencyHasDependents 26452
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Managed code CustomAction Errors
|
||||
// MANAGED range: 27000-27100
|
||||
#define MANAGED_ERROR_BASE 27000
|
||||
|
||||
#define msierrDotNetRuntimeRequired 27000
|
||||
//---------------------------------------------------------------------------
|
||||
// Public CustomAction Errors
|
||||
// PUBLIC range: 28001-28100
|
||||
#define PUBLIC_ERROR_BASE 28000
|
||||
|
||||
#define msierrComPlusCannotConnect 28001
|
||||
#define msierrComPlusPartitionReadFailed 28002
|
||||
#define msierrComPlusPartitionRoleReadFailed 28003
|
||||
#define msierrComPlusUserInPartitionRoleReadFailed 28004
|
||||
#define msierrComPlusPartitionUserReadFailed 28005
|
||||
#define msierrComPlusApplicationReadFailed 28006
|
||||
#define msierrComPlusApplicationRoleReadFailed 28007
|
||||
#define msierrComPlusUserInApplicationRoleReadFailed 28008
|
||||
#define msierrComPlusAssembliesReadFailed 28009
|
||||
#define msierrComPlusSubscriptionReadFailed 28010
|
||||
#define msierrComPlusPartitionDependency 28011
|
||||
#define msierrComPlusPartitionNotFound 28012
|
||||
#define msierrComPlusPartitionIdConflict 28013
|
||||
#define msierrComPlusPartitionNameConflict 28014
|
||||
#define msierrComPlusApplicationDependency 28015
|
||||
#define msierrComPlusApplicationNotFound 28016
|
||||
#define msierrComPlusApplicationIdConflict 28017
|
||||
#define msierrComPlusApplicationNameConflict 28018
|
||||
#define msierrComPlusApplicationRoleDependency 28019
|
||||
#define msierrComPlusApplicationRoleNotFound 28020
|
||||
#define msierrComPlusApplicationRoleConflict 28021
|
||||
#define msierrComPlusAssemblyDependency 28022
|
||||
#define msierrComPlusSubscriptionIdConflict 28023
|
||||
#define msierrComPlusSubscriptionNameConflict 28024
|
||||
#define msierrComPlusFailedLookupNames 28025
|
||||
|
||||
#define msierrMsmqCannotConnect 28101
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define GLOBAL_ERROR_BASE 25501
|
||||
|
||||
#define msierrSecureObjectsFailedCreateSD 25520
|
||||
#define msierrSecureObjectsFailedSet 25521
|
||||
#define msierrSecureObjectsUnknownType 25522
|
||||
|
||||
#define msierrXmlFileFailedRead 25530
|
||||
#define msierrXmlFileFailedOpen 25531
|
||||
#define msierrXmlFileFailedSelect 25532
|
||||
#define msierrXmlFileFailedSave 25533
|
||||
|
||||
#define msierrXmlConfigFailedRead 25540
|
||||
#define msierrXmlConfigFailedOpen 25541
|
||||
#define msierrXmlConfigFailedSelect 25542
|
||||
#define msierrXmlConfigFailedSave 25543
|
||||
|
||||
#define msierrFirewallCannotConnect 25580
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Server CustomAction Errors
|
||||
// SERVER range: 26001-26100
|
||||
#define SERVER_ERROR_BASE 26000
|
||||
|
||||
#define msierrIISCannotConnect 26001
|
||||
#define msierrIISFailedReadWebSite 26002
|
||||
#define msierrIISFailedReadWebDirs 26003
|
||||
#define msierrIISFailedReadVDirs 26004
|
||||
#define msierrIISFailedReadFilters 26005
|
||||
#define msierrIISFailedReadAppPool 26006
|
||||
#define msierrIISFailedReadMimeMap 26007
|
||||
#define msierrIISFailedReadProp 26008
|
||||
#define msierrIISFailedReadWebSvcExt 26009
|
||||
#define msierrIISFailedReadWebError 26010
|
||||
#define msierrIISFailedReadHttpHeader 26011
|
||||
|
||||
#define msierrIISFailedSchedTransaction 26031
|
||||
#define msierrIISFailedSchedInstallWebs 26032
|
||||
#define msierrIISFailedSchedInstallWebDirs 26033
|
||||
#define msierrIISFailedSchedInstallVDirs 26034
|
||||
#define msierrIISFailedSchedInstallFilters 26035
|
||||
#define msierrIISFailedSchedInstallAppPool 26036
|
||||
#define msierrIISFailedSchedInstallProp 26037
|
||||
#define msierrIISFailedSchedInstallWebSvcExt 26038
|
||||
|
||||
#define msierrIISFailedSchedUninstallWebs 26051
|
||||
#define msierrIISFailedSchedUninstallWebDirs 26052
|
||||
#define msierrIISFailedSchedUninstallVDirs 26053
|
||||
#define msierrIISFailedSchedUninstallFilters 26054
|
||||
#define msierrIISFailedSchedUninstallAppPool 26055
|
||||
#define msierrIISFailedSchedUninstallProp 26056
|
||||
#define msierrIISFailedSchedUninstallWebSvcExt 26057
|
||||
|
||||
#define msierrIISFailedStartTransaction 26101
|
||||
#define msierrIISFailedOpenKey 26102
|
||||
#define msierrIISFailedCreateKey 26103
|
||||
#define msierrIISFailedWriteData 26104
|
||||
#define msierrIISFailedCreateApp 26105
|
||||
#define msierrIISFailedDeleteKey 26106
|
||||
#define msierrIISFailedDeleteApp 26107
|
||||
#define msierrIISFailedDeleteValue 26108
|
||||
#define msierrIISFailedCommitInUse 26109
|
||||
|
||||
#define msierrSQLFailedCreateDatabase 26201
|
||||
#define msierrSQLFailedDropDatabase 26202
|
||||
#define msierrSQLFailedConnectDatabase 26203
|
||||
#define msierrSQLFailedExecString 26204
|
||||
#define msierrSQLDatabaseAlreadyExists 26205
|
||||
|
||||
#define msierrPERFMONFailedRegisterDLL 26251
|
||||
#define msierrPERFMONFailedUnregisterDLL 26252
|
||||
#define msierrInstallPerfCounterData 26253
|
||||
#define msierrUninstallPerfCounterData 26254
|
||||
|
||||
#define msierrSMBFailedCreate 26301
|
||||
#define msierrSMBFailedDrop 26302
|
||||
|
||||
#define msierrCERTFailedOpen 26351
|
||||
#define msierrCERTFailedAdd 26352
|
||||
|
||||
#define msierrUSRFailedUserCreate 26401
|
||||
#define msierrUSRFailedUserCreatePswd 26402
|
||||
#define msierrUSRFailedUserGroupAdd 26403
|
||||
#define msierrUSRFailedUserCreateExists 26404
|
||||
#define msierrUSRFailedGrantLogonAsService 26405
|
||||
|
||||
#define msierrDependencyMissingDependencies 26451
|
||||
#define msierrDependencyHasDependents 26452
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Managed code CustomAction Errors
|
||||
// MANAGED range: 27000-27100
|
||||
#define MANAGED_ERROR_BASE 27000
|
||||
|
||||
#define msierrDotNetRuntimeRequired 27000
|
||||
//---------------------------------------------------------------------------
|
||||
// Public CustomAction Errors
|
||||
// PUBLIC range: 28001-28100
|
||||
#define PUBLIC_ERROR_BASE 28000
|
||||
|
||||
#define msierrComPlusCannotConnect 28001
|
||||
#define msierrComPlusPartitionReadFailed 28002
|
||||
#define msierrComPlusPartitionRoleReadFailed 28003
|
||||
#define msierrComPlusUserInPartitionRoleReadFailed 28004
|
||||
#define msierrComPlusPartitionUserReadFailed 28005
|
||||
#define msierrComPlusApplicationReadFailed 28006
|
||||
#define msierrComPlusApplicationRoleReadFailed 28007
|
||||
#define msierrComPlusUserInApplicationRoleReadFailed 28008
|
||||
#define msierrComPlusAssembliesReadFailed 28009
|
||||
#define msierrComPlusSubscriptionReadFailed 28010
|
||||
#define msierrComPlusPartitionDependency 28011
|
||||
#define msierrComPlusPartitionNotFound 28012
|
||||
#define msierrComPlusPartitionIdConflict 28013
|
||||
#define msierrComPlusPartitionNameConflict 28014
|
||||
#define msierrComPlusApplicationDependency 28015
|
||||
#define msierrComPlusApplicationNotFound 28016
|
||||
#define msierrComPlusApplicationIdConflict 28017
|
||||
#define msierrComPlusApplicationNameConflict 28018
|
||||
#define msierrComPlusApplicationRoleDependency 28019
|
||||
#define msierrComPlusApplicationRoleNotFound 28020
|
||||
#define msierrComPlusApplicationRoleConflict 28021
|
||||
#define msierrComPlusAssemblyDependency 28022
|
||||
#define msierrComPlusSubscriptionIdConflict 28023
|
||||
#define msierrComPlusSubscriptionNameConflict 28024
|
||||
#define msierrComPlusFailedLookupNames 28025
|
||||
|
||||
#define msierrMsmqCannotConnect 28101
|
||||
+147
-147
@@ -1,147 +1,147 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseDependencyArray(rg, c) if (rg) { DepDependencyArrayFree(rg, c); }
|
||||
#define ReleaseNullDependencyArray(rg, c) if (rg) { DepDependencyArrayFree(rg, c); rg = NULL; }
|
||||
|
||||
typedef struct _DEPENDENCY
|
||||
{
|
||||
LPWSTR sczKey;
|
||||
LPWSTR sczName;
|
||||
} DEPENDENCY;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DepGetProviderInformation - gets the various pieces of data registered
|
||||
with a dependency.
|
||||
|
||||
Note: Returns E_NOTFOUND if the dependency was not found.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepGetProviderInformation(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__deref_out_z_opt LPWSTR* psczId,
|
||||
__deref_out_z_opt LPWSTR* psczName,
|
||||
__out_opt DWORD64* pqwVersion
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepCheckDependency - Checks that the dependency is registered and within
|
||||
the proper version range.
|
||||
|
||||
Note: Returns E_NOTFOUND if the dependency was not found.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepCheckDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z_opt LPCWSTR wzMinVersion,
|
||||
__in_z_opt LPCWSTR wzMaxVersion,
|
||||
__in int iAttributes,
|
||||
__in STRINGDICT_HANDLE sdDependencies,
|
||||
__deref_inout_ecount_opt(*pcDependencies) DEPENDENCY** prgDependencies,
|
||||
__inout LPUINT pcDependencies
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepCheckDependents - Checks if any dependents are still installed for the
|
||||
given provider key.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepCheckDependents(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in int iAttributes,
|
||||
__in C_STRINGDICT_HANDLE sdIgnoredDependents,
|
||||
__deref_inout_ecount_opt(*pcDependents) DEPENDENCY** prgDependents,
|
||||
__inout LPUINT pcDependents
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepRegisterDependency - Registers the dependency provider.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepRegisterDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__in_z LPCWSTR wzDisplayName,
|
||||
__in_z_opt LPCWSTR wzId,
|
||||
__in int iAttributes
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepDependentExists - Determines if a dependent is registered.
|
||||
|
||||
Note: Returns S_OK if dependent is registered.
|
||||
Returns E_FILENOTFOUND if dependent is not registered
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepDependentExists(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepRegisterDependent - Registers a dependent under the dependency provider.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepRegisterDependent(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z_opt LPCWSTR wzMinVersion,
|
||||
__in_z_opt LPCWSTR wzMaxVersion,
|
||||
__in int iAttributes
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepUnregisterDependency - Removes the dependency provider.
|
||||
|
||||
Note: Caller should call CheckDependents prior to remove a dependency.
|
||||
Returns E_FILENOTFOUND if the dependency is not registered.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepUnregisterDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepUnregisterDependent - Removes a dependent under the dependency provider.
|
||||
|
||||
Note: Returns E_FILENOTFOUND if neither the dependency or dependent are
|
||||
registered.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepUnregisterDependent(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DependencyArrayAlloc - Allocates or expands an array of DEPENDENCY structs.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepDependencyArrayAlloc(
|
||||
__deref_inout_ecount_opt(*pcDependencies) DEPENDENCY** prgDependencies,
|
||||
__inout LPUINT pcDependencies,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__in_z_opt LPCWSTR wzName
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepDependencyArrayFree - Frees an array of DEPENDENCY structs.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(void) DepDependencyArrayFree(
|
||||
__in_ecount(cDependencies) DEPENDENCY* rgDependencies,
|
||||
__in UINT cDependencies
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseDependencyArray(rg, c) if (rg) { DepDependencyArrayFree(rg, c); }
|
||||
#define ReleaseNullDependencyArray(rg, c) if (rg) { DepDependencyArrayFree(rg, c); rg = NULL; }
|
||||
|
||||
typedef struct _DEPENDENCY
|
||||
{
|
||||
LPWSTR sczKey;
|
||||
LPWSTR sczName;
|
||||
} DEPENDENCY;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DepGetProviderInformation - gets the various pieces of data registered
|
||||
with a dependency.
|
||||
|
||||
Note: Returns E_NOTFOUND if the dependency was not found.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepGetProviderInformation(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__deref_out_z_opt LPWSTR* psczId,
|
||||
__deref_out_z_opt LPWSTR* psczName,
|
||||
__out_opt DWORD64* pqwVersion
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepCheckDependency - Checks that the dependency is registered and within
|
||||
the proper version range.
|
||||
|
||||
Note: Returns E_NOTFOUND if the dependency was not found.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepCheckDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z_opt LPCWSTR wzMinVersion,
|
||||
__in_z_opt LPCWSTR wzMaxVersion,
|
||||
__in int iAttributes,
|
||||
__in STRINGDICT_HANDLE sdDependencies,
|
||||
__deref_inout_ecount_opt(*pcDependencies) DEPENDENCY** prgDependencies,
|
||||
__inout LPUINT pcDependencies
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepCheckDependents - Checks if any dependents are still installed for the
|
||||
given provider key.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepCheckDependents(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in int iAttributes,
|
||||
__in C_STRINGDICT_HANDLE sdIgnoredDependents,
|
||||
__deref_inout_ecount_opt(*pcDependents) DEPENDENCY** prgDependents,
|
||||
__inout LPUINT pcDependents
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepRegisterDependency - Registers the dependency provider.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepRegisterDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__in_z LPCWSTR wzDisplayName,
|
||||
__in_z_opt LPCWSTR wzId,
|
||||
__in int iAttributes
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepDependentExists - Determines if a dependent is registered.
|
||||
|
||||
Note: Returns S_OK if dependent is registered.
|
||||
Returns E_FILENOTFOUND if dependent is not registered
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepDependentExists(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepRegisterDependent - Registers a dependent under the dependency provider.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepRegisterDependent(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey,
|
||||
__in_z_opt LPCWSTR wzMinVersion,
|
||||
__in_z_opt LPCWSTR wzMaxVersion,
|
||||
__in int iAttributes
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepUnregisterDependency - Removes the dependency provider.
|
||||
|
||||
Note: Caller should call CheckDependents prior to remove a dependency.
|
||||
Returns E_FILENOTFOUND if the dependency is not registered.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepUnregisterDependency(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepUnregisterDependent - Removes a dependent under the dependency provider.
|
||||
|
||||
Note: Returns E_FILENOTFOUND if neither the dependency or dependent are
|
||||
registered.
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepUnregisterDependent(
|
||||
__in HKEY hkHive,
|
||||
__in_z LPCWSTR wzDependencyProviderKey,
|
||||
__in_z LPCWSTR wzProviderKey
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DependencyArrayAlloc - Allocates or expands an array of DEPENDENCY structs.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(HRESULT) DepDependencyArrayAlloc(
|
||||
__deref_inout_ecount_opt(*pcDependencies) DEPENDENCY** prgDependencies,
|
||||
__inout LPUINT pcDependencies,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__in_z_opt LPCWSTR wzName
|
||||
);
|
||||
|
||||
/***************************************************************************
|
||||
DepDependencyArrayFree - Frees an array of DEPENDENCY structs.
|
||||
|
||||
***************************************************************************/
|
||||
DAPI_(void) DepDependencyArrayFree(
|
||||
__in_ecount(cDependencies) DEPENDENCY* rgDependencies,
|
||||
__in UINT cDependencies
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,69 +1,69 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseDict(sdh) if (sdh) { DictDestroy(sdh); }
|
||||
#define ReleaseNullDict(sdh) if (sdh) { DictDestroy(sdh); sdh = NULL; }
|
||||
|
||||
typedef void* STRINGDICT_HANDLE;
|
||||
typedef const void* C_STRINGDICT_HANDLE;
|
||||
|
||||
extern const int STRINGDICT_HANDLE_BYTES;
|
||||
|
||||
typedef enum DICT_FLAG
|
||||
{
|
||||
DICT_FLAG_NONE = 0,
|
||||
DICT_FLAG_CASEINSENSITIVE = 1
|
||||
} DICT_FLAG;
|
||||
|
||||
HRESULT DAPI DictCreateWithEmbeddedKey(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in DWORD dwNumExpectedItems,
|
||||
__in_opt void **ppvArray,
|
||||
__in size_t cByteOffset,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCreateStringList(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in DWORD dwNumExpectedItems,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCreateStringListFromArray(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in_ecount(cStringArray) const LPCWSTR* rgwzStringArray,
|
||||
__in const DWORD cStringArray,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCompareStringListToArray(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdStringList,
|
||||
__in_ecount(cStringArray) const LPCWSTR* rgwzStringArray,
|
||||
__in const DWORD cStringArray
|
||||
);
|
||||
HRESULT DAPI DictAddKey(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString
|
||||
);
|
||||
HRESULT DAPI DictAddValue(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle,
|
||||
__in void *pvValue
|
||||
);
|
||||
HRESULT DAPI DictKeyExists(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString
|
||||
);
|
||||
HRESULT DAPI DictGetValue(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString,
|
||||
__out void **ppvValue
|
||||
);
|
||||
void DAPI DictDestroy(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseDict(sdh) if (sdh) { DictDestroy(sdh); }
|
||||
#define ReleaseNullDict(sdh) if (sdh) { DictDestroy(sdh); sdh = NULL; }
|
||||
|
||||
typedef void* STRINGDICT_HANDLE;
|
||||
typedef const void* C_STRINGDICT_HANDLE;
|
||||
|
||||
extern const int STRINGDICT_HANDLE_BYTES;
|
||||
|
||||
typedef enum DICT_FLAG
|
||||
{
|
||||
DICT_FLAG_NONE = 0,
|
||||
DICT_FLAG_CASEINSENSITIVE = 1
|
||||
} DICT_FLAG;
|
||||
|
||||
HRESULT DAPI DictCreateWithEmbeddedKey(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in DWORD dwNumExpectedItems,
|
||||
__in_opt void **ppvArray,
|
||||
__in size_t cByteOffset,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCreateStringList(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in DWORD dwNumExpectedItems,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCreateStringListFromArray(
|
||||
__out_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE* psdHandle,
|
||||
__in_ecount(cStringArray) const LPCWSTR* rgwzStringArray,
|
||||
__in const DWORD cStringArray,
|
||||
__in DICT_FLAG dfFlags
|
||||
);
|
||||
HRESULT DAPI DictCompareStringListToArray(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdStringList,
|
||||
__in_ecount(cStringArray) const LPCWSTR* rgwzStringArray,
|
||||
__in const DWORD cStringArray
|
||||
);
|
||||
HRESULT DAPI DictAddKey(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString
|
||||
);
|
||||
HRESULT DAPI DictAddValue(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle,
|
||||
__in void *pvValue
|
||||
);
|
||||
HRESULT DAPI DictKeyExists(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString
|
||||
);
|
||||
HRESULT DAPI DictGetValue(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) C_STRINGDICT_HANDLE sdHandle,
|
||||
__in_z LPCWSTR szString,
|
||||
__out void **ppvValue
|
||||
);
|
||||
void DAPI DictDestroy(
|
||||
__in_bcount(STRINGDICT_HANDLE_BYTES) STRINGDICT_HANDLE sdHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,59 +1,59 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
typedef enum DIR_DELETE
|
||||
{
|
||||
DIR_DELETE_FILES = 1,
|
||||
DIR_DELETE_RECURSE = 2,
|
||||
DIR_DELETE_SCHEDULE = 4,
|
||||
} DIR_DELETE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL DAPI DirExists(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
|
||||
HRESULT DAPI DirCreateTempPath(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__out_ecount_z(cchPath) LPWSTR wzPath,
|
||||
__in DWORD cchPath
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureExists(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in_opt LPSECURITY_ATTRIBUTES psa
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureDelete(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in BOOL fDeleteFiles,
|
||||
__in BOOL fRecurse
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureDeleteEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
DWORD DAPI DirDeleteEmptyDirectoriesToRoot(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
HRESULT DAPI DirGetCurrent(
|
||||
__deref_out_z LPWSTR* psczCurrentDirectory
|
||||
);
|
||||
|
||||
HRESULT DAPI DirSetCurrent(
|
||||
__in_z LPCWSTR wzDirectory
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
typedef enum DIR_DELETE
|
||||
{
|
||||
DIR_DELETE_FILES = 1,
|
||||
DIR_DELETE_RECURSE = 2,
|
||||
DIR_DELETE_SCHEDULE = 4,
|
||||
} DIR_DELETE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL DAPI DirExists(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
|
||||
HRESULT DAPI DirCreateTempPath(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__out_ecount_z(cchPath) LPWSTR wzPath,
|
||||
__in DWORD cchPath
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureExists(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in_opt LPSECURITY_ATTRIBUTES psa
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureDelete(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in BOOL fDeleteFiles,
|
||||
__in BOOL fRecurse
|
||||
);
|
||||
|
||||
HRESULT DAPI DirEnsureDeleteEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
DWORD DAPI DirDeleteEmptyDirectoriesToRoot(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwFlags
|
||||
);
|
||||
|
||||
HRESULT DAPI DirGetCurrent(
|
||||
__deref_out_z LPWSTR* psczCurrentDirectory
|
||||
);
|
||||
|
||||
HRESULT DAPI DirSetCurrent(
|
||||
__in_z LPCWSTR wzDirectory
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef HRESULT (WINAPI *LPAUTHENTICATION_ROUTINE)(
|
||||
__in LPVOID pVoid,
|
||||
__in HINTERNET hUrl,
|
||||
__in long lHttpCode,
|
||||
__out BOOL* pfRetrySend,
|
||||
__out BOOL* pfRetry
|
||||
);
|
||||
|
||||
typedef int (WINAPI *LPCANCEL_ROUTINE)(
|
||||
__in HRESULT hrError,
|
||||
__in_z_opt LPCWSTR wzError,
|
||||
__in BOOL fAllowRetry,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
// structs
|
||||
typedef struct _DOWNLOAD_SOURCE
|
||||
{
|
||||
LPWSTR sczUrl;
|
||||
LPWSTR sczUser;
|
||||
LPWSTR sczPassword;
|
||||
} DOWNLOAD_SOURCE;
|
||||
|
||||
typedef struct _DOWNLOAD_CACHE_CALLBACK
|
||||
{
|
||||
LPPROGRESS_ROUTINE pfnProgress;
|
||||
LPCANCEL_ROUTINE pfnCancel;
|
||||
LPVOID pv;
|
||||
} DOWNLOAD_CACHE_CALLBACK;
|
||||
|
||||
typedef struct _DOWNLOAD_AUTHENTICATION_CALLBACK
|
||||
{
|
||||
LPAUTHENTICATION_ROUTINE pfnAuthenticate;
|
||||
LPVOID pv;
|
||||
} DOWNLOAD_AUTHENTICATION_CALLBACK;
|
||||
|
||||
|
||||
// functions
|
||||
|
||||
HRESULT DAPI DownloadUrl(
|
||||
__in DOWNLOAD_SOURCE* pDownloadSource,
|
||||
__in DWORD64 dw64AuthoredDownloadSize,
|
||||
__in LPCWSTR wzDestinationPath,
|
||||
__in_opt DOWNLOAD_CACHE_CALLBACK* pCache,
|
||||
__in_opt DOWNLOAD_AUTHENTICATION_CALLBACK* pAuthenticate
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef HRESULT (WINAPI *LPAUTHENTICATION_ROUTINE)(
|
||||
__in LPVOID pVoid,
|
||||
__in HINTERNET hUrl,
|
||||
__in long lHttpCode,
|
||||
__out BOOL* pfRetrySend,
|
||||
__out BOOL* pfRetry
|
||||
);
|
||||
|
||||
typedef int (WINAPI *LPCANCEL_ROUTINE)(
|
||||
__in HRESULT hrError,
|
||||
__in_z_opt LPCWSTR wzError,
|
||||
__in BOOL fAllowRetry,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
// structs
|
||||
typedef struct _DOWNLOAD_SOURCE
|
||||
{
|
||||
LPWSTR sczUrl;
|
||||
LPWSTR sczUser;
|
||||
LPWSTR sczPassword;
|
||||
} DOWNLOAD_SOURCE;
|
||||
|
||||
typedef struct _DOWNLOAD_CACHE_CALLBACK
|
||||
{
|
||||
LPPROGRESS_ROUTINE pfnProgress;
|
||||
LPCANCEL_ROUTINE pfnCancel;
|
||||
LPVOID pv;
|
||||
} DOWNLOAD_CACHE_CALLBACK;
|
||||
|
||||
typedef struct _DOWNLOAD_AUTHENTICATION_CALLBACK
|
||||
{
|
||||
LPAUTHENTICATION_ROUTINE pfnAuthenticate;
|
||||
LPVOID pv;
|
||||
} DOWNLOAD_AUTHENTICATION_CALLBACK;
|
||||
|
||||
|
||||
// functions
|
||||
|
||||
HRESULT DAPI DownloadUrl(
|
||||
__in DOWNLOAD_SOURCE* pDownloadSource,
|
||||
__in DWORD64 dw64AuthoredDownloadSize,
|
||||
__in LPCWSTR wzDestinationPath,
|
||||
__in_opt DOWNLOAD_CACHE_CALLBACK* pCache,
|
||||
__in_opt DOWNLOAD_AUTHENTICATION_CALLBACK* pAuthenticate
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+214
-214
@@ -1,214 +1,214 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define DAPI __stdcall
|
||||
#define DAPIV __cdecl // used only for functions taking variable length arguments
|
||||
|
||||
#define DAPI_(type) EXTERN_C type DAPI
|
||||
#define DAPIV_(type) EXTERN_C type DAPIV
|
||||
|
||||
|
||||
// enums
|
||||
typedef enum REPORT_LEVEL
|
||||
{
|
||||
REPORT_NONE, // turns off report (only valid for XXXSetLevel())
|
||||
REPORT_WARNING, // written if want only warnings or reporting is on in general
|
||||
REPORT_STANDARD, // written if reporting is on
|
||||
REPORT_VERBOSE, // written only if verbose reporting is on
|
||||
REPORT_DEBUG, // reporting useful when debugging code
|
||||
REPORT_ERROR, // always gets reported, but can never be specified
|
||||
} REPORT_LEVEL;
|
||||
|
||||
// asserts and traces
|
||||
typedef BOOL (DAPI *DUTIL_ASSERTDISPLAYFUNCTION)(__in_z LPCSTR sz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void DAPI Dutil_SetAssertModule(__in HMODULE hAssertModule);
|
||||
void DAPI Dutil_SetAssertDisplayFunction(__in DUTIL_ASSERTDISPLAYFUNCTION pfn);
|
||||
void DAPI Dutil_Assert(__in_z LPCSTR szFile, __in int iLine);
|
||||
void DAPI Dutil_AssertSz(__in_z LPCSTR szFile, __in int iLine, __in_z LPCSTR szMessage);
|
||||
|
||||
void DAPI Dutil_TraceSetLevel(__in REPORT_LEVEL ll, __in BOOL fTraceFilenames);
|
||||
REPORT_LEVEL DAPI Dutil_TraceGetLevel();
|
||||
void __cdecl Dutil_Trace(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in_z __format_string LPCSTR szMessage, ...);
|
||||
void __cdecl Dutil_TraceError(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in HRESULT hr, __in_z __format_string LPCSTR szMessage, ...);
|
||||
void DAPI Dutil_RootFailure(__in_z LPCSTR szFile, __in int iLine, __in HRESULT hrError);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#define AssertSetModule(m) (void)Dutil_SetAssertModule(m)
|
||||
#define AssertSetDisplayFunction(pfn) (void)Dutil_SetAssertDisplayFunction(pfn)
|
||||
#define Assert(f) ((f) ? (void)0 : (void)Dutil_Assert(__FILE__, __LINE__))
|
||||
#define AssertSz(f, sz) ((f) ? (void)0 : (void)Dutil_AssertSz(__FILE__, __LINE__, sz))
|
||||
|
||||
#define TraceSetLevel(l, f) (void)Dutil_TraceSetLevel(l, f)
|
||||
#define TraceGetLevel() (REPORT_LEVEL)Dutil_TraceGetLevel()
|
||||
#define Trace(l, f, ...) (void)Dutil_Trace(__FILE__, __LINE__, l, f, __VA_ARGS__)
|
||||
#define TraceError(x, f, ...) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, __VA_ARGS__)
|
||||
#define TraceErrorDebug(x, f, ...) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, __VA_ARGS__)
|
||||
|
||||
#else // !DEBUG
|
||||
|
||||
#define AssertSetModule(m)
|
||||
#define AssertSetDisplayFunction(pfn)
|
||||
#define Assert(f)
|
||||
#define AssertSz(f, sz)
|
||||
|
||||
#define TraceSetLevel(l, f)
|
||||
#define Trace(l, f, ...)
|
||||
#define TraceError(x, f, ...)
|
||||
#define TraceErrorDebug(x, f, ...)
|
||||
|
||||
#endif // DEBUG
|
||||
|
||||
#define Trace1 Trace
|
||||
#define Trace2 Trace
|
||||
#define Trace3 Trace
|
||||
|
||||
#define TraceError1 TraceError
|
||||
#define TraceError2 TraceError
|
||||
#define TraceError3 TraceError
|
||||
|
||||
#define TraceErrorDebug1 TraceErrorDebug
|
||||
#define TraceErrorDebug2 TraceErrorDebug
|
||||
#define TraceErrorDebug3 TraceErrorDebug
|
||||
|
||||
// ExitTrace can be overriden
|
||||
#ifndef ExitTrace
|
||||
#define ExitTrace TraceError
|
||||
#endif
|
||||
#ifndef ExitTrace1
|
||||
#define ExitTrace1 TraceError1
|
||||
#endif
|
||||
#ifndef ExitTrace2
|
||||
#define ExitTrace2 TraceError2
|
||||
#endif
|
||||
#ifndef ExitTrace3
|
||||
#define ExitTrace3 TraceError3
|
||||
#endif
|
||||
|
||||
// Exit macros
|
||||
#define ExitFunction() { goto LExit; }
|
||||
#define ExitFunction1(x) { x; goto LExit; }
|
||||
|
||||
#define ExitFunctionWithLastError(x) { x = HRESULT_FROM_WIN32(::GetLastError()); goto LExit; }
|
||||
|
||||
#define ExitOnLastError(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; } }
|
||||
#define ExitOnLastError1 ExitOnLastError
|
||||
#define ExitOnLastError2 ExitOnLastError
|
||||
|
||||
#define ExitOnLastErrorDebugTrace(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; } }
|
||||
#define ExitOnLastErrorDebugTrace1 ExitOnLastErrorDebugTrace
|
||||
#define ExitOnLastErrorDebugTrace2 ExitOnLastErrorDebugTrace
|
||||
|
||||
#define ExitWithLastError(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitWithLastError1 ExitWithLastError
|
||||
#define ExitWithLastError2 ExitWithLastError
|
||||
#define ExitWithLastError3 ExitWithLastError
|
||||
|
||||
#define ExitOnFailure(x, s, ...) if (FAILED(x)) { ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnFailure1 ExitOnFailure
|
||||
#define ExitOnFailure2 ExitOnFailure
|
||||
#define ExitOnFailure3 ExitOnFailure
|
||||
|
||||
#define ExitOnRootFailure(x, s, ...) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnRootFailure1 ExitOnRootFailure
|
||||
#define ExitOnRootFailure2 ExitOnRootFailure
|
||||
#define ExitOnRootFailure3 ExitOnRootFailure
|
||||
|
||||
#define ExitOnFailureDebugTrace(x, s, ...) if (FAILED(x)) { TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnFailureDebugTrace1 ExitOnFailureDebugTrace
|
||||
#define ExitOnFailureDebugTrace2 ExitOnFailureDebugTrace
|
||||
#define ExitOnFailureDebugTrace3 ExitOnFailureDebugTrace
|
||||
|
||||
#define ExitOnNull(p, x, e, s, ...) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNull1 ExitOnNull
|
||||
#define ExitOnNull2 ExitOnNull
|
||||
|
||||
#define ExitOnNullWithLastError(p, x, s, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNullWithLastError1 ExitOnNullWithLastError
|
||||
|
||||
#define ExitOnNullDebugTrace(p, x, e, s, ...) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNullDebugTrace1 ExitOnNullDebugTrace
|
||||
|
||||
#define ExitOnInvalidHandleWithLastError(p, x, s, ...) if (INVALID_HANDLE_VALUE == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnInvalidHandleWithLastError1 ExitOnInvalidHandleWithLastError
|
||||
|
||||
#define ExitOnWin32Error(e, x, s, ...) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnWin32Error1 ExitOnWin32Error
|
||||
#define ExitOnWin32Error2 ExitOnWin32Error
|
||||
|
||||
// release macros
|
||||
#define ReleaseObject(x) if (x) { x->Release(); }
|
||||
#define ReleaseObjectArray(prg, cel) if (prg) { for (DWORD Dutil_ReleaseObjectArrayIndex = 0; Dutil_ReleaseObjectArrayIndex < cel; ++Dutil_ReleaseObjectArrayIndex) { ReleaseObject(prg[Dutil_ReleaseObjectArrayIndex]); } ReleaseMem(prg); }
|
||||
#define ReleaseVariant(x) { ::VariantClear(&x); }
|
||||
#define ReleaseNullObject(x) if (x) { (x)->Release(); x = NULL; }
|
||||
#define ReleaseCertificate(x) if (x) { ::CertFreeCertificateContext(x); x=NULL; }
|
||||
#define ReleaseHandle(x) if (x) { ::CloseHandle(x); x = NULL; }
|
||||
|
||||
|
||||
// useful defines and macros
|
||||
#define Unused(x) ((void)x)
|
||||
|
||||
#ifndef countof
|
||||
#if 1
|
||||
#define countof(ary) (sizeof(ary) / sizeof(ary[0]))
|
||||
#else
|
||||
#ifndef __cplusplus
|
||||
#define countof(ary) (sizeof(ary) / sizeof(ary[0]))
|
||||
#else
|
||||
template<typename T> static char countofVerify(void const *, T) throw() { return 0; }
|
||||
template<typename T> static void countofVerify(T *const, T *const *) throw() {};
|
||||
#define countof(arr) (sizeof(countofVerify(arr,&(arr))) * sizeof(arr)/sizeof(*(arr)))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define roundup(x, n) roundup_typed(x, n, DWORD)
|
||||
#define roundup_typed(x, n, t) (((t)(x) + ((t)(n) - 1)) & ~((t)(n) - 1))
|
||||
|
||||
#define HRESULT_FROM_RPC(x) ((HRESULT) ((x) | FACILITY_RPC))
|
||||
|
||||
#ifndef MAXSIZE_T
|
||||
#define MAXSIZE_T ((SIZE_T)~((SIZE_T)0))
|
||||
#endif
|
||||
|
||||
typedef const BYTE* LPCBYTE;
|
||||
|
||||
#define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
|
||||
#define E_PATHNOTFOUND HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)
|
||||
#define E_INVALIDDATA HRESULT_FROM_WIN32(ERROR_INVALID_DATA)
|
||||
#define E_INVALIDSTATE HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
|
||||
#define E_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
|
||||
#define E_MOREDATA HRESULT_FROM_WIN32(ERROR_MORE_DATA)
|
||||
#define E_NOMOREITEMS HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)
|
||||
#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
|
||||
#define E_MODNOTFOUND HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)
|
||||
#define E_BADCONFIGURATION HRESULT_FROM_WIN32(ERROR_BAD_CONFIGURATION)
|
||||
|
||||
#define AddRefAndRelease(x) { x->AddRef(); x->Release(); }
|
||||
|
||||
#define MAKEDWORD(lo, hi) ((DWORD)MAKELONG(lo, hi))
|
||||
#define MAKEQWORDVERSION(mj, mi, b, r) (((DWORD64)MAKELONG(r, b)) | (((DWORD64)MAKELONG(mi, mj)) << 32))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// other functions
|
||||
HRESULT DAPI LoadSystemLibrary(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule);
|
||||
HRESULT DAPI LoadSystemLibraryWithPath(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule, __deref_out_z_opt LPWSTR* psczPath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define DAPI __stdcall
|
||||
#define DAPIV __cdecl // used only for functions taking variable length arguments
|
||||
|
||||
#define DAPI_(type) EXTERN_C type DAPI
|
||||
#define DAPIV_(type) EXTERN_C type DAPIV
|
||||
|
||||
|
||||
// enums
|
||||
typedef enum REPORT_LEVEL
|
||||
{
|
||||
REPORT_NONE, // turns off report (only valid for XXXSetLevel())
|
||||
REPORT_WARNING, // written if want only warnings or reporting is on in general
|
||||
REPORT_STANDARD, // written if reporting is on
|
||||
REPORT_VERBOSE, // written only if verbose reporting is on
|
||||
REPORT_DEBUG, // reporting useful when debugging code
|
||||
REPORT_ERROR, // always gets reported, but can never be specified
|
||||
} REPORT_LEVEL;
|
||||
|
||||
// asserts and traces
|
||||
typedef BOOL (DAPI *DUTIL_ASSERTDISPLAYFUNCTION)(__in_z LPCSTR sz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void DAPI Dutil_SetAssertModule(__in HMODULE hAssertModule);
|
||||
void DAPI Dutil_SetAssertDisplayFunction(__in DUTIL_ASSERTDISPLAYFUNCTION pfn);
|
||||
void DAPI Dutil_Assert(__in_z LPCSTR szFile, __in int iLine);
|
||||
void DAPI Dutil_AssertSz(__in_z LPCSTR szFile, __in int iLine, __in_z LPCSTR szMessage);
|
||||
|
||||
void DAPI Dutil_TraceSetLevel(__in REPORT_LEVEL ll, __in BOOL fTraceFilenames);
|
||||
REPORT_LEVEL DAPI Dutil_TraceGetLevel();
|
||||
void __cdecl Dutil_Trace(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in_z __format_string LPCSTR szMessage, ...);
|
||||
void __cdecl Dutil_TraceError(__in_z LPCSTR szFile, __in int iLine, __in REPORT_LEVEL rl, __in HRESULT hr, __in_z __format_string LPCSTR szMessage, ...);
|
||||
void DAPI Dutil_RootFailure(__in_z LPCSTR szFile, __in int iLine, __in HRESULT hrError);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#define AssertSetModule(m) (void)Dutil_SetAssertModule(m)
|
||||
#define AssertSetDisplayFunction(pfn) (void)Dutil_SetAssertDisplayFunction(pfn)
|
||||
#define Assert(f) ((f) ? (void)0 : (void)Dutil_Assert(__FILE__, __LINE__))
|
||||
#define AssertSz(f, sz) ((f) ? (void)0 : (void)Dutil_AssertSz(__FILE__, __LINE__, sz))
|
||||
|
||||
#define TraceSetLevel(l, f) (void)Dutil_TraceSetLevel(l, f)
|
||||
#define TraceGetLevel() (REPORT_LEVEL)Dutil_TraceGetLevel()
|
||||
#define Trace(l, f, ...) (void)Dutil_Trace(__FILE__, __LINE__, l, f, __VA_ARGS__)
|
||||
#define TraceError(x, f, ...) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_ERROR, x, f, __VA_ARGS__)
|
||||
#define TraceErrorDebug(x, f, ...) (void)Dutil_TraceError(__FILE__, __LINE__, REPORT_DEBUG, x, f, __VA_ARGS__)
|
||||
|
||||
#else // !DEBUG
|
||||
|
||||
#define AssertSetModule(m)
|
||||
#define AssertSetDisplayFunction(pfn)
|
||||
#define Assert(f)
|
||||
#define AssertSz(f, sz)
|
||||
|
||||
#define TraceSetLevel(l, f)
|
||||
#define Trace(l, f, ...)
|
||||
#define TraceError(x, f, ...)
|
||||
#define TraceErrorDebug(x, f, ...)
|
||||
|
||||
#endif // DEBUG
|
||||
|
||||
#define Trace1 Trace
|
||||
#define Trace2 Trace
|
||||
#define Trace3 Trace
|
||||
|
||||
#define TraceError1 TraceError
|
||||
#define TraceError2 TraceError
|
||||
#define TraceError3 TraceError
|
||||
|
||||
#define TraceErrorDebug1 TraceErrorDebug
|
||||
#define TraceErrorDebug2 TraceErrorDebug
|
||||
#define TraceErrorDebug3 TraceErrorDebug
|
||||
|
||||
// ExitTrace can be overriden
|
||||
#ifndef ExitTrace
|
||||
#define ExitTrace TraceError
|
||||
#endif
|
||||
#ifndef ExitTrace1
|
||||
#define ExitTrace1 TraceError1
|
||||
#endif
|
||||
#ifndef ExitTrace2
|
||||
#define ExitTrace2 TraceError2
|
||||
#endif
|
||||
#ifndef ExitTrace3
|
||||
#define ExitTrace3 TraceError3
|
||||
#endif
|
||||
|
||||
// Exit macros
|
||||
#define ExitFunction() { goto LExit; }
|
||||
#define ExitFunction1(x) { x; goto LExit; }
|
||||
|
||||
#define ExitFunctionWithLastError(x) { x = HRESULT_FROM_WIN32(::GetLastError()); goto LExit; }
|
||||
|
||||
#define ExitOnLastError(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; } }
|
||||
#define ExitOnLastError1 ExitOnLastError
|
||||
#define ExitOnLastError2 ExitOnLastError
|
||||
|
||||
#define ExitOnLastErrorDebugTrace(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; } }
|
||||
#define ExitOnLastErrorDebugTrace1 ExitOnLastErrorDebugTrace
|
||||
#define ExitOnLastErrorDebugTrace2 ExitOnLastErrorDebugTrace
|
||||
|
||||
#define ExitWithLastError(x, s, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitWithLastError1 ExitWithLastError
|
||||
#define ExitWithLastError2 ExitWithLastError
|
||||
#define ExitWithLastError3 ExitWithLastError
|
||||
|
||||
#define ExitOnFailure(x, s, ...) if (FAILED(x)) { ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnFailure1 ExitOnFailure
|
||||
#define ExitOnFailure2 ExitOnFailure
|
||||
#define ExitOnFailure3 ExitOnFailure
|
||||
|
||||
#define ExitOnRootFailure(x, s, ...) if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnRootFailure1 ExitOnRootFailure
|
||||
#define ExitOnRootFailure2 ExitOnRootFailure
|
||||
#define ExitOnRootFailure3 ExitOnRootFailure
|
||||
|
||||
#define ExitOnFailureDebugTrace(x, s, ...) if (FAILED(x)) { TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnFailureDebugTrace1 ExitOnFailureDebugTrace
|
||||
#define ExitOnFailureDebugTrace2 ExitOnFailureDebugTrace
|
||||
#define ExitOnFailureDebugTrace3 ExitOnFailureDebugTrace
|
||||
|
||||
#define ExitOnNull(p, x, e, s, ...) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNull1 ExitOnNull
|
||||
#define ExitOnNull2 ExitOnNull
|
||||
|
||||
#define ExitOnNullWithLastError(p, x, s, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNullWithLastError1 ExitOnNullWithLastError
|
||||
|
||||
#define ExitOnNullDebugTrace(p, x, e, s, ...) if (NULL == p) { x = e; Dutil_RootFailure(__FILE__, __LINE__, x); TraceErrorDebug(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnNullDebugTrace1 ExitOnNullDebugTrace
|
||||
|
||||
#define ExitOnInvalidHandleWithLastError(p, x, s, ...) if (INVALID_HANDLE_VALUE == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnInvalidHandleWithLastError1 ExitOnInvalidHandleWithLastError
|
||||
|
||||
#define ExitOnWin32Error(e, x, s, ...) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s, __VA_ARGS__); goto LExit; }
|
||||
#define ExitOnWin32Error1 ExitOnWin32Error
|
||||
#define ExitOnWin32Error2 ExitOnWin32Error
|
||||
|
||||
// release macros
|
||||
#define ReleaseObject(x) if (x) { x->Release(); }
|
||||
#define ReleaseObjectArray(prg, cel) if (prg) { for (DWORD Dutil_ReleaseObjectArrayIndex = 0; Dutil_ReleaseObjectArrayIndex < cel; ++Dutil_ReleaseObjectArrayIndex) { ReleaseObject(prg[Dutil_ReleaseObjectArrayIndex]); } ReleaseMem(prg); }
|
||||
#define ReleaseVariant(x) { ::VariantClear(&x); }
|
||||
#define ReleaseNullObject(x) if (x) { (x)->Release(); x = NULL; }
|
||||
#define ReleaseCertificate(x) if (x) { ::CertFreeCertificateContext(x); x=NULL; }
|
||||
#define ReleaseHandle(x) if (x) { ::CloseHandle(x); x = NULL; }
|
||||
|
||||
|
||||
// useful defines and macros
|
||||
#define Unused(x) ((void)x)
|
||||
|
||||
#ifndef countof
|
||||
#if 1
|
||||
#define countof(ary) (sizeof(ary) / sizeof(ary[0]))
|
||||
#else
|
||||
#ifndef __cplusplus
|
||||
#define countof(ary) (sizeof(ary) / sizeof(ary[0]))
|
||||
#else
|
||||
template<typename T> static char countofVerify(void const *, T) throw() { return 0; }
|
||||
template<typename T> static void countofVerify(T *const, T *const *) throw() {};
|
||||
#define countof(arr) (sizeof(countofVerify(arr,&(arr))) * sizeof(arr)/sizeof(*(arr)))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define roundup(x, n) roundup_typed(x, n, DWORD)
|
||||
#define roundup_typed(x, n, t) (((t)(x) + ((t)(n) - 1)) & ~((t)(n) - 1))
|
||||
|
||||
#define HRESULT_FROM_RPC(x) ((HRESULT) ((x) | FACILITY_RPC))
|
||||
|
||||
#ifndef MAXSIZE_T
|
||||
#define MAXSIZE_T ((SIZE_T)~((SIZE_T)0))
|
||||
#endif
|
||||
|
||||
typedef const BYTE* LPCBYTE;
|
||||
|
||||
#define E_FILENOTFOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
|
||||
#define E_PATHNOTFOUND HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)
|
||||
#define E_INVALIDDATA HRESULT_FROM_WIN32(ERROR_INVALID_DATA)
|
||||
#define E_INVALIDSTATE HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
|
||||
#define E_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
|
||||
#define E_MOREDATA HRESULT_FROM_WIN32(ERROR_MORE_DATA)
|
||||
#define E_NOMOREITEMS HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)
|
||||
#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
|
||||
#define E_MODNOTFOUND HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)
|
||||
#define E_BADCONFIGURATION HRESULT_FROM_WIN32(ERROR_BAD_CONFIGURATION)
|
||||
|
||||
#define AddRefAndRelease(x) { x->AddRef(); x->Release(); }
|
||||
|
||||
#define MAKEDWORD(lo, hi) ((DWORD)MAKELONG(lo, hi))
|
||||
#define MAKEQWORDVERSION(mj, mi, b, r) (((DWORD64)MAKELONG(r, b)) | (((DWORD64)MAKELONG(mi, mj)) << 32))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// other functions
|
||||
HRESULT DAPI LoadSystemLibrary(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule);
|
||||
HRESULT DAPI LoadSystemLibraryWithPath(__in_z LPCWSTR wzModuleName, __out HMODULE *phModule, __deref_out_z_opt LPWSTR* psczPath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+223
-223
@@ -1,223 +1,223 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); }
|
||||
#define ReleaseNullEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); pqh = NULL; }
|
||||
|
||||
struct ESE_COLUMN_SCHEMA
|
||||
{
|
||||
JET_COLUMNID jcColumn;
|
||||
LPCWSTR pszName;
|
||||
JET_COLTYP jcColumnType;
|
||||
BOOL fKey; // If this column is part of the key of the table
|
||||
BOOL fFixed;
|
||||
BOOL fNullable;
|
||||
BOOL fAutoIncrement;
|
||||
};
|
||||
|
||||
struct ESE_TABLE_SCHEMA
|
||||
{
|
||||
JET_TABLEID jtTable;
|
||||
LPCWSTR pszName;
|
||||
DWORD dwColumns;
|
||||
ESE_COLUMN_SCHEMA *pcsColumns;
|
||||
};
|
||||
|
||||
struct ESE_DATABASE_SCHEMA
|
||||
{
|
||||
DWORD dwTables;
|
||||
ESE_TABLE_SCHEMA *ptsTables;
|
||||
};
|
||||
|
||||
typedef enum ESE_QUERY_TYPE
|
||||
{
|
||||
ESE_QUERY_EXACT,
|
||||
ESE_QUERY_FROM_TOP,
|
||||
ESE_QUERY_FROM_BOTTOM
|
||||
} ESE_QUERY_TYPE;
|
||||
|
||||
typedef void* ESE_QUERY_HANDLE;
|
||||
|
||||
HRESULT DAPI EseBeginSession(
|
||||
__out JET_INSTANCE *pjiInstance,
|
||||
__out JET_SESID *pjsSession,
|
||||
__in_z LPCWSTR pszInstance,
|
||||
__in_z LPCWSTR pszPath
|
||||
);
|
||||
HRESULT DAPI EseEndSession(
|
||||
__in JET_INSTANCE jiInstance,
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EseEnsureDatabase(
|
||||
__in JET_SESID jsSession,
|
||||
__in_z LPCWSTR pszFile,
|
||||
__in ESE_DATABASE_SCHEMA *pdsSchema,
|
||||
__out JET_DBID* pjdbDb,
|
||||
__in BOOL fExclusive,
|
||||
__in BOOL fReadonly
|
||||
);
|
||||
HRESULT DAPI EseCloseDatabase(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb
|
||||
);
|
||||
HRESULT DAPI EseCreateTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb,
|
||||
__in_z LPCWSTR pszTable,
|
||||
__out JET_TABLEID *pjtTable
|
||||
);
|
||||
HRESULT DAPI EseOpenTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb,
|
||||
__in_z LPCWSTR pszTable,
|
||||
__out JET_TABLEID *pjtTable
|
||||
);
|
||||
HRESULT DAPI EseCloseTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable
|
||||
);
|
||||
HRESULT DAPI EseEnsureColumn(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in_z LPCWSTR pszColumnName,
|
||||
__in JET_COLTYP jcColumnType,
|
||||
__in ULONG ulColumnSize,
|
||||
__in BOOL fFixed,
|
||||
__in BOOL fNullable,
|
||||
__out_opt JET_COLUMNID *pjcColumn
|
||||
);
|
||||
HRESULT DAPI EseGetColumn(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in_z LPCWSTR pszColumnName,
|
||||
__out JET_COLUMNID *pjcColumn
|
||||
);
|
||||
HRESULT DAPI EseMoveCursor(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in LONG lRow
|
||||
);
|
||||
HRESULT DAPI EseDeleteRow(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable
|
||||
);
|
||||
HRESULT DAPI EseBeginTransaction(
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EseRollbackTransaction(
|
||||
__in JET_SESID jsSession,
|
||||
__in BOOL fAll
|
||||
);
|
||||
HRESULT DAPI EseCommitTransaction(
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EsePrepareUpdate(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in ULONG ulPrep
|
||||
);
|
||||
HRESULT DAPI EseFinishUpdate(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in BOOL fSeekToInsertedRecord
|
||||
);
|
||||
HRESULT DAPI EseSetColumnBinary(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI EseSetColumnDword(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnBool(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in BOOL fValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnString(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in_z LPCWSTR pszValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnEmpty(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn
|
||||
);
|
||||
HRESULT DAPI EseGetColumnBinary(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer
|
||||
);
|
||||
HRESULT DAPI EseGetColumnDword(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out DWORD *pdwValue
|
||||
);
|
||||
HRESULT DAPI EseGetColumnBool(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out BOOL *pfValue
|
||||
);
|
||||
HRESULT DAPI EseGetColumnString(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out LPWSTR *ppszValue
|
||||
);
|
||||
|
||||
// Call this once for each key column in the table
|
||||
HRESULT DAPI EseBeginQuery(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in ESE_QUERY_TYPE qtQueryType,
|
||||
__out ESE_QUERY_HANDLE *peqhHandle
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnBinary(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnDword(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in DWORD dwData,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnBool(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in BOOL fValue,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnString(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in_z LPCWSTR pszString,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseFinishQuery(
|
||||
__in ESE_QUERY_HANDLE eqhHandle
|
||||
);
|
||||
// Once all columns have been set up, call this and read the result
|
||||
HRESULT DAPI EseRunQuery(
|
||||
__in ESE_QUERY_HANDLE eqhHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); }
|
||||
#define ReleaseNullEseQuery(pqh) if (pqh) { EseFinishQuery(pqh); pqh = NULL; }
|
||||
|
||||
struct ESE_COLUMN_SCHEMA
|
||||
{
|
||||
JET_COLUMNID jcColumn;
|
||||
LPCWSTR pszName;
|
||||
JET_COLTYP jcColumnType;
|
||||
BOOL fKey; // If this column is part of the key of the table
|
||||
BOOL fFixed;
|
||||
BOOL fNullable;
|
||||
BOOL fAutoIncrement;
|
||||
};
|
||||
|
||||
struct ESE_TABLE_SCHEMA
|
||||
{
|
||||
JET_TABLEID jtTable;
|
||||
LPCWSTR pszName;
|
||||
DWORD dwColumns;
|
||||
ESE_COLUMN_SCHEMA *pcsColumns;
|
||||
};
|
||||
|
||||
struct ESE_DATABASE_SCHEMA
|
||||
{
|
||||
DWORD dwTables;
|
||||
ESE_TABLE_SCHEMA *ptsTables;
|
||||
};
|
||||
|
||||
typedef enum ESE_QUERY_TYPE
|
||||
{
|
||||
ESE_QUERY_EXACT,
|
||||
ESE_QUERY_FROM_TOP,
|
||||
ESE_QUERY_FROM_BOTTOM
|
||||
} ESE_QUERY_TYPE;
|
||||
|
||||
typedef void* ESE_QUERY_HANDLE;
|
||||
|
||||
HRESULT DAPI EseBeginSession(
|
||||
__out JET_INSTANCE *pjiInstance,
|
||||
__out JET_SESID *pjsSession,
|
||||
__in_z LPCWSTR pszInstance,
|
||||
__in_z LPCWSTR pszPath
|
||||
);
|
||||
HRESULT DAPI EseEndSession(
|
||||
__in JET_INSTANCE jiInstance,
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EseEnsureDatabase(
|
||||
__in JET_SESID jsSession,
|
||||
__in_z LPCWSTR pszFile,
|
||||
__in ESE_DATABASE_SCHEMA *pdsSchema,
|
||||
__out JET_DBID* pjdbDb,
|
||||
__in BOOL fExclusive,
|
||||
__in BOOL fReadonly
|
||||
);
|
||||
HRESULT DAPI EseCloseDatabase(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb
|
||||
);
|
||||
HRESULT DAPI EseCreateTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb,
|
||||
__in_z LPCWSTR pszTable,
|
||||
__out JET_TABLEID *pjtTable
|
||||
);
|
||||
HRESULT DAPI EseOpenTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_DBID jdbDb,
|
||||
__in_z LPCWSTR pszTable,
|
||||
__out JET_TABLEID *pjtTable
|
||||
);
|
||||
HRESULT DAPI EseCloseTable(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable
|
||||
);
|
||||
HRESULT DAPI EseEnsureColumn(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in_z LPCWSTR pszColumnName,
|
||||
__in JET_COLTYP jcColumnType,
|
||||
__in ULONG ulColumnSize,
|
||||
__in BOOL fFixed,
|
||||
__in BOOL fNullable,
|
||||
__out_opt JET_COLUMNID *pjcColumn
|
||||
);
|
||||
HRESULT DAPI EseGetColumn(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in_z LPCWSTR pszColumnName,
|
||||
__out JET_COLUMNID *pjcColumn
|
||||
);
|
||||
HRESULT DAPI EseMoveCursor(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in LONG lRow
|
||||
);
|
||||
HRESULT DAPI EseDeleteRow(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable
|
||||
);
|
||||
HRESULT DAPI EseBeginTransaction(
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EseRollbackTransaction(
|
||||
__in JET_SESID jsSession,
|
||||
__in BOOL fAll
|
||||
);
|
||||
HRESULT DAPI EseCommitTransaction(
|
||||
__in JET_SESID jsSession
|
||||
);
|
||||
HRESULT DAPI EsePrepareUpdate(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in ULONG ulPrep
|
||||
);
|
||||
HRESULT DAPI EseFinishUpdate(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in BOOL fSeekToInsertedRecord
|
||||
);
|
||||
HRESULT DAPI EseSetColumnBinary(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI EseSetColumnDword(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnBool(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in BOOL fValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnString(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__in_z LPCWSTR pszValue
|
||||
);
|
||||
HRESULT DAPI EseSetColumnEmpty(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn
|
||||
);
|
||||
HRESULT DAPI EseGetColumnBinary(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__deref_out_bcount(*piBuffer) BYTE** ppbBuffer,
|
||||
__inout SIZE_T* piBuffer
|
||||
);
|
||||
HRESULT DAPI EseGetColumnDword(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out DWORD *pdwValue
|
||||
);
|
||||
HRESULT DAPI EseGetColumnBool(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out BOOL *pfValue
|
||||
);
|
||||
HRESULT DAPI EseGetColumnString(
|
||||
__in JET_SESID jsSession,
|
||||
__in ESE_TABLE_SCHEMA tsTable,
|
||||
__in DWORD dwColumn,
|
||||
__out LPWSTR *ppszValue
|
||||
);
|
||||
|
||||
// Call this once for each key column in the table
|
||||
HRESULT DAPI EseBeginQuery(
|
||||
__in JET_SESID jsSession,
|
||||
__in JET_TABLEID jtTable,
|
||||
__in ESE_QUERY_TYPE qtQueryType,
|
||||
__out ESE_QUERY_HANDLE *peqhHandle
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnBinary(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnDword(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in DWORD dwData,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnBool(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in BOOL fValue,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseSetQueryColumnString(
|
||||
__in ESE_QUERY_HANDLE eqhHandle,
|
||||
__in_z LPCWSTR pszString,
|
||||
__in BOOL fFinal // If this is true, all other key columns in the query will be set to "*"
|
||||
);
|
||||
HRESULT DAPI EseFinishQuery(
|
||||
__in ESE_QUERY_HANDLE eqhHandle
|
||||
);
|
||||
// Once all columns have been set up, call this and read the result
|
||||
HRESULT DAPI EseRunQuery(
|
||||
__in ESE_QUERY_HANDLE eqhHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+219
-219
@@ -1,219 +1,219 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseFile(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; }
|
||||
#define ReleaseFileHandle(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; }
|
||||
#define ReleaseFileFindHandle(h) if (INVALID_HANDLE_VALUE != h) { ::FindClose(h); h = INVALID_HANDLE_VALUE; }
|
||||
|
||||
#define FILEMAKEVERSION(major, minor, build, revision) static_cast<DWORD64>((static_cast<DWORD64>(major & 0xFFFF) << 48) \
|
||||
| (static_cast<DWORD64>(minor & 0xFFFF) << 32) \
|
||||
| (static_cast<DWORD64>(build & 0xFFFF) << 16) \
|
||||
| (static_cast<DWORD64>(revision & 0xFFFF)))
|
||||
|
||||
typedef enum FILE_ARCHITECTURE
|
||||
{
|
||||
FILE_ARCHITECTURE_UNKNOWN,
|
||||
FILE_ARCHITECTURE_X86,
|
||||
FILE_ARCHITECTURE_X64,
|
||||
FILE_ARCHITECTURE_IA64,
|
||||
} FILE_ARCHITECTURE;
|
||||
|
||||
typedef enum FILE_ENCODING
|
||||
{
|
||||
FILE_ENCODING_UNSPECIFIED = 0,
|
||||
// TODO: distinguish between non-BOM utf-8 and ANSI in the future?
|
||||
FILE_ENCODING_UTF8,
|
||||
FILE_ENCODING_UTF8_WITH_BOM,
|
||||
FILE_ENCODING_UTF16,
|
||||
FILE_ENCODING_UTF16_WITH_BOM,
|
||||
} FILE_ENCODING;
|
||||
|
||||
|
||||
LPWSTR DAPI FileFromPath(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI FileResolvePath(
|
||||
__in_z LPCWSTR wzRelativePath,
|
||||
__out LPWSTR *ppwzFullPath
|
||||
);
|
||||
HRESULT DAPI FileStripExtension(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__out LPWSTR *ppwzFileNameNoExtension
|
||||
);
|
||||
HRESULT DAPI FileChangeExtension(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__in_z LPCWSTR wzNewExtension,
|
||||
__out LPWSTR *ppwzFileNameNewExtension
|
||||
);
|
||||
HRESULT DAPI FileAddSuffixToBaseName(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__in_z LPCWSTR wzSuffix,
|
||||
__out_z LPWSTR* psczNewFileName
|
||||
);
|
||||
HRESULT DAPI FileVersionFromString(
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__out DWORD *pdwVerMajor,
|
||||
__out DWORD* pdwVerMinor
|
||||
);
|
||||
HRESULT DAPI FileVersionFromStringEx(
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__in DWORD cchVersion,
|
||||
__out DWORD64* pqwVersion
|
||||
);
|
||||
HRESULT DAPI FileVersionToStringEx(
|
||||
__in DWORD64 qwVersion,
|
||||
__out LPWSTR* psczVersion
|
||||
);
|
||||
HRESULT DAPI FileSetPointer(
|
||||
__in HANDLE hFile,
|
||||
__in DWORD64 dw64Move,
|
||||
__out_opt DWORD64* pdw64NewPosition,
|
||||
__in DWORD dwMoveMethod
|
||||
);
|
||||
HRESULT DAPI FileSize(
|
||||
__in_z LPCWSTR pwzFileName,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
HRESULT DAPI FileSizeByHandle(
|
||||
__in HANDLE hFile,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
BOOL DAPI FileExistsEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
BOOL DAPI FileExistsAfterRestart(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
HRESULT DAPI FileRemoveFromPendingRename(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI FileRead(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath
|
||||
);
|
||||
HRESULT DAPI FileReadUntil(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out_range(<=, cbMaxRead) DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath,
|
||||
__in DWORD cbMaxRead
|
||||
);
|
||||
HRESULT DAPI FileReadPartial(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out_range(<=, cbMaxRead) DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath,
|
||||
__in BOOL fSeek,
|
||||
__in DWORD cbStartPosition,
|
||||
__in DWORD cbMaxRead,
|
||||
__in BOOL fPartialOK
|
||||
);
|
||||
HRESULT DAPI FileWrite(
|
||||
__in_z LPCWSTR pwzFileName,
|
||||
__in DWORD dwFlagsAndAttributes,
|
||||
__in_bcount_opt(cbData) LPCBYTE pbData,
|
||||
__in DWORD cbData,
|
||||
__out_opt HANDLE* pHandle
|
||||
);
|
||||
HRESULT DAPI FileWriteHandle(
|
||||
__in HANDLE hFile,
|
||||
__in_bcount_opt(cbData) LPCBYTE pbData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
HRESULT DAPI FileCopyUsingHandles(
|
||||
__in HANDLE hSource,
|
||||
__in HANDLE hTarget,
|
||||
__in DWORD64 cbCopy,
|
||||
__out_opt DWORD64* pcbCopied
|
||||
);
|
||||
HRESULT DAPI FileEnsureCopy(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite
|
||||
);
|
||||
HRESULT DAPI FileEnsureCopyWithRetry(
|
||||
__in LPCWSTR wzSource,
|
||||
__in LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
HRESULT DAPI FileEnsureMove(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in BOOL fAllowCopy
|
||||
);
|
||||
HRESULT DAPI FileEnsureMoveWithRetry(
|
||||
__in LPCWSTR wzSource,
|
||||
__in LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in BOOL fAllowCopy,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
HRESULT DAPI FileCreateTemp(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* ppwzTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
HRESULT DAPI FileCreateTempW(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* ppwzTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
HRESULT DAPI FileVersion(
|
||||
__in_z LPCWSTR wzFilename,
|
||||
__out DWORD *pdwVerMajor,
|
||||
__out DWORD* pdwVerMinor
|
||||
);
|
||||
HRESULT DAPI FileIsSame(
|
||||
__in_z LPCWSTR wzFile1,
|
||||
__in_z LPCWSTR wzFile2,
|
||||
__out LPBOOL lpfSameFile
|
||||
);
|
||||
HRESULT DAPI FileEnsureDelete(
|
||||
__in_z LPCWSTR wzFile
|
||||
);
|
||||
HRESULT DAPI FileGetTime(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out_opt LPFILETIME lpCreationTime,
|
||||
__out_opt LPFILETIME lpLastAccessTime,
|
||||
__out_opt LPFILETIME lpLastWriteTime
|
||||
);
|
||||
HRESULT DAPI FileSetTime(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in_opt const FILETIME *lpCreationTime,
|
||||
__in_opt const FILETIME *lpLastAccessTime,
|
||||
__in_opt const FILETIME *lpLastWriteTime
|
||||
);
|
||||
HRESULT DAPI FileResetTime(
|
||||
__in_z LPCWSTR wzFile
|
||||
);
|
||||
HRESULT DAPI FileExecutableArchitecture(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out FILE_ARCHITECTURE *pArchitecture
|
||||
);
|
||||
HRESULT DAPI FileToString(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out LPWSTR *psczString,
|
||||
__out_opt FILE_ENCODING *pfeEncoding
|
||||
);
|
||||
HRESULT DAPI FileFromString(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in DWORD dwFlagsAndAttributes,
|
||||
__in_z LPCWSTR sczString,
|
||||
__in FILE_ENCODING feEncoding
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseFile(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; }
|
||||
#define ReleaseFileHandle(h) if (INVALID_HANDLE_VALUE != h) { ::CloseHandle(h); h = INVALID_HANDLE_VALUE; }
|
||||
#define ReleaseFileFindHandle(h) if (INVALID_HANDLE_VALUE != h) { ::FindClose(h); h = INVALID_HANDLE_VALUE; }
|
||||
|
||||
#define FILEMAKEVERSION(major, minor, build, revision) static_cast<DWORD64>((static_cast<DWORD64>(major & 0xFFFF) << 48) \
|
||||
| (static_cast<DWORD64>(minor & 0xFFFF) << 32) \
|
||||
| (static_cast<DWORD64>(build & 0xFFFF) << 16) \
|
||||
| (static_cast<DWORD64>(revision & 0xFFFF)))
|
||||
|
||||
typedef enum FILE_ARCHITECTURE
|
||||
{
|
||||
FILE_ARCHITECTURE_UNKNOWN,
|
||||
FILE_ARCHITECTURE_X86,
|
||||
FILE_ARCHITECTURE_X64,
|
||||
FILE_ARCHITECTURE_IA64,
|
||||
} FILE_ARCHITECTURE;
|
||||
|
||||
typedef enum FILE_ENCODING
|
||||
{
|
||||
FILE_ENCODING_UNSPECIFIED = 0,
|
||||
// TODO: distinguish between non-BOM utf-8 and ANSI in the future?
|
||||
FILE_ENCODING_UTF8,
|
||||
FILE_ENCODING_UTF8_WITH_BOM,
|
||||
FILE_ENCODING_UTF16,
|
||||
FILE_ENCODING_UTF16_WITH_BOM,
|
||||
} FILE_ENCODING;
|
||||
|
||||
|
||||
LPWSTR DAPI FileFromPath(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI FileResolvePath(
|
||||
__in_z LPCWSTR wzRelativePath,
|
||||
__out LPWSTR *ppwzFullPath
|
||||
);
|
||||
HRESULT DAPI FileStripExtension(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__out LPWSTR *ppwzFileNameNoExtension
|
||||
);
|
||||
HRESULT DAPI FileChangeExtension(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__in_z LPCWSTR wzNewExtension,
|
||||
__out LPWSTR *ppwzFileNameNewExtension
|
||||
);
|
||||
HRESULT DAPI FileAddSuffixToBaseName(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__in_z LPCWSTR wzSuffix,
|
||||
__out_z LPWSTR* psczNewFileName
|
||||
);
|
||||
HRESULT DAPI FileVersionFromString(
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__out DWORD *pdwVerMajor,
|
||||
__out DWORD* pdwVerMinor
|
||||
);
|
||||
HRESULT DAPI FileVersionFromStringEx(
|
||||
__in_z LPCWSTR wzVersion,
|
||||
__in DWORD cchVersion,
|
||||
__out DWORD64* pqwVersion
|
||||
);
|
||||
HRESULT DAPI FileVersionToStringEx(
|
||||
__in DWORD64 qwVersion,
|
||||
__out LPWSTR* psczVersion
|
||||
);
|
||||
HRESULT DAPI FileSetPointer(
|
||||
__in HANDLE hFile,
|
||||
__in DWORD64 dw64Move,
|
||||
__out_opt DWORD64* pdw64NewPosition,
|
||||
__in DWORD dwMoveMethod
|
||||
);
|
||||
HRESULT DAPI FileSize(
|
||||
__in_z LPCWSTR pwzFileName,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
HRESULT DAPI FileSizeByHandle(
|
||||
__in HANDLE hFile,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
BOOL DAPI FileExistsEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
BOOL DAPI FileExistsAfterRestart(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out_opt DWORD *pdwAttributes
|
||||
);
|
||||
HRESULT DAPI FileRemoveFromPendingRename(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI FileRead(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath
|
||||
);
|
||||
HRESULT DAPI FileReadUntil(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out_range(<=, cbMaxRead) DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath,
|
||||
__in DWORD cbMaxRead
|
||||
);
|
||||
HRESULT DAPI FileReadPartial(
|
||||
__deref_out_bcount_full(*pcbDest) LPBYTE* ppbDest,
|
||||
__out_range(<=, cbMaxRead) DWORD* pcbDest,
|
||||
__in_z LPCWSTR wzSrcPath,
|
||||
__in BOOL fSeek,
|
||||
__in DWORD cbStartPosition,
|
||||
__in DWORD cbMaxRead,
|
||||
__in BOOL fPartialOK
|
||||
);
|
||||
HRESULT DAPI FileWrite(
|
||||
__in_z LPCWSTR pwzFileName,
|
||||
__in DWORD dwFlagsAndAttributes,
|
||||
__in_bcount_opt(cbData) LPCBYTE pbData,
|
||||
__in DWORD cbData,
|
||||
__out_opt HANDLE* pHandle
|
||||
);
|
||||
HRESULT DAPI FileWriteHandle(
|
||||
__in HANDLE hFile,
|
||||
__in_bcount_opt(cbData) LPCBYTE pbData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
HRESULT DAPI FileCopyUsingHandles(
|
||||
__in HANDLE hSource,
|
||||
__in HANDLE hTarget,
|
||||
__in DWORD64 cbCopy,
|
||||
__out_opt DWORD64* pcbCopied
|
||||
);
|
||||
HRESULT DAPI FileEnsureCopy(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite
|
||||
);
|
||||
HRESULT DAPI FileEnsureCopyWithRetry(
|
||||
__in LPCWSTR wzSource,
|
||||
__in LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
HRESULT DAPI FileEnsureMove(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in BOOL fAllowCopy
|
||||
);
|
||||
HRESULT DAPI FileEnsureMoveWithRetry(
|
||||
__in LPCWSTR wzSource,
|
||||
__in LPCWSTR wzTarget,
|
||||
__in BOOL fOverwrite,
|
||||
__in BOOL fAllowCopy,
|
||||
__in DWORD cRetry,
|
||||
__in DWORD dwWaitMilliseconds
|
||||
);
|
||||
HRESULT DAPI FileCreateTemp(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* ppwzTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
HRESULT DAPI FileCreateTempW(
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* ppwzTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
HRESULT DAPI FileVersion(
|
||||
__in_z LPCWSTR wzFilename,
|
||||
__out DWORD *pdwVerMajor,
|
||||
__out DWORD* pdwVerMinor
|
||||
);
|
||||
HRESULT DAPI FileIsSame(
|
||||
__in_z LPCWSTR wzFile1,
|
||||
__in_z LPCWSTR wzFile2,
|
||||
__out LPBOOL lpfSameFile
|
||||
);
|
||||
HRESULT DAPI FileEnsureDelete(
|
||||
__in_z LPCWSTR wzFile
|
||||
);
|
||||
HRESULT DAPI FileGetTime(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out_opt LPFILETIME lpCreationTime,
|
||||
__out_opt LPFILETIME lpLastAccessTime,
|
||||
__out_opt LPFILETIME lpLastWriteTime
|
||||
);
|
||||
HRESULT DAPI FileSetTime(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in_opt const FILETIME *lpCreationTime,
|
||||
__in_opt const FILETIME *lpLastAccessTime,
|
||||
__in_opt const FILETIME *lpLastWriteTime
|
||||
);
|
||||
HRESULT DAPI FileResetTime(
|
||||
__in_z LPCWSTR wzFile
|
||||
);
|
||||
HRESULT DAPI FileExecutableArchitecture(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out FILE_ARCHITECTURE *pArchitecture
|
||||
);
|
||||
HRESULT DAPI FileToString(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__out LPWSTR *psczString,
|
||||
__out_opt FILE_ENCODING *pfeEncoding
|
||||
);
|
||||
HRESULT DAPI FileFromString(
|
||||
__in_z LPCWSTR wzFile,
|
||||
__in DWORD dwFlagsAndAttributes,
|
||||
__in_z LPCWSTR sczString,
|
||||
__in FILE_ENCODING feEncoding
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,30 +1,30 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ExitOnGdipFailure(g, x, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } }
|
||||
#define ExitOnGdipFailure1(g, x, f, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } }
|
||||
#define ExitOnGdipFailure2(g, x, f, s, t) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI GdipBitmapFromResource(
|
||||
__in_opt HINSTANCE hinst,
|
||||
__in_z LPCSTR szId,
|
||||
__out Gdiplus::Bitmap **ppBitmap
|
||||
);
|
||||
|
||||
HRESULT DAPI GdipBitmapFromFile(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__out Gdiplus::Bitmap **ppBitmap
|
||||
);
|
||||
|
||||
HRESULT DAPI GdipHresultFromStatus(
|
||||
__in Gdiplus::Status gs
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#define ExitOnGdipFailure(g, x, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, s); goto LExit; } }
|
||||
#define ExitOnGdipFailure1(g, x, f, s) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; } }
|
||||
#define ExitOnGdipFailure2(g, x, f, s, t) { x = GdipHresultFromStatus(g); if (FAILED(x)) { Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; } }
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI GdipBitmapFromResource(
|
||||
__in_opt HINSTANCE hinst,
|
||||
__in_z LPCSTR szId,
|
||||
__out Gdiplus::Bitmap **ppBitmap
|
||||
);
|
||||
|
||||
HRESULT DAPI GdipBitmapFromFile(
|
||||
__in_z LPCWSTR wzFileName,
|
||||
__out Gdiplus::Bitmap **ppBitmap
|
||||
);
|
||||
|
||||
HRESULT DAPI GdipHresultFromStatus(
|
||||
__in Gdiplus::Status gs
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+222
-222
@@ -1,222 +1,222 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// IIS Config schema names
|
||||
#define IIS_CONFIG_ADD L"add"
|
||||
#define IIS_CONFIG_ALLOWED L"allowed"
|
||||
#define IIS_CONFIG_APPHOST_ROOT L"MACHINE/WEBROOT/APPHOST"
|
||||
#define IIS_CONFIG_APPLICATION L"application"
|
||||
#define IIS_CONFIG_APPPOOL L"applicationPool"
|
||||
#define IIS_CONFIG_APPPOOL_AUTO L"autoStart"
|
||||
#define IIS_CONFIG_APPPOOL_SECTION L"system.applicationHost/applicationPools"
|
||||
#define IIS_CONFIG_AUTOSTART L"serverAutoStart"
|
||||
#define IIS_CONFIG_BINDING L"binding"
|
||||
#define IIS_CONFIG_BINDINGINFO L"bindingInformation"
|
||||
#define IIS_CONFIG_BINDINGS L"bindings"
|
||||
#define IIS_CONFIG_DESC L"description"
|
||||
#define IIS_CONFIG_EXECUTABLE L"scriptProcessor"
|
||||
#define IIS_CONFIG_ENABLED L"enabled"
|
||||
#define IIS_CONFIG_ENABLE32 L"enable32BitAppOnWin64"
|
||||
#define IIS_CONFIG_FILEEXT L"fileExtension"
|
||||
#define IIS_CONFIG_FILTER L"filter"
|
||||
#define IIS_CONFIG_GROUPID L"groupId"
|
||||
#define IIS_CONFIG_HEADERS L"customHeaders"
|
||||
#define IIS_CONFIG_HTTPERRORS_SECTION L"system.webServer/httpErrors"
|
||||
#define IIS_CONFIG_ID L"id"
|
||||
#define IIS_CONFIG_ISAPI_SECTION L"system.webServer/isapiFilters"
|
||||
#define IIS_CONFIG_HTTPPROTO_SECTION L"system.webServer/httpProtocol"
|
||||
#define IIS_CONFIG_LOG_SECTION L"system.applicationHost/log"
|
||||
#define IIS_CONFIG_LOG_UTF8 L"logInUTF8"
|
||||
#define IIS_CONFIG_LIMITS L"limits"
|
||||
#define IIS_CONFIG_PIPELINEMODE L"managedPipelineMode"
|
||||
#define IIS_CONFIG_MANAGEDRUNTIMEVERSION L"managedRuntimeVersion"
|
||||
#define IIS_CONFIG_WEBLOG L"logFile"
|
||||
#define IIS_CONFIG_LOGFORMAT L"logFormat"
|
||||
#define IIS_CONFIG_MIMEMAP L"mimeMap"
|
||||
#define IIS_CONFIG_MIMETYPE L"mimeType"
|
||||
#define IIS_CONFIG_MODULES L"modules"
|
||||
#define IIS_CONFIG_NAME L"name"
|
||||
#define IIS_CONFIG_PATH L"path"
|
||||
#define IIS_CONFIG_PHYSPATH L"physicalPath"
|
||||
#define IIS_CONFIG_PROTOCOL L"protocol"
|
||||
#define IIS_CONFIG_RESTRICTION_SECTION L"system.webServer/security/isapiCgiRestriction"
|
||||
#define IIS_CONFIG_SITE L"site"
|
||||
#define IIS_CONFIG_SITE_ID L"id"
|
||||
#define IIS_CONFIG_SITES_SECTION L"system.applicationHost/sites"
|
||||
#define IIS_CONFIG_CONNECTTIMEOUT L"connectionTimeout"
|
||||
#define IIS_CONFIG_VDIR L"virtualDirectory"
|
||||
#define IIS_CONFIG_VALUE L"value"
|
||||
#define IIS_CONFIG_VERBS L"verb"
|
||||
#define IIS_CONFIG_WEBLIMITS_SECTION L"system.applicationHost/webLimits"
|
||||
#define IIS_CONFIG_WEBLIMITS_MAXBAND L"maxGlobalBandwidth"
|
||||
#define IIS_CONFIG_TRUE L"true"
|
||||
#define IIS_CONFIG_FALSE L"false"
|
||||
#define IIS_CONFIG_ERROR L"error"
|
||||
#define IIS_CONFIG_STATUSCODE L"statusCode"
|
||||
#define IIS_CONFIG_SUBSTATUS L"subStatusCode"
|
||||
#define IIS_CONFIG_LANGPATH L"prefixLanguageFilePath"
|
||||
#define IIS_CONFIG_RESPMODE L"responseMode"
|
||||
#define IIS_CONFIG_CLEAR L"clear"
|
||||
#define IIS_CONFIG_RECYCLING L"recycling"
|
||||
#define IIS_CONFIG_PEROIDRESTART L"periodicRestart"
|
||||
#define IIS_CONFIG_TIME L"time"
|
||||
#define IIS_CONFIG_REQUESTS L"requests"
|
||||
#define IIS_CONFIG_SCHEDULE L"schedule"
|
||||
#define IIS_CONFIG_MEMORY L"memory"
|
||||
#define IIS_CONFIG_PRIVMEMORY L"privateMemory"
|
||||
#define IIS_CONFIG_PROCESSMODEL L"processModel"
|
||||
#define IIS_CONFIG_IDLETIMEOUT L"idleTimeout"
|
||||
#define IIS_CONFIG_QUEUELENGTH L"queueLength"
|
||||
#define IIS_CONFIG_IDENITITYTYPE L"identityType"
|
||||
#define IIS_CONFIG_LOCALSYSTEM L"LocalSystem"
|
||||
#define IIS_CONFIG_LOCALSERVICE L"LocalService"
|
||||
#define IIS_CONFIG_NETWORKSERVICE L"NetworkService"
|
||||
#define IIS_CONFIG_SPECIFICUSER L"SpecificUser"
|
||||
#define IIS_CONFIG_APPLICATIONPOOLIDENTITY L"ApplicationPoolIdentity"
|
||||
#define IIS_CONFIG_USERNAME L"userName"
|
||||
#define IIS_CONFIG_PASSWORD L"password"
|
||||
#define IIS_CONFIG_CPU L"cpu"
|
||||
#define IIS_CONFIG_LIMIT L"limit"
|
||||
#define IIS_CONFIG_CPU_ACTION L"action"
|
||||
#define IIS_CONFIG_KILLW3WP L"KillW3wp"
|
||||
#define IIS_CONFIG_NOACTION L"NoAction"
|
||||
#define IIS_CONFIG_RESETINTERVAL L"resetInterval"
|
||||
#define IIS_CONFIG_MAXWRKPROCESSES L"maxProcesses"
|
||||
#define IIS_CONFIG_HANDLERS_SECTION L"system.webServer/handlers"
|
||||
#define IIS_CONFIG_DEFAULTDOC_SECTION L"system.webServer/defaultDocument"
|
||||
#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp"
|
||||
#define IIS_CONFIG_SCRIPTERROR L"scriptErrorSentToBrowser"
|
||||
#define IIS_CONFIG_STATICCONTENT_SECTION L"system.webServer/staticContent"
|
||||
#define IIS_CONFIG_HTTPEXPIRES L"httpExpires"
|
||||
#define IIS_CONFIG_MAXAGE L"cacheControlMaxAge"
|
||||
#define IIS_CONFIG_CLIENTCACHE L"clientCache"
|
||||
#define IIS_CONFIG_CACHECONTROLMODE L"cacheControlMode"
|
||||
#define IIS_CONFIG_USEMAXAGE L"UseMaxAge"
|
||||
#define IIS_CONFIG_USEEXPIRES L"UseExpires"
|
||||
#define IIS_CONFIG_CACHECUST L"cacheControlCustom"
|
||||
#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp"
|
||||
#define IIS_CONFIG_SESSION L"session"
|
||||
#define IIS_CONFIG_ALLOWSTATE L"allowSessionState"
|
||||
#define IIS_CONFIG_TIMEOUT L"timeout"
|
||||
#define IIS_CONFIG_BUFFERING L"bufferingOn"
|
||||
#define IIS_CONFIG_PARENTPATHS L"enableParentPaths"
|
||||
#define IIS_CONFIG_SCRIPTLANG L"scriptLanguage"
|
||||
#define IIS_CONFIG_SCRIPTTIMEOUT L"scriptTimeout"
|
||||
#define IIS_CONFIG_LIMITS L"limits"
|
||||
#define IIS_CONFIG_ALLOWDEBUG L"appAllowDebugging"
|
||||
#define IIS_CONFIG_ALLOWCLIENTDEBUG L"appAllowClientDebug"
|
||||
#define IIS_CONFIG_CERTIFICATEHASH L"certificateHash"
|
||||
#define IIS_CONFIG_CERTIFICATESTORENAME L"certificateStoreName"
|
||||
#define IIS_CONFIG_HTTPLOGGING_SECTION L"system.webServer/httpLogging"
|
||||
#define IIS_CONFIG_DONTLOG L"dontLog"
|
||||
|
||||
typedef BOOL (CALLBACK* ENUMAPHOSTELEMENTPROC)(IAppHostElement*, LPVOID);
|
||||
typedef BOOL (CALLBACK* VARIANTCOMPARATORPROC)(VARIANT*, VARIANT*);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyVariant(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in VARIANT vtPut
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyInteger(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in DWORD dValue
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyString(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in LPCWSTR wzString
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyBool(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in BOOL fValue);
|
||||
|
||||
HRESULT DAPI Iis7GetPropertyVariant(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in VARIANT* vtGet
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7GetPropertyString(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in LPWSTR* psczGet
|
||||
);
|
||||
|
||||
struct IIS7_APPHOSTELEMENTCOMPARISON
|
||||
{
|
||||
LPCWSTR sczElementName;
|
||||
LPCWSTR sczAttributeName;
|
||||
VARIANT* pvAttributeValue;
|
||||
VARIANTCOMPARATORPROC pComparator;
|
||||
};
|
||||
|
||||
BOOL DAPI Iis7IsMatchingAppHostElement(
|
||||
__in IAppHostElement *pElement,
|
||||
__in IIS7_APPHOSTELEMENTCOMPARISON* pComparison
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementString(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in LPCWSTR wzAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementPath(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in LPCWSTR wzAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementInteger(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in DWORD dwAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementVariant(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in VARIANT* pvAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7EnumAppHostElements(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in ENUMAPHOSTELEMENTPROC pCallback,
|
||||
__in LPVOID pContext,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostMethod(
|
||||
__in IAppHostMethodCollection *pCollection,
|
||||
__in LPCWSTR wzMethodName,
|
||||
__out IAppHostMethod** ppMethod,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// IIS Config schema names
|
||||
#define IIS_CONFIG_ADD L"add"
|
||||
#define IIS_CONFIG_ALLOWED L"allowed"
|
||||
#define IIS_CONFIG_APPHOST_ROOT L"MACHINE/WEBROOT/APPHOST"
|
||||
#define IIS_CONFIG_APPLICATION L"application"
|
||||
#define IIS_CONFIG_APPPOOL L"applicationPool"
|
||||
#define IIS_CONFIG_APPPOOL_AUTO L"autoStart"
|
||||
#define IIS_CONFIG_APPPOOL_SECTION L"system.applicationHost/applicationPools"
|
||||
#define IIS_CONFIG_AUTOSTART L"serverAutoStart"
|
||||
#define IIS_CONFIG_BINDING L"binding"
|
||||
#define IIS_CONFIG_BINDINGINFO L"bindingInformation"
|
||||
#define IIS_CONFIG_BINDINGS L"bindings"
|
||||
#define IIS_CONFIG_DESC L"description"
|
||||
#define IIS_CONFIG_EXECUTABLE L"scriptProcessor"
|
||||
#define IIS_CONFIG_ENABLED L"enabled"
|
||||
#define IIS_CONFIG_ENABLE32 L"enable32BitAppOnWin64"
|
||||
#define IIS_CONFIG_FILEEXT L"fileExtension"
|
||||
#define IIS_CONFIG_FILTER L"filter"
|
||||
#define IIS_CONFIG_GROUPID L"groupId"
|
||||
#define IIS_CONFIG_HEADERS L"customHeaders"
|
||||
#define IIS_CONFIG_HTTPERRORS_SECTION L"system.webServer/httpErrors"
|
||||
#define IIS_CONFIG_ID L"id"
|
||||
#define IIS_CONFIG_ISAPI_SECTION L"system.webServer/isapiFilters"
|
||||
#define IIS_CONFIG_HTTPPROTO_SECTION L"system.webServer/httpProtocol"
|
||||
#define IIS_CONFIG_LOG_SECTION L"system.applicationHost/log"
|
||||
#define IIS_CONFIG_LOG_UTF8 L"logInUTF8"
|
||||
#define IIS_CONFIG_LIMITS L"limits"
|
||||
#define IIS_CONFIG_PIPELINEMODE L"managedPipelineMode"
|
||||
#define IIS_CONFIG_MANAGEDRUNTIMEVERSION L"managedRuntimeVersion"
|
||||
#define IIS_CONFIG_WEBLOG L"logFile"
|
||||
#define IIS_CONFIG_LOGFORMAT L"logFormat"
|
||||
#define IIS_CONFIG_MIMEMAP L"mimeMap"
|
||||
#define IIS_CONFIG_MIMETYPE L"mimeType"
|
||||
#define IIS_CONFIG_MODULES L"modules"
|
||||
#define IIS_CONFIG_NAME L"name"
|
||||
#define IIS_CONFIG_PATH L"path"
|
||||
#define IIS_CONFIG_PHYSPATH L"physicalPath"
|
||||
#define IIS_CONFIG_PROTOCOL L"protocol"
|
||||
#define IIS_CONFIG_RESTRICTION_SECTION L"system.webServer/security/isapiCgiRestriction"
|
||||
#define IIS_CONFIG_SITE L"site"
|
||||
#define IIS_CONFIG_SITE_ID L"id"
|
||||
#define IIS_CONFIG_SITES_SECTION L"system.applicationHost/sites"
|
||||
#define IIS_CONFIG_CONNECTTIMEOUT L"connectionTimeout"
|
||||
#define IIS_CONFIG_VDIR L"virtualDirectory"
|
||||
#define IIS_CONFIG_VALUE L"value"
|
||||
#define IIS_CONFIG_VERBS L"verb"
|
||||
#define IIS_CONFIG_WEBLIMITS_SECTION L"system.applicationHost/webLimits"
|
||||
#define IIS_CONFIG_WEBLIMITS_MAXBAND L"maxGlobalBandwidth"
|
||||
#define IIS_CONFIG_TRUE L"true"
|
||||
#define IIS_CONFIG_FALSE L"false"
|
||||
#define IIS_CONFIG_ERROR L"error"
|
||||
#define IIS_CONFIG_STATUSCODE L"statusCode"
|
||||
#define IIS_CONFIG_SUBSTATUS L"subStatusCode"
|
||||
#define IIS_CONFIG_LANGPATH L"prefixLanguageFilePath"
|
||||
#define IIS_CONFIG_RESPMODE L"responseMode"
|
||||
#define IIS_CONFIG_CLEAR L"clear"
|
||||
#define IIS_CONFIG_RECYCLING L"recycling"
|
||||
#define IIS_CONFIG_PEROIDRESTART L"periodicRestart"
|
||||
#define IIS_CONFIG_TIME L"time"
|
||||
#define IIS_CONFIG_REQUESTS L"requests"
|
||||
#define IIS_CONFIG_SCHEDULE L"schedule"
|
||||
#define IIS_CONFIG_MEMORY L"memory"
|
||||
#define IIS_CONFIG_PRIVMEMORY L"privateMemory"
|
||||
#define IIS_CONFIG_PROCESSMODEL L"processModel"
|
||||
#define IIS_CONFIG_IDLETIMEOUT L"idleTimeout"
|
||||
#define IIS_CONFIG_QUEUELENGTH L"queueLength"
|
||||
#define IIS_CONFIG_IDENITITYTYPE L"identityType"
|
||||
#define IIS_CONFIG_LOCALSYSTEM L"LocalSystem"
|
||||
#define IIS_CONFIG_LOCALSERVICE L"LocalService"
|
||||
#define IIS_CONFIG_NETWORKSERVICE L"NetworkService"
|
||||
#define IIS_CONFIG_SPECIFICUSER L"SpecificUser"
|
||||
#define IIS_CONFIG_APPLICATIONPOOLIDENTITY L"ApplicationPoolIdentity"
|
||||
#define IIS_CONFIG_USERNAME L"userName"
|
||||
#define IIS_CONFIG_PASSWORD L"password"
|
||||
#define IIS_CONFIG_CPU L"cpu"
|
||||
#define IIS_CONFIG_LIMIT L"limit"
|
||||
#define IIS_CONFIG_CPU_ACTION L"action"
|
||||
#define IIS_CONFIG_KILLW3WP L"KillW3wp"
|
||||
#define IIS_CONFIG_NOACTION L"NoAction"
|
||||
#define IIS_CONFIG_RESETINTERVAL L"resetInterval"
|
||||
#define IIS_CONFIG_MAXWRKPROCESSES L"maxProcesses"
|
||||
#define IIS_CONFIG_HANDLERS_SECTION L"system.webServer/handlers"
|
||||
#define IIS_CONFIG_DEFAULTDOC_SECTION L"system.webServer/defaultDocument"
|
||||
#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp"
|
||||
#define IIS_CONFIG_SCRIPTERROR L"scriptErrorSentToBrowser"
|
||||
#define IIS_CONFIG_STATICCONTENT_SECTION L"system.webServer/staticContent"
|
||||
#define IIS_CONFIG_HTTPEXPIRES L"httpExpires"
|
||||
#define IIS_CONFIG_MAXAGE L"cacheControlMaxAge"
|
||||
#define IIS_CONFIG_CLIENTCACHE L"clientCache"
|
||||
#define IIS_CONFIG_CACHECONTROLMODE L"cacheControlMode"
|
||||
#define IIS_CONFIG_USEMAXAGE L"UseMaxAge"
|
||||
#define IIS_CONFIG_USEEXPIRES L"UseExpires"
|
||||
#define IIS_CONFIG_CACHECUST L"cacheControlCustom"
|
||||
#define IIS_CONFIG_ASP_SECTION L"system.webServer/asp"
|
||||
#define IIS_CONFIG_SESSION L"session"
|
||||
#define IIS_CONFIG_ALLOWSTATE L"allowSessionState"
|
||||
#define IIS_CONFIG_TIMEOUT L"timeout"
|
||||
#define IIS_CONFIG_BUFFERING L"bufferingOn"
|
||||
#define IIS_CONFIG_PARENTPATHS L"enableParentPaths"
|
||||
#define IIS_CONFIG_SCRIPTLANG L"scriptLanguage"
|
||||
#define IIS_CONFIG_SCRIPTTIMEOUT L"scriptTimeout"
|
||||
#define IIS_CONFIG_LIMITS L"limits"
|
||||
#define IIS_CONFIG_ALLOWDEBUG L"appAllowDebugging"
|
||||
#define IIS_CONFIG_ALLOWCLIENTDEBUG L"appAllowClientDebug"
|
||||
#define IIS_CONFIG_CERTIFICATEHASH L"certificateHash"
|
||||
#define IIS_CONFIG_CERTIFICATESTORENAME L"certificateStoreName"
|
||||
#define IIS_CONFIG_HTTPLOGGING_SECTION L"system.webServer/httpLogging"
|
||||
#define IIS_CONFIG_DONTLOG L"dontLog"
|
||||
|
||||
typedef BOOL (CALLBACK* ENUMAPHOSTELEMENTPROC)(IAppHostElement*, LPVOID);
|
||||
typedef BOOL (CALLBACK* VARIANTCOMPARATORPROC)(VARIANT*, VARIANT*);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyVariant(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in VARIANT vtPut
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyInteger(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in DWORD dValue
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyString(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in LPCWSTR wzString
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7PutPropertyBool(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in BOOL fValue);
|
||||
|
||||
HRESULT DAPI Iis7GetPropertyVariant(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in VARIANT* vtGet
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7GetPropertyString(
|
||||
__in IAppHostElement *pElement,
|
||||
__in LPCWSTR wzPropName,
|
||||
__in LPWSTR* psczGet
|
||||
);
|
||||
|
||||
struct IIS7_APPHOSTELEMENTCOMPARISON
|
||||
{
|
||||
LPCWSTR sczElementName;
|
||||
LPCWSTR sczAttributeName;
|
||||
VARIANT* pvAttributeValue;
|
||||
VARIANTCOMPARATORPROC pComparator;
|
||||
};
|
||||
|
||||
BOOL DAPI Iis7IsMatchingAppHostElement(
|
||||
__in IAppHostElement *pElement,
|
||||
__in IIS7_APPHOSTELEMENTCOMPARISON* pComparison
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementString(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in LPCWSTR wzAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementPath(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in LPCWSTR wzAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementInteger(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in DWORD dwAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostElementVariant(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in LPCWSTR wzElementName,
|
||||
__in LPCWSTR wzAttributeName,
|
||||
__in VARIANT* pvAttributeValue,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7EnumAppHostElements(
|
||||
__in IAppHostElementCollection *pCollection,
|
||||
__in ENUMAPHOSTELEMENTPROC pCallback,
|
||||
__in LPVOID pContext,
|
||||
__out IAppHostElement** ppElement,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
HRESULT DAPI Iis7FindAppHostMethod(
|
||||
__in IAppHostMethodCollection *pCollection,
|
||||
__in LPCWSTR wzMethodName,
|
||||
__out IAppHostMethod** ppMethod,
|
||||
__out DWORD* pdwIndex
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,39 +1,39 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; }
|
||||
#define ReleaseNullInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; }
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI InternetGetSizeByHandle(
|
||||
__in HINTERNET hiFile,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetGetCreateTimeByHandle(
|
||||
__in HINTERNET hiFile,
|
||||
__out LPFILETIME pft
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetQueryInfoString(
|
||||
__in HINTERNET h,
|
||||
__in DWORD dwInfo,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetQueryInfoNumber(
|
||||
__in HINTERNET h,
|
||||
__in DWORD dwInfo,
|
||||
__out LONG* plInfo
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; }
|
||||
#define ReleaseNullInternet(h) if (h) { ::InternetCloseHandle(h); h = NULL; }
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI InternetGetSizeByHandle(
|
||||
__in HINTERNET hiFile,
|
||||
__out LONGLONG* pllSize
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetGetCreateTimeByHandle(
|
||||
__in HINTERNET hiFile,
|
||||
__out LPFILETIME pft
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetQueryInfoString(
|
||||
__in HINTERNET h,
|
||||
__in DWORD dwInfo,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
|
||||
HRESULT DAPI InternetQueryInfoNumber(
|
||||
__in HINTERNET h,
|
||||
__in DWORD dwInfo,
|
||||
__out LONG* plInfo
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseIni(ih) if (ih) { IniUninitialize(ih); }
|
||||
#define ReleaseNullIni(ih) if (ih) { IniUninitialize(ih); ih = NULL; }
|
||||
|
||||
typedef void* INI_HANDLE;
|
||||
typedef const void* C_INI_HANDLE;
|
||||
|
||||
extern const int INI_HANDLE_BYTES;
|
||||
|
||||
struct INI_VALUE
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
LPCWSTR wzValue;
|
||||
|
||||
DWORD dwLineNumber;
|
||||
};
|
||||
|
||||
HRESULT DAPI IniInitialize(
|
||||
__out_bcount(INI_HANDLE_BYTES) INI_HANDLE* piHandle
|
||||
);
|
||||
void DAPI IniUninitialize(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle
|
||||
);
|
||||
HRESULT DAPI IniSetOpenTag(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzOpenTagPrefix,
|
||||
__in_z_opt LPCWSTR wzOpenTagPostfix
|
||||
);
|
||||
HRESULT DAPI IniSetValueStyle(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzValuePrefix,
|
||||
__in_z_opt LPCWSTR wzValueSeparator
|
||||
);
|
||||
HRESULT DAPI IniSetCommentStyle(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzLinePrefix
|
||||
);
|
||||
HRESULT DAPI IniParse(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzPath,
|
||||
__out_opt FILE_ENCODING *pfeEncodingFound
|
||||
);
|
||||
HRESULT DAPI IniGetValueList(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__deref_out_ecount_opt(pcValues) INI_VALUE** prgivValues,
|
||||
__out DWORD *pcValues
|
||||
);
|
||||
HRESULT DAPI IniGetValue(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzValueName,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI IniSetValue(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzValueName,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI IniWriteFile(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzPath,
|
||||
__in FILE_ENCODING feOverrideEncoding
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseIni(ih) if (ih) { IniUninitialize(ih); }
|
||||
#define ReleaseNullIni(ih) if (ih) { IniUninitialize(ih); ih = NULL; }
|
||||
|
||||
typedef void* INI_HANDLE;
|
||||
typedef const void* C_INI_HANDLE;
|
||||
|
||||
extern const int INI_HANDLE_BYTES;
|
||||
|
||||
struct INI_VALUE
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
LPCWSTR wzValue;
|
||||
|
||||
DWORD dwLineNumber;
|
||||
};
|
||||
|
||||
HRESULT DAPI IniInitialize(
|
||||
__out_bcount(INI_HANDLE_BYTES) INI_HANDLE* piHandle
|
||||
);
|
||||
void DAPI IniUninitialize(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle
|
||||
);
|
||||
HRESULT DAPI IniSetOpenTag(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzOpenTagPrefix,
|
||||
__in_z_opt LPCWSTR wzOpenTagPostfix
|
||||
);
|
||||
HRESULT DAPI IniSetValueStyle(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzValuePrefix,
|
||||
__in_z_opt LPCWSTR wzValueSeparator
|
||||
);
|
||||
HRESULT DAPI IniSetCommentStyle(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzLinePrefix
|
||||
);
|
||||
HRESULT DAPI IniParse(
|
||||
__inout_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzPath,
|
||||
__out_opt FILE_ENCODING *pfeEncodingFound
|
||||
);
|
||||
HRESULT DAPI IniGetValueList(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__deref_out_ecount_opt(pcValues) INI_VALUE** prgivValues,
|
||||
__out DWORD *pcValues
|
||||
);
|
||||
HRESULT DAPI IniGetValue(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzValueName,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI IniSetValue(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in LPCWSTR wzValueName,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI IniWriteFile(
|
||||
__in_bcount(INI_HANDLE_BYTES) INI_HANDLE piHandle,
|
||||
__in_z_opt LPCWSTR wzPath,
|
||||
__in FILE_ENCODING feOverrideEncoding
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+112
-112
@@ -1,112 +1,112 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum JSON_TOKEN
|
||||
{
|
||||
JSON_TOKEN_NONE,
|
||||
JSON_TOKEN_ARRAY_START,
|
||||
JSON_TOKEN_ARRAY_VALUE,
|
||||
JSON_TOKEN_ARRAY_END,
|
||||
JSON_TOKEN_OBJECT_START,
|
||||
JSON_TOKEN_OBJECT_KEY,
|
||||
JSON_TOKEN_OBJECT_VALUE,
|
||||
JSON_TOKEN_OBJECT_END,
|
||||
JSON_TOKEN_VALUE,
|
||||
} JSON_TOKEN;
|
||||
|
||||
typedef struct _JSON_VALUE
|
||||
{
|
||||
} JSON_VALUE;
|
||||
|
||||
typedef struct _JSON_READER
|
||||
{
|
||||
CRITICAL_SECTION cs;
|
||||
LPWSTR sczJson;
|
||||
|
||||
LPWSTR pwz;
|
||||
JSON_TOKEN token;
|
||||
} JSON_READER;
|
||||
|
||||
typedef struct _JSON_WRITER
|
||||
{
|
||||
CRITICAL_SECTION cs;
|
||||
LPWSTR sczJson;
|
||||
|
||||
JSON_TOKEN* rgTokenStack;
|
||||
DWORD cTokens;
|
||||
DWORD cMaxTokens;
|
||||
} JSON_WRITER;
|
||||
|
||||
|
||||
DAPI_(HRESULT) JsonInitializeReader(
|
||||
__in_z LPCWSTR wzJson,
|
||||
__in JSON_READER* pReader
|
||||
);
|
||||
|
||||
DAPI_(void) JsonUninitializeReader(
|
||||
__in JSON_READER* pReader
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonReadNext(
|
||||
__in JSON_READER* pReader,
|
||||
__out JSON_TOKEN* pToken,
|
||||
__out JSON_VALUE* pValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonReadValue(
|
||||
__in JSON_READER* pReader,
|
||||
__in JSON_VALUE* pValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonInitializeWriter(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(void) JsonUninitializeWriter(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteBool(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in BOOL fValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteNumber(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteString(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in_z LPCWSTR wzValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteArrayStart(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteArrayEnd(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectStart(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectKey(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in_z LPCWSTR wzKey
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectEnd(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum JSON_TOKEN
|
||||
{
|
||||
JSON_TOKEN_NONE,
|
||||
JSON_TOKEN_ARRAY_START,
|
||||
JSON_TOKEN_ARRAY_VALUE,
|
||||
JSON_TOKEN_ARRAY_END,
|
||||
JSON_TOKEN_OBJECT_START,
|
||||
JSON_TOKEN_OBJECT_KEY,
|
||||
JSON_TOKEN_OBJECT_VALUE,
|
||||
JSON_TOKEN_OBJECT_END,
|
||||
JSON_TOKEN_VALUE,
|
||||
} JSON_TOKEN;
|
||||
|
||||
typedef struct _JSON_VALUE
|
||||
{
|
||||
} JSON_VALUE;
|
||||
|
||||
typedef struct _JSON_READER
|
||||
{
|
||||
CRITICAL_SECTION cs;
|
||||
LPWSTR sczJson;
|
||||
|
||||
LPWSTR pwz;
|
||||
JSON_TOKEN token;
|
||||
} JSON_READER;
|
||||
|
||||
typedef struct _JSON_WRITER
|
||||
{
|
||||
CRITICAL_SECTION cs;
|
||||
LPWSTR sczJson;
|
||||
|
||||
JSON_TOKEN* rgTokenStack;
|
||||
DWORD cTokens;
|
||||
DWORD cMaxTokens;
|
||||
} JSON_WRITER;
|
||||
|
||||
|
||||
DAPI_(HRESULT) JsonInitializeReader(
|
||||
__in_z LPCWSTR wzJson,
|
||||
__in JSON_READER* pReader
|
||||
);
|
||||
|
||||
DAPI_(void) JsonUninitializeReader(
|
||||
__in JSON_READER* pReader
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonReadNext(
|
||||
__in JSON_READER* pReader,
|
||||
__out JSON_TOKEN* pToken,
|
||||
__out JSON_VALUE* pValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonReadValue(
|
||||
__in JSON_READER* pReader,
|
||||
__in JSON_VALUE* pValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonInitializeWriter(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(void) JsonUninitializeWriter(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteBool(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in BOOL fValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteNumber(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteString(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in_z LPCWSTR wzValue
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteArrayStart(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteArrayEnd(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectStart(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectKey(
|
||||
__in JSON_WRITER* pWriter,
|
||||
__in_z LPCWSTR wzKey
|
||||
);
|
||||
|
||||
DAPI_(HRESULT) JsonWriteObjectEnd(
|
||||
__in JSON_WRITER* pWriter
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+132
-132
@@ -1,132 +1,132 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct LOC_STRING
|
||||
{
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzText;
|
||||
BOOL bOverridable;
|
||||
};
|
||||
|
||||
const int LOC_CONTROL_NOT_SET = INT_MAX;
|
||||
|
||||
struct LOC_CONTROL
|
||||
{
|
||||
LPWSTR wzControl;
|
||||
int nX;
|
||||
int nY;
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
LPWSTR wzText;
|
||||
};
|
||||
|
||||
const int WIX_LOCALIZATION_LANGUAGE_NOT_SET = INT_MAX;
|
||||
|
||||
struct WIX_LOCALIZATION
|
||||
{
|
||||
DWORD dwLangId;
|
||||
|
||||
DWORD cLocStrings;
|
||||
LOC_STRING* rgLocStrings;
|
||||
|
||||
DWORD cLocControls;
|
||||
LOC_CONTROL* rgLocControls;
|
||||
};
|
||||
|
||||
/********************************************************************
|
||||
LocProbeForFile - Searches for a localization file on disk.
|
||||
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocProbeForFile(
|
||||
__in_z LPCWSTR wzBasePath,
|
||||
__in_z LPCWSTR wzLocFileName,
|
||||
__in_z_opt LPCWSTR wzLanguage,
|
||||
__inout LPWSTR* psczPath
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocProbeForFileEx - Searches for a localization file on disk.
|
||||
useUILanguage should be set to TRUE.
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocProbeForFileEx(
|
||||
__in_z LPCWSTR wzBasePath,
|
||||
__in_z LPCWSTR wzLocFileName,
|
||||
__in_z_opt LPCWSTR wzLanguage,
|
||||
__inout LPWSTR* psczPath,
|
||||
__in BOOL useUILanguage
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLoadFromFile - Loads a localization file
|
||||
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLoadFromFile(
|
||||
__in_z LPCWSTR wzWxlFile,
|
||||
__out WIX_LOCALIZATION** ppWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLoadFromResource - loads a localization file from a module's data
|
||||
resource.
|
||||
|
||||
NOTE: The resource data must be UTF-8 encoded.
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLoadFromResource(
|
||||
__in HMODULE hModule,
|
||||
__in_z LPCSTR szResource,
|
||||
__out WIX_LOCALIZATION** ppWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocFree - free memory allocated when loading a localization file
|
||||
|
||||
*******************************************************************/
|
||||
void DAPI LocFree(
|
||||
__in_opt WIX_LOCALIZATION* pWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLocalizeString - replace any #(loc.id) in a string with the
|
||||
correct sub string
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLocalizeString(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__inout LPWSTR* psczInput
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocGetControl - returns a control's localization information
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocGetControl(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__out LOC_CONTROL** ppLocControl
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocGetString - returns a string's localization information
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocGetString(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__out LOC_STRING** ppLocString
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocAddString - adds a localization string
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocAddString(
|
||||
__in WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__in_z LPCWSTR wzLocString,
|
||||
__in BOOL bOverridable
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct LOC_STRING
|
||||
{
|
||||
LPWSTR wzId;
|
||||
LPWSTR wzText;
|
||||
BOOL bOverridable;
|
||||
};
|
||||
|
||||
const int LOC_CONTROL_NOT_SET = INT_MAX;
|
||||
|
||||
struct LOC_CONTROL
|
||||
{
|
||||
LPWSTR wzControl;
|
||||
int nX;
|
||||
int nY;
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
LPWSTR wzText;
|
||||
};
|
||||
|
||||
const int WIX_LOCALIZATION_LANGUAGE_NOT_SET = INT_MAX;
|
||||
|
||||
struct WIX_LOCALIZATION
|
||||
{
|
||||
DWORD dwLangId;
|
||||
|
||||
DWORD cLocStrings;
|
||||
LOC_STRING* rgLocStrings;
|
||||
|
||||
DWORD cLocControls;
|
||||
LOC_CONTROL* rgLocControls;
|
||||
};
|
||||
|
||||
/********************************************************************
|
||||
LocProbeForFile - Searches for a localization file on disk.
|
||||
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocProbeForFile(
|
||||
__in_z LPCWSTR wzBasePath,
|
||||
__in_z LPCWSTR wzLocFileName,
|
||||
__in_z_opt LPCWSTR wzLanguage,
|
||||
__inout LPWSTR* psczPath
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocProbeForFileEx - Searches for a localization file on disk.
|
||||
useUILanguage should be set to TRUE.
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocProbeForFileEx(
|
||||
__in_z LPCWSTR wzBasePath,
|
||||
__in_z LPCWSTR wzLocFileName,
|
||||
__in_z_opt LPCWSTR wzLanguage,
|
||||
__inout LPWSTR* psczPath,
|
||||
__in BOOL useUILanguage
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLoadFromFile - Loads a localization file
|
||||
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLoadFromFile(
|
||||
__in_z LPCWSTR wzWxlFile,
|
||||
__out WIX_LOCALIZATION** ppWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLoadFromResource - loads a localization file from a module's data
|
||||
resource.
|
||||
|
||||
NOTE: The resource data must be UTF-8 encoded.
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLoadFromResource(
|
||||
__in HMODULE hModule,
|
||||
__in_z LPCSTR szResource,
|
||||
__out WIX_LOCALIZATION** ppWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocFree - free memory allocated when loading a localization file
|
||||
|
||||
*******************************************************************/
|
||||
void DAPI LocFree(
|
||||
__in_opt WIX_LOCALIZATION* pWixLoc
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocLocalizeString - replace any #(loc.id) in a string with the
|
||||
correct sub string
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocLocalizeString(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__inout LPWSTR* psczInput
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocGetControl - returns a control's localization information
|
||||
*******************************************************************/
|
||||
HRESULT DAPI LocGetControl(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__out LOC_CONTROL** ppLocControl
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocGetString - returns a string's localization information
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocGetString(
|
||||
__in const WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__out LOC_STRING** ppLocString
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
LocAddString - adds a localization string
|
||||
*******************************************************************/
|
||||
extern "C" HRESULT DAPI LocAddString(
|
||||
__in WIX_LOCALIZATION* pWixLoc,
|
||||
__in_z LPCWSTR wzId,
|
||||
__in_z LPCWSTR wzLocString,
|
||||
__in BOOL bOverridable
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+200
-200
@@ -1,200 +1,200 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LogExitOnFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); ExitTrace(x, f); goto LExit; }
|
||||
#define LogExitOnFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define LogExitOnFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define LogExitOnFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define LogExitOnRootFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; }
|
||||
#define LogExitOnRootFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define LogExitOnRootFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define LogExitOnRootFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
typedef HRESULT (DAPI *PFN_LOGSTRINGWORKRAW)(
|
||||
__in_z LPCSTR szString,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
// enums
|
||||
|
||||
// structs
|
||||
|
||||
// functions
|
||||
BOOL DAPI IsLogInitialized();
|
||||
|
||||
BOOL DAPI IsLogOpen();
|
||||
|
||||
void DAPI LogInitialize(
|
||||
__in HMODULE hModule
|
||||
);
|
||||
|
||||
HRESULT DAPI LogOpen(
|
||||
__in_z_opt LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzLog,
|
||||
__in_z_opt LPCWSTR wzPostfix,
|
||||
__in_z_opt LPCWSTR wzExt,
|
||||
__in BOOL fAppend,
|
||||
__in BOOL fHeader,
|
||||
__out_z_opt LPWSTR* psczLogPath
|
||||
);
|
||||
|
||||
void DAPI LogDisable();
|
||||
|
||||
void DAPI LogRedirect(
|
||||
__in_opt PFN_LOGSTRINGWORKRAW vpfLogStringWorkRaw,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
HRESULT DAPI LogRename(
|
||||
__in_z LPCWSTR wzNewPath
|
||||
);
|
||||
|
||||
void DAPI LogClose(
|
||||
__in BOOL fFooter
|
||||
);
|
||||
|
||||
void DAPI LogUninitialize(
|
||||
__in BOOL fFooter
|
||||
);
|
||||
|
||||
BOOL DAPI LogIsOpen();
|
||||
|
||||
HRESULT DAPI LogSetSpecialParams(
|
||||
__in_z_opt LPCWSTR wzSpecialBeginLine,
|
||||
__in_z_opt LPCWSTR wzSpecialAfterTimeStamp,
|
||||
__in_z_opt LPCWSTR wzSpecialEndLine
|
||||
);
|
||||
|
||||
REPORT_LEVEL DAPI LogSetLevel(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in BOOL fLogChange
|
||||
);
|
||||
|
||||
REPORT_LEVEL DAPI LogGetLevel();
|
||||
|
||||
HRESULT DAPI LogGetPath(
|
||||
__out_ecount_z(cchLogPath) LPWSTR pwzLogPath,
|
||||
__in DWORD cchLogPath
|
||||
);
|
||||
|
||||
HANDLE DAPI LogGetHandle();
|
||||
|
||||
HRESULT DAPIV LogString(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogStringArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPIV LogStringLine(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogStringLineArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPI LogIdModuleArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
__in_opt HMODULE hModule,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
/*
|
||||
* Wraps LogIdModuleArgs, so inline to save the function call
|
||||
*/
|
||||
|
||||
inline HRESULT LogId(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
...
|
||||
)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
va_list args;
|
||||
|
||||
va_start(args, dwLogId);
|
||||
hr = LogIdModuleArgs(rl, dwLogId, NULL, args);
|
||||
va_end(args);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Wraps LogIdModuleArgs, so inline to save the function call
|
||||
*/
|
||||
|
||||
inline HRESULT LogIdArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
__in va_list args
|
||||
)
|
||||
{
|
||||
return LogIdModuleArgs(rl, dwLogId, NULL, args);
|
||||
}
|
||||
|
||||
HRESULT DAPIV LogErrorString(
|
||||
__in HRESULT hrError,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogErrorStringArgs(
|
||||
__in HRESULT hrError,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPI LogErrorIdModule(
|
||||
__in HRESULT hrError,
|
||||
__in DWORD dwLogId,
|
||||
__in_opt HMODULE hModule,
|
||||
__in_z_opt LPCWSTR wzString1,
|
||||
__in_z_opt LPCWSTR wzString2,
|
||||
__in_z_opt LPCWSTR wzString3
|
||||
);
|
||||
|
||||
inline HRESULT LogErrorId(
|
||||
__in HRESULT hrError,
|
||||
__in DWORD dwLogId,
|
||||
__in_z_opt LPCWSTR wzString1,
|
||||
__in_z_opt LPCWSTR wzString2,
|
||||
__in_z_opt LPCWSTR wzString3
|
||||
)
|
||||
{
|
||||
return LogErrorIdModule(hrError, dwLogId, NULL, wzString1, wzString2, wzString3);
|
||||
}
|
||||
|
||||
HRESULT DAPI LogHeader();
|
||||
|
||||
HRESULT DAPI LogFooter();
|
||||
|
||||
HRESULT LogStringWorkRaw(
|
||||
__in_z LPCSTR szLogData
|
||||
);
|
||||
|
||||
// begin the switch of LogXXX to LogStringXXX
|
||||
#define Log LogString
|
||||
#define LogLine LogStringLine
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LogExitOnFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); ExitTrace(x, f); goto LExit; }
|
||||
#define LogExitOnFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define LogExitOnFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define LogExitOnFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
#define LogExitOnRootFailure(x, i, f) if (FAILED(x)) { LogErrorId(x, i, NULL, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f); goto LExit; }
|
||||
#define LogExitOnRootFailure1(x, i, f, s) if (FAILED(x)) { LogErrorId(x, i, s, NULL, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace1(x, f, s); goto LExit; }
|
||||
#define LogExitOnRootFailure2(x, i, f, s, t) if (FAILED(x)) { LogErrorId(x, i, s, t, NULL); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace2(x, f, s, t); goto LExit; }
|
||||
#define LogExitOnRootFailure3(x, i, f, s, t, u) if (FAILED(x)) { LogErrorId(x, i, s, t, u); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace3(x, f, s, t, u); goto LExit; }
|
||||
|
||||
typedef HRESULT (DAPI *PFN_LOGSTRINGWORKRAW)(
|
||||
__in_z LPCSTR szString,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
// enums
|
||||
|
||||
// structs
|
||||
|
||||
// functions
|
||||
BOOL DAPI IsLogInitialized();
|
||||
|
||||
BOOL DAPI IsLogOpen();
|
||||
|
||||
void DAPI LogInitialize(
|
||||
__in HMODULE hModule
|
||||
);
|
||||
|
||||
HRESULT DAPI LogOpen(
|
||||
__in_z_opt LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzLog,
|
||||
__in_z_opt LPCWSTR wzPostfix,
|
||||
__in_z_opt LPCWSTR wzExt,
|
||||
__in BOOL fAppend,
|
||||
__in BOOL fHeader,
|
||||
__out_z_opt LPWSTR* psczLogPath
|
||||
);
|
||||
|
||||
void DAPI LogDisable();
|
||||
|
||||
void DAPI LogRedirect(
|
||||
__in_opt PFN_LOGSTRINGWORKRAW vpfLogStringWorkRaw,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
HRESULT DAPI LogRename(
|
||||
__in_z LPCWSTR wzNewPath
|
||||
);
|
||||
|
||||
void DAPI LogClose(
|
||||
__in BOOL fFooter
|
||||
);
|
||||
|
||||
void DAPI LogUninitialize(
|
||||
__in BOOL fFooter
|
||||
);
|
||||
|
||||
BOOL DAPI LogIsOpen();
|
||||
|
||||
HRESULT DAPI LogSetSpecialParams(
|
||||
__in_z_opt LPCWSTR wzSpecialBeginLine,
|
||||
__in_z_opt LPCWSTR wzSpecialAfterTimeStamp,
|
||||
__in_z_opt LPCWSTR wzSpecialEndLine
|
||||
);
|
||||
|
||||
REPORT_LEVEL DAPI LogSetLevel(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in BOOL fLogChange
|
||||
);
|
||||
|
||||
REPORT_LEVEL DAPI LogGetLevel();
|
||||
|
||||
HRESULT DAPI LogGetPath(
|
||||
__out_ecount_z(cchLogPath) LPWSTR pwzLogPath,
|
||||
__in DWORD cchLogPath
|
||||
);
|
||||
|
||||
HANDLE DAPI LogGetHandle();
|
||||
|
||||
HRESULT DAPIV LogString(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogStringArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPIV LogStringLine(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogStringLineArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPI LogIdModuleArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
__in_opt HMODULE hModule,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
/*
|
||||
* Wraps LogIdModuleArgs, so inline to save the function call
|
||||
*/
|
||||
|
||||
inline HRESULT LogId(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
...
|
||||
)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
va_list args;
|
||||
|
||||
va_start(args, dwLogId);
|
||||
hr = LogIdModuleArgs(rl, dwLogId, NULL, args);
|
||||
va_end(args);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Wraps LogIdModuleArgs, so inline to save the function call
|
||||
*/
|
||||
|
||||
inline HRESULT LogIdArgs(
|
||||
__in REPORT_LEVEL rl,
|
||||
__in DWORD dwLogId,
|
||||
__in va_list args
|
||||
)
|
||||
{
|
||||
return LogIdModuleArgs(rl, dwLogId, NULL, args);
|
||||
}
|
||||
|
||||
HRESULT DAPIV LogErrorString(
|
||||
__in HRESULT hrError,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI LogErrorStringArgs(
|
||||
__in HRESULT hrError,
|
||||
__in_z __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
|
||||
HRESULT DAPI LogErrorIdModule(
|
||||
__in HRESULT hrError,
|
||||
__in DWORD dwLogId,
|
||||
__in_opt HMODULE hModule,
|
||||
__in_z_opt LPCWSTR wzString1,
|
||||
__in_z_opt LPCWSTR wzString2,
|
||||
__in_z_opt LPCWSTR wzString3
|
||||
);
|
||||
|
||||
inline HRESULT LogErrorId(
|
||||
__in HRESULT hrError,
|
||||
__in DWORD dwLogId,
|
||||
__in_z_opt LPCWSTR wzString1,
|
||||
__in_z_opt LPCWSTR wzString2,
|
||||
__in_z_opt LPCWSTR wzString3
|
||||
)
|
||||
{
|
||||
return LogErrorIdModule(hrError, dwLogId, NULL, wzString1, wzString2, wzString3);
|
||||
}
|
||||
|
||||
HRESULT DAPI LogHeader();
|
||||
|
||||
HRESULT DAPI LogFooter();
|
||||
|
||||
HRESULT LogStringWorkRaw(
|
||||
__in_z LPCSTR szLogData
|
||||
);
|
||||
|
||||
// begin the switch of LogXXX to LogStringXXX
|
||||
#define Log LogString
|
||||
#define LogLine LogStringLine
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseMem(p) if (p) { MemFree(p); }
|
||||
#define ReleaseNullMem(p) if (p) { MemFree(p); p = NULL; }
|
||||
|
||||
HRESULT DAPI MemInitialize();
|
||||
void DAPI MemUninitialize();
|
||||
|
||||
LPVOID DAPI MemAlloc(
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero
|
||||
);
|
||||
LPVOID DAPI MemReAlloc(
|
||||
__in LPVOID pv,
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero
|
||||
);
|
||||
HRESULT DAPI MemReAllocSecure(
|
||||
__in LPVOID pv,
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero,
|
||||
__deref_out LPVOID* ppvNew
|
||||
);
|
||||
HRESULT DAPI MemEnsureArraySize(
|
||||
__deref_out_bcount(cArray * cbArrayType) LPVOID* ppvArray,
|
||||
__in DWORD cArray,
|
||||
__in SIZE_T cbArrayType,
|
||||
__in DWORD dwGrowthCount
|
||||
);
|
||||
HRESULT DAPI MemInsertIntoArray(
|
||||
__deref_out_bcount((cExistingArray + cNumInsertItems) * cbArrayType) LPVOID* ppvArray,
|
||||
__in DWORD dwInsertIndex,
|
||||
__in DWORD cNumInsertItems,
|
||||
__in DWORD cExistingArray,
|
||||
__in SIZE_T cbArrayType,
|
||||
__in DWORD dwGrowthCount
|
||||
);
|
||||
|
||||
HRESULT DAPI MemFree(
|
||||
__in LPVOID pv
|
||||
);
|
||||
SIZE_T DAPI MemSize(
|
||||
__in LPCVOID pv
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseMem(p) if (p) { MemFree(p); }
|
||||
#define ReleaseNullMem(p) if (p) { MemFree(p); p = NULL; }
|
||||
|
||||
HRESULT DAPI MemInitialize();
|
||||
void DAPI MemUninitialize();
|
||||
|
||||
LPVOID DAPI MemAlloc(
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero
|
||||
);
|
||||
LPVOID DAPI MemReAlloc(
|
||||
__in LPVOID pv,
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero
|
||||
);
|
||||
HRESULT DAPI MemReAllocSecure(
|
||||
__in LPVOID pv,
|
||||
__in SIZE_T cbSize,
|
||||
__in BOOL fZero,
|
||||
__deref_out LPVOID* ppvNew
|
||||
);
|
||||
HRESULT DAPI MemEnsureArraySize(
|
||||
__deref_out_bcount(cArray * cbArrayType) LPVOID* ppvArray,
|
||||
__in DWORD cArray,
|
||||
__in SIZE_T cbArrayType,
|
||||
__in DWORD dwGrowthCount
|
||||
);
|
||||
HRESULT DAPI MemInsertIntoArray(
|
||||
__deref_out_bcount((cExistingArray + cNumInsertItems) * cbArrayType) LPVOID* ppvArray,
|
||||
__in DWORD dwInsertIndex,
|
||||
__in DWORD cNumInsertItems,
|
||||
__in DWORD cExistingArray,
|
||||
__in SIZE_T cbArrayType,
|
||||
__in DWORD dwGrowthCount
|
||||
);
|
||||
|
||||
HRESULT DAPI MemFree(
|
||||
__in LPVOID pv
|
||||
);
|
||||
SIZE_T DAPI MemSize(
|
||||
__in LPCVOID pv
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <iadmw.h>
|
||||
#include <iiscnfg.h>
|
||||
#include <iwamreg.h>
|
||||
#include <mddefw.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
// prototypes
|
||||
HRESULT DAPI MetaFindWebBase(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in_z LPCWSTR wzIP,
|
||||
__in int iPort,
|
||||
__in_z LPCWSTR wzHeader,
|
||||
__in BOOL fSecure,
|
||||
__out_ecount(cchWebBase) LPWSTR wzWebBase,
|
||||
__in DWORD cchWebBase
|
||||
);
|
||||
HRESULT DAPI MetaFindFreeWebBase(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__out_ecount(cchWebBase) LPWSTR wzWebBase,
|
||||
__in DWORD cchWebBase
|
||||
);
|
||||
|
||||
HRESULT DAPI MetaOpenKey(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in METADATA_HANDLE mhKey,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__in DWORD dwAccess,
|
||||
__in DWORD cRetries,
|
||||
__out METADATA_HANDLE* pmh
|
||||
);
|
||||
HRESULT DAPI MetaGetValue(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in METADATA_HANDLE mhKey,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__inout METADATA_RECORD* pmr
|
||||
);
|
||||
void DAPI MetaFreeValue(
|
||||
__in METADATA_RECORD* pmr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <iadmw.h>
|
||||
#include <iiscnfg.h>
|
||||
#include <iwamreg.h>
|
||||
#include <mddefw.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
// prototypes
|
||||
HRESULT DAPI MetaFindWebBase(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in_z LPCWSTR wzIP,
|
||||
__in int iPort,
|
||||
__in_z LPCWSTR wzHeader,
|
||||
__in BOOL fSecure,
|
||||
__out_ecount(cchWebBase) LPWSTR wzWebBase,
|
||||
__in DWORD cchWebBase
|
||||
);
|
||||
HRESULT DAPI MetaFindFreeWebBase(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__out_ecount(cchWebBase) LPWSTR wzWebBase,
|
||||
__in DWORD cchWebBase
|
||||
);
|
||||
|
||||
HRESULT DAPI MetaOpenKey(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in METADATA_HANDLE mhKey,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__in DWORD dwAccess,
|
||||
__in DWORD cRetries,
|
||||
__out METADATA_HANDLE* pmh
|
||||
);
|
||||
HRESULT DAPI MetaGetValue(
|
||||
__in IMSAdminBaseW* piMetabase,
|
||||
__in METADATA_HANDLE mhKey,
|
||||
__in_z LPCWSTR wzKey,
|
||||
__inout METADATA_RECORD* pmr
|
||||
);
|
||||
void DAPI MetaFreeValue(
|
||||
__in METADATA_RECORD* pmr
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,39 +1,39 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OS_VERSION
|
||||
{
|
||||
OS_VERSION_UNKNOWN,
|
||||
OS_VERSION_WINNT,
|
||||
OS_VERSION_WIN2000,
|
||||
OS_VERSION_WINXP,
|
||||
OS_VERSION_WIN2003,
|
||||
OS_VERSION_VISTA,
|
||||
OS_VERSION_WIN2008,
|
||||
OS_VERSION_WIN7,
|
||||
OS_VERSION_WIN2008_R2,
|
||||
OS_VERSION_FUTURE
|
||||
} OS_VERSION;
|
||||
|
||||
void DAPI OsGetVersion(
|
||||
__out OS_VERSION* pVersion,
|
||||
__out DWORD* pdwServicePack
|
||||
);
|
||||
HRESULT DAPI OsCouldRunPrivileged(
|
||||
__out BOOL* pfPrivileged
|
||||
);
|
||||
HRESULT DAPI OsIsRunningPrivileged(
|
||||
__out BOOL* pfPrivileged
|
||||
);
|
||||
HRESULT DAPI OsIsUacEnabled(
|
||||
__out BOOL* pfUacEnabled
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum OS_VERSION
|
||||
{
|
||||
OS_VERSION_UNKNOWN,
|
||||
OS_VERSION_WINNT,
|
||||
OS_VERSION_WIN2000,
|
||||
OS_VERSION_WINXP,
|
||||
OS_VERSION_WIN2003,
|
||||
OS_VERSION_VISTA,
|
||||
OS_VERSION_WIN2008,
|
||||
OS_VERSION_WIN7,
|
||||
OS_VERSION_WIN2008_R2,
|
||||
OS_VERSION_FUTURE
|
||||
} OS_VERSION;
|
||||
|
||||
void DAPI OsGetVersion(
|
||||
__out OS_VERSION* pVersion,
|
||||
__out DWORD* pdwServicePack
|
||||
);
|
||||
HRESULT DAPI OsCouldRunPrivileged(
|
||||
__out BOOL* pfPrivileged
|
||||
);
|
||||
HRESULT DAPI OsIsRunningPrivileged(
|
||||
__out BOOL* pfPrivileged
|
||||
);
|
||||
HRESULT DAPI OsIsUacEnabled(
|
||||
__out BOOL* pfUacEnabled
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+228
-228
@@ -1,228 +1,228 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum PATH_EXPAND
|
||||
{
|
||||
PATH_EXPAND_ENVIRONMENT = 0x0001,
|
||||
PATH_EXPAND_FULLPATH = 0x0002,
|
||||
} PATH_EXPAND;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
PathCommandLineAppend - appends a command line argument on to a
|
||||
string such that ::CommandLineToArgv() will shred them correctly
|
||||
(i.e. quote arguments with spaces in them).
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathCommandLineAppend(
|
||||
__deref_out_z LPWSTR* psczCommandLine,
|
||||
__in_z LPCWSTR wzArgument
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathFile - returns a pointer to the file part of the path.
|
||||
********************************************************************/
|
||||
DAPI_(LPWSTR) PathFile(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathExtension - returns a pointer to the extension part of the path
|
||||
(including the dot).
|
||||
********************************************************************/
|
||||
DAPI_(LPCWSTR) PathExtension(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetDirectory - extracts the directory from a path.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathGetDirectory(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out LPWSTR *psczDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetParentPath - extracts the parent directory from a full path.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathGetParentPath(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out LPWSTR *psczDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathExpand - gets the full path to a file resolving environment
|
||||
variables along the way.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathExpand(
|
||||
__out LPWSTR *psczFullPath,
|
||||
__in_z LPCWSTR wzRelativePath,
|
||||
__in DWORD dwResolveFlags
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathPrefix - prefixes a full path with \\?\ or \\?\UNC as
|
||||
appropriate.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathPrefix(
|
||||
__inout LPWSTR *psczFullPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathFixedBackslashTerminate - appends a \ if path does not have it
|
||||
already, but fails if the buffer is
|
||||
insufficient.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathFixedBackslashTerminate(
|
||||
__inout_ecount_z(cchPath) LPWSTR wzPath,
|
||||
__in DWORD_PTR cchPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathBackslashTerminate - appends a \ if path does not have it
|
||||
already.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathBackslashTerminate(
|
||||
__inout LPWSTR* psczPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathForCurrentProcess - gets the full path to the currently executing
|
||||
process or (optionally) a module inside the process.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathForCurrentProcess(
|
||||
__inout LPWSTR *psczFullPath,
|
||||
__in_opt HMODULE hModule
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathRelativeToModule - gets the name of a file in the same
|
||||
directory as the current process or (optionally) a module inside
|
||||
the process
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathRelativeToModule(
|
||||
__inout LPWSTR *psczFullPath,
|
||||
__in_opt LPCWSTR wzFileName,
|
||||
__in_opt HMODULE hModule
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTempFile
|
||||
|
||||
Note: if wzDirectory is null, ::GetTempPath() will be used instead.
|
||||
if wzFileNameTemplate is null, GetTempFileName() will be used instead.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTempFile(
|
||||
__in_opt LPCWSTR wzDirectory,
|
||||
__in_opt __format_string LPCWSTR wzFileNameTemplate,
|
||||
__in DWORD dwUniqueCount,
|
||||
__in DWORD dwFileAttributes,
|
||||
__out_opt LPWSTR* psczTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTimeBasedTempFile - creates an empty temp file based on current
|
||||
system time
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTimeBasedTempFile(
|
||||
__in_z_opt LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z_opt LPCWSTR wzPostfix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* psczTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTempDirectory
|
||||
|
||||
Note: if wzDirectory is null, ::GetTempPath() will be used instead.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTempDirectory(
|
||||
__in_opt LPCWSTR wzDirectory,
|
||||
__in __format_string LPCWSTR wzDirectoryNameTemplate,
|
||||
__in DWORD dwUniqueCount,
|
||||
__out LPWSTR* psczTempDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetKnownFolder - returns the path to a well-known shell folder
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathGetKnownFolder(
|
||||
__in int csidl,
|
||||
__out LPWSTR* psczKnownFolder
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathIsAbsolute - returns true if the path is absolute; false
|
||||
otherwise.
|
||||
*******************************************************************/
|
||||
DAPI_(BOOL) PathIsAbsolute(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathConcat - like .NET's Path.Combine, lets you build up a path
|
||||
one piece -- file or directory -- at a time.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathConcat(
|
||||
__in_opt LPCWSTR wzPath1,
|
||||
__in_opt LPCWSTR wzPath2,
|
||||
__deref_out_z LPWSTR* psczCombined
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathEnsureQuoted - ensures that a path is quoted; optionally,
|
||||
this function also terminates a directory with a backslash
|
||||
if it is not already.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathEnsureQuoted(
|
||||
__inout LPWSTR* ppszPath,
|
||||
__in BOOL fDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCompare - compares the fully expanded path of the two paths using
|
||||
::CompareStringW().
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCompare(
|
||||
__in_z LPCWSTR wzPath1,
|
||||
__in_z LPCWSTR wzPath2,
|
||||
__out int* pnResult
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCompress - sets the compression state on an existing file or
|
||||
directory. A no-op on file systems that don't
|
||||
support compression.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCompress(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCanonicalizePath - wrapper around PathCanonicalizeW.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCanonicalizePath(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__deref_out_z LPWSTR* psczCanonicalized
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathDirectoryContainsPath - checks if wzPath is located inside
|
||||
wzDirectory.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathDirectoryContainsPath(
|
||||
__in_z LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum PATH_EXPAND
|
||||
{
|
||||
PATH_EXPAND_ENVIRONMENT = 0x0001,
|
||||
PATH_EXPAND_FULLPATH = 0x0002,
|
||||
} PATH_EXPAND;
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
PathCommandLineAppend - appends a command line argument on to a
|
||||
string such that ::CommandLineToArgv() will shred them correctly
|
||||
(i.e. quote arguments with spaces in them).
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathCommandLineAppend(
|
||||
__deref_out_z LPWSTR* psczCommandLine,
|
||||
__in_z LPCWSTR wzArgument
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathFile - returns a pointer to the file part of the path.
|
||||
********************************************************************/
|
||||
DAPI_(LPWSTR) PathFile(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathExtension - returns a pointer to the extension part of the path
|
||||
(including the dot).
|
||||
********************************************************************/
|
||||
DAPI_(LPCWSTR) PathExtension(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetDirectory - extracts the directory from a path.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathGetDirectory(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out LPWSTR *psczDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetParentPath - extracts the parent directory from a full path.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathGetParentPath(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out LPWSTR *psczDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathExpand - gets the full path to a file resolving environment
|
||||
variables along the way.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathExpand(
|
||||
__out LPWSTR *psczFullPath,
|
||||
__in_z LPCWSTR wzRelativePath,
|
||||
__in DWORD dwResolveFlags
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathPrefix - prefixes a full path with \\?\ or \\?\UNC as
|
||||
appropriate.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathPrefix(
|
||||
__inout LPWSTR *psczFullPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathFixedBackslashTerminate - appends a \ if path does not have it
|
||||
already, but fails if the buffer is
|
||||
insufficient.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathFixedBackslashTerminate(
|
||||
__inout_ecount_z(cchPath) LPWSTR wzPath,
|
||||
__in DWORD_PTR cchPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathBackslashTerminate - appends a \ if path does not have it
|
||||
already.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathBackslashTerminate(
|
||||
__inout LPWSTR* psczPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathForCurrentProcess - gets the full path to the currently executing
|
||||
process or (optionally) a module inside the process.
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathForCurrentProcess(
|
||||
__inout LPWSTR *psczFullPath,
|
||||
__in_opt HMODULE hModule
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathRelativeToModule - gets the name of a file in the same
|
||||
directory as the current process or (optionally) a module inside
|
||||
the process
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathRelativeToModule(
|
||||
__inout LPWSTR *psczFullPath,
|
||||
__in_opt LPCWSTR wzFileName,
|
||||
__in_opt HMODULE hModule
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTempFile
|
||||
|
||||
Note: if wzDirectory is null, ::GetTempPath() will be used instead.
|
||||
if wzFileNameTemplate is null, GetTempFileName() will be used instead.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTempFile(
|
||||
__in_opt LPCWSTR wzDirectory,
|
||||
__in_opt __format_string LPCWSTR wzFileNameTemplate,
|
||||
__in DWORD dwUniqueCount,
|
||||
__in DWORD dwFileAttributes,
|
||||
__out_opt LPWSTR* psczTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTimeBasedTempFile - creates an empty temp file based on current
|
||||
system time
|
||||
********************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTimeBasedTempFile(
|
||||
__in_z_opt LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in_z_opt LPCWSTR wzPostfix,
|
||||
__in_z LPCWSTR wzExtension,
|
||||
__deref_opt_out_z LPWSTR* psczTempFile,
|
||||
__out_opt HANDLE* phTempFile
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCreateTempDirectory
|
||||
|
||||
Note: if wzDirectory is null, ::GetTempPath() will be used instead.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCreateTempDirectory(
|
||||
__in_opt LPCWSTR wzDirectory,
|
||||
__in __format_string LPCWSTR wzDirectoryNameTemplate,
|
||||
__in DWORD dwUniqueCount,
|
||||
__out LPWSTR* psczTempDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathGetKnownFolder - returns the path to a well-known shell folder
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathGetKnownFolder(
|
||||
__in int csidl,
|
||||
__out LPWSTR* psczKnownFolder
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathIsAbsolute - returns true if the path is absolute; false
|
||||
otherwise.
|
||||
*******************************************************************/
|
||||
DAPI_(BOOL) PathIsAbsolute(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathConcat - like .NET's Path.Combine, lets you build up a path
|
||||
one piece -- file or directory -- at a time.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathConcat(
|
||||
__in_opt LPCWSTR wzPath1,
|
||||
__in_opt LPCWSTR wzPath2,
|
||||
__deref_out_z LPWSTR* psczCombined
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathEnsureQuoted - ensures that a path is quoted; optionally,
|
||||
this function also terminates a directory with a backslash
|
||||
if it is not already.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathEnsureQuoted(
|
||||
__inout LPWSTR* ppszPath,
|
||||
__in BOOL fDirectory
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCompare - compares the fully expanded path of the two paths using
|
||||
::CompareStringW().
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCompare(
|
||||
__in_z LPCWSTR wzPath1,
|
||||
__in_z LPCWSTR wzPath2,
|
||||
__out int* pnResult
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCompress - sets the compression state on an existing file or
|
||||
directory. A no-op on file systems that don't
|
||||
support compression.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCompress(
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathCanonicalizePath - wrapper around PathCanonicalizeW.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathCanonicalizePath(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__deref_out_z LPWSTR* psczCanonicalized
|
||||
);
|
||||
|
||||
/*******************************************************************
|
||||
PathDirectoryContainsPath - checks if wzPath is located inside
|
||||
wzDirectory.
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) PathDirectoryContainsPath(
|
||||
__in_z LPCWSTR wzDirectory,
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,24 +1,24 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
|
||||
// functions
|
||||
void DAPI PerfInitialize(
|
||||
);
|
||||
void DAPI PerfClickTime(
|
||||
__out_opt LARGE_INTEGER* pliElapsed
|
||||
);
|
||||
double DAPI PerfConvertToSeconds(
|
||||
__in const LARGE_INTEGER* pli
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
|
||||
|
||||
// functions
|
||||
void DAPI PerfInitialize(
|
||||
);
|
||||
void DAPI PerfClickTime(
|
||||
__out_opt LARGE_INTEGER* pliElapsed
|
||||
);
|
||||
double DAPI PerfConvertToSeconds(
|
||||
__in const LARGE_INTEGER* pli
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,39 +1,39 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const LPCWSTR POLICY_BURN_REGISTRY_PATH = L"WiX\\Burn";
|
||||
|
||||
/********************************************************************
|
||||
PolcReadNumber - reads a number from policy.
|
||||
|
||||
NOTE: S_FALSE returned if policy not set.
|
||||
NOTE: out is set to default on S_FALSE or any error.
|
||||
********************************************************************/
|
||||
HRESULT DAPI PolcReadNumber(
|
||||
__in_z LPCWSTR wzPolicyPath,
|
||||
__in_z LPCWSTR wzPolicyName,
|
||||
__in DWORD dwDefault,
|
||||
__out DWORD* pdw
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
PolcReadString - reads a string from policy.
|
||||
|
||||
NOTE: S_FALSE returned if policy not set.
|
||||
NOTE: out is set to default on S_FALSE or any error.
|
||||
********************************************************************/
|
||||
HRESULT DAPI PolcReadString(
|
||||
__in_z LPCWSTR wzPolicyPath,
|
||||
__in_z LPCWSTR wzPolicyName,
|
||||
__in_z_opt LPCWSTR wzDefault,
|
||||
__deref_out_z LPWSTR* pscz
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const LPCWSTR POLICY_BURN_REGISTRY_PATH = L"WiX\\Burn";
|
||||
|
||||
/********************************************************************
|
||||
PolcReadNumber - reads a number from policy.
|
||||
|
||||
NOTE: S_FALSE returned if policy not set.
|
||||
NOTE: out is set to default on S_FALSE or any error.
|
||||
********************************************************************/
|
||||
HRESULT DAPI PolcReadNumber(
|
||||
__in_z LPCWSTR wzPolicyPath,
|
||||
__in_z LPCWSTR wzPolicyName,
|
||||
__in DWORD dwDefault,
|
||||
__out DWORD* pdw
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
PolcReadString - reads a string from policy.
|
||||
|
||||
NOTE: S_FALSE returned if policy not set.
|
||||
NOTE: out is set to default on S_FALSE or any error.
|
||||
********************************************************************/
|
||||
HRESULT DAPI PolcReadString(
|
||||
__in_z LPCWSTR wzPolicyPath,
|
||||
__in_z LPCWSTR wzPolicyName,
|
||||
__in_z_opt LPCWSTR wzDefault,
|
||||
__deref_out_z LPWSTR* pscz
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,79 +1,79 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
typedef struct _PROC_FILESYSTEMREDIRECTION
|
||||
{
|
||||
BOOL fDisabled;
|
||||
LPVOID pvRevertState;
|
||||
} PROC_FILESYSTEMREDIRECTION;
|
||||
|
||||
HRESULT DAPI ProcElevated(
|
||||
__in HANDLE hProcess,
|
||||
__out BOOL* pfElevated
|
||||
);
|
||||
|
||||
HRESULT DAPI ProcWow64(
|
||||
__in HANDLE hProcess,
|
||||
__out BOOL* pfWow64
|
||||
);
|
||||
HRESULT DAPI ProcNativeMachine(
|
||||
__in HANDLE hProcess,
|
||||
__out USHORT* pusNativeMachine
|
||||
);
|
||||
HRESULT DAPI ProcDisableWowFileSystemRedirection(
|
||||
__in PROC_FILESYSTEMREDIRECTION* pfsr
|
||||
);
|
||||
HRESULT DAPI ProcRevertWowFileSystemRedirection(
|
||||
__in PROC_FILESYSTEMREDIRECTION* pfsr
|
||||
);
|
||||
|
||||
HRESULT DAPI ProcExec(
|
||||
__in_z LPCWSTR wzExecutablePath,
|
||||
__in_z_opt LPCWSTR wzCommandLine,
|
||||
__in int nCmdShow,
|
||||
__out HANDLE *phProcess
|
||||
);
|
||||
HRESULT DAPI ProcExecute(
|
||||
__in_z LPWSTR wzCommand,
|
||||
__out HANDLE *phProcess,
|
||||
__out_opt HANDLE *phChildStdIn,
|
||||
__out_opt HANDLE *phChildStdOutErr
|
||||
);
|
||||
HRESULT DAPI ProcWaitForCompletion(
|
||||
__in HANDLE hProcess,
|
||||
__in DWORD dwTimeout,
|
||||
__out DWORD *pReturnCode
|
||||
);
|
||||
HRESULT DAPI ProcWaitForIds(
|
||||
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
|
||||
__in DWORD cProcessIds,
|
||||
__in DWORD dwMilliseconds
|
||||
);
|
||||
HRESULT DAPI ProcCloseIds(
|
||||
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
|
||||
__in DWORD cProcessIds
|
||||
);
|
||||
|
||||
// following code in proc2utl.cpp due to dependency on PSAPI.DLL.
|
||||
HRESULT DAPI ProcFindAllIdsFromExeName(
|
||||
__in_z LPCWSTR wzExeName,
|
||||
__out DWORD** ppdwProcessIds,
|
||||
__out DWORD* pcProcessIds
|
||||
);
|
||||
|
||||
// following code in proc3utl.cpp due to dependency on Wtsapi32.DLL.
|
||||
HRESULT DAPI ProcExecuteAsInteractiveUser(
|
||||
__in_z LPCWSTR wzExecutablePath,
|
||||
__in_z LPCWSTR wzCommand,
|
||||
__out HANDLE *phProcess
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// structs
|
||||
typedef struct _PROC_FILESYSTEMREDIRECTION
|
||||
{
|
||||
BOOL fDisabled;
|
||||
LPVOID pvRevertState;
|
||||
} PROC_FILESYSTEMREDIRECTION;
|
||||
|
||||
HRESULT DAPI ProcElevated(
|
||||
__in HANDLE hProcess,
|
||||
__out BOOL* pfElevated
|
||||
);
|
||||
|
||||
HRESULT DAPI ProcWow64(
|
||||
__in HANDLE hProcess,
|
||||
__out BOOL* pfWow64
|
||||
);
|
||||
HRESULT DAPI ProcNativeMachine(
|
||||
__in HANDLE hProcess,
|
||||
__out USHORT* pusNativeMachine
|
||||
);
|
||||
HRESULT DAPI ProcDisableWowFileSystemRedirection(
|
||||
__in PROC_FILESYSTEMREDIRECTION* pfsr
|
||||
);
|
||||
HRESULT DAPI ProcRevertWowFileSystemRedirection(
|
||||
__in PROC_FILESYSTEMREDIRECTION* pfsr
|
||||
);
|
||||
|
||||
HRESULT DAPI ProcExec(
|
||||
__in_z LPCWSTR wzExecutablePath,
|
||||
__in_z_opt LPCWSTR wzCommandLine,
|
||||
__in int nCmdShow,
|
||||
__out HANDLE *phProcess
|
||||
);
|
||||
HRESULT DAPI ProcExecute(
|
||||
__in_z LPWSTR wzCommand,
|
||||
__out HANDLE *phProcess,
|
||||
__out_opt HANDLE *phChildStdIn,
|
||||
__out_opt HANDLE *phChildStdOutErr
|
||||
);
|
||||
HRESULT DAPI ProcWaitForCompletion(
|
||||
__in HANDLE hProcess,
|
||||
__in DWORD dwTimeout,
|
||||
__out DWORD *pReturnCode
|
||||
);
|
||||
HRESULT DAPI ProcWaitForIds(
|
||||
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
|
||||
__in DWORD cProcessIds,
|
||||
__in DWORD dwMilliseconds
|
||||
);
|
||||
HRESULT DAPI ProcCloseIds(
|
||||
__in_ecount(cProcessIds) const DWORD* pdwProcessIds,
|
||||
__in DWORD cProcessIds
|
||||
);
|
||||
|
||||
// following code in proc2utl.cpp due to dependency on PSAPI.DLL.
|
||||
HRESULT DAPI ProcFindAllIdsFromExeName(
|
||||
__in_z LPCWSTR wzExeName,
|
||||
__out DWORD** ppdwProcessIds,
|
||||
__out DWORD* pcProcessIds
|
||||
);
|
||||
|
||||
// following code in proc3utl.cpp due to dependency on Wtsapi32.DLL.
|
||||
HRESULT DAPI ProcExecuteAsInteractiveUser(
|
||||
__in_z LPCWSTR wzExecutablePath,
|
||||
__in_z LPCWSTR wzCommand,
|
||||
__out HANDLE *phProcess
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+233
-233
@@ -1,233 +1,233 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define ReleaseRegKey(h) if (h) { ::RegCloseKey(h); h = NULL; }
|
||||
|
||||
typedef enum REG_KEY_BITNESS
|
||||
{
|
||||
REG_KEY_DEFAULT = 0,
|
||||
REG_KEY_32BIT = 1,
|
||||
REG_KEY_64BIT = 2
|
||||
} REG_KEY_BITNESS;
|
||||
|
||||
typedef LSTATUS (APIENTRY *PFN_REGCREATEKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey,
|
||||
__reserved DWORD Reserved,
|
||||
__in_opt LPWSTR lpClass,
|
||||
__in DWORD dwOptions,
|
||||
__in REGSAM samDesired,
|
||||
__in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
__out PHKEY phkResult,
|
||||
__out_opt LPDWORD lpdwDisposition
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGOPENKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpSubKey,
|
||||
__reserved DWORD ulOptions,
|
||||
__in REGSAM samDesired,
|
||||
__out PHKEY phkResult
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey,
|
||||
__in REGSAM samDesired,
|
||||
__reserved DWORD Reserved
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGENUMKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in DWORD dwIndex,
|
||||
__out LPWSTR lpName,
|
||||
__inout LPDWORD lpcName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__inout LPWSTR lpClass,
|
||||
__inout_opt LPDWORD lpcClass,
|
||||
__out_opt PFILETIME lpftLastWriteTime
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGENUMVALUEW)(
|
||||
__in HKEY hKey,
|
||||
__in DWORD dwIndex,
|
||||
__out LPWSTR lpValueName,
|
||||
__inout LPDWORD lpcchValueName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpType,
|
||||
__out_opt LPBYTE lpData,
|
||||
__out_opt LPDWORD lpcbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGQUERYINFOKEYW)(
|
||||
__in HKEY hKey,
|
||||
__out LPWSTR lpClass,
|
||||
__inout_opt LPDWORD lpcClass,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpcSubKeys,
|
||||
__out_opt LPDWORD lpcMaxSubKeyLen,
|
||||
__out_opt LPDWORD lpcMaxClassLen,
|
||||
__out_opt LPDWORD lpcValues,
|
||||
__out_opt LPDWORD lpcMaxValueNameLen,
|
||||
__out_opt LPDWORD lpcMaxValueLen,
|
||||
__out_opt LPDWORD lpcbSecurityDescriptor,
|
||||
__out_opt PFILETIME lpftLastWriteTime
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGQUERYVALUEEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpType,
|
||||
__out_bcount_part_opt(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
|
||||
__inout_opt LPDWORD lpcbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGSETVALUEEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName,
|
||||
__reserved DWORD Reserved,
|
||||
__in DWORD dwType,
|
||||
__in_bcount_opt(cbData) CONST BYTE* lpData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEVALUEW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName
|
||||
);
|
||||
|
||||
HRESULT DAPI RegInitialize();
|
||||
void DAPI RegUninitialize();
|
||||
|
||||
void DAPI RegFunctionOverride(
|
||||
__in_opt PFN_REGCREATEKEYEXW pfnRegCreateKeyExW,
|
||||
__in_opt PFN_REGOPENKEYEXW pfnRegOpenKeyExW,
|
||||
__in_opt PFN_REGDELETEKEYEXW pfnRegDeleteKeyExW,
|
||||
__in_opt PFN_REGENUMKEYEXW pfnRegEnumKeyExW,
|
||||
__in_opt PFN_REGENUMVALUEW pfnRegEnumValueW,
|
||||
__in_opt PFN_REGQUERYINFOKEYW pfnRegQueryInfoKeyW,
|
||||
__in_opt PFN_REGQUERYVALUEEXW pfnRegQueryValueExW,
|
||||
__in_opt PFN_REGSETVALUEEXW pfnRegSetValueExW,
|
||||
__in_opt PFN_REGDELETEVALUEW pfnRegDeleteValueW
|
||||
);
|
||||
HRESULT DAPI RegCreate(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__out HKEY* phk
|
||||
);
|
||||
HRESULT DAPI RegCreateEx(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__in BOOL fVolatile,
|
||||
__in_opt SECURITY_ATTRIBUTES* pSecurityAttributes,
|
||||
__out HKEY* phk,
|
||||
__out_opt BOOL* pfCreated
|
||||
);
|
||||
HRESULT DAPI RegOpen(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__out HKEY* phk
|
||||
);
|
||||
HRESULT DAPI RegDelete(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in REG_KEY_BITNESS kbKeyBitness,
|
||||
__in BOOL fDeleteTree
|
||||
);
|
||||
HRESULT DAPI RegKeyEnum(
|
||||
__in HKEY hk,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_z LPWSTR* psczKey
|
||||
);
|
||||
HRESULT DAPI RegValueEnum(
|
||||
__in HKEY hk,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_z LPWSTR* psczName,
|
||||
__out_opt DWORD *pdwType
|
||||
);
|
||||
HRESULT DAPI RegGetType(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD *pdwType
|
||||
);
|
||||
HRESULT DAPI RegReadBinary(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_bcount_opt(*pcbBuffer) BYTE** ppbBuffer,
|
||||
__out SIZE_T *pcbBuffer
|
||||
);
|
||||
HRESULT DAPI RegReadString(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI RegReadStringArray(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_ecount_opt(pcStrings) LPWSTR** prgsczStrings,
|
||||
__out DWORD *pcStrings
|
||||
);
|
||||
HRESULT DAPI RegReadVersion(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD64* pdw64Version
|
||||
);
|
||||
HRESULT DAPI RegReadNumber(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI RegReadQword(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD64* pqwValue
|
||||
);
|
||||
HRESULT DAPI RegWriteBinary(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_bcount(cbBuffer) const BYTE *pbBuffer,
|
||||
__in DWORD cbBuffer
|
||||
);
|
||||
HRESULT DAPI RegWriteString(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI RegWriteStringArray(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_ecount(cValues) LPWSTR *rgwzStrings,
|
||||
__in DWORD cStrings
|
||||
);
|
||||
HRESULT DAPI RegWriteStringFormatted(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in __format_string LPCWSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI RegWriteNumber(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI RegWriteQword(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI RegQueryKey(
|
||||
__in HKEY hk,
|
||||
__out_opt DWORD* pcSubKeys,
|
||||
__out_opt DWORD* pcValues
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define ReleaseRegKey(h) if (h) { ::RegCloseKey(h); h = NULL; }
|
||||
|
||||
typedef enum REG_KEY_BITNESS
|
||||
{
|
||||
REG_KEY_DEFAULT = 0,
|
||||
REG_KEY_32BIT = 1,
|
||||
REG_KEY_64BIT = 2
|
||||
} REG_KEY_BITNESS;
|
||||
|
||||
typedef LSTATUS (APIENTRY *PFN_REGCREATEKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey,
|
||||
__reserved DWORD Reserved,
|
||||
__in_opt LPWSTR lpClass,
|
||||
__in DWORD dwOptions,
|
||||
__in REGSAM samDesired,
|
||||
__in_opt CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
__out PHKEY phkResult,
|
||||
__out_opt LPDWORD lpdwDisposition
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGOPENKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpSubKey,
|
||||
__reserved DWORD ulOptions,
|
||||
__in REGSAM samDesired,
|
||||
__out PHKEY phkResult
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey,
|
||||
__in REGSAM samDesired,
|
||||
__reserved DWORD Reserved
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEKEYW)(
|
||||
__in HKEY hKey,
|
||||
__in LPCWSTR lpSubKey
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGENUMKEYEXW)(
|
||||
__in HKEY hKey,
|
||||
__in DWORD dwIndex,
|
||||
__out LPWSTR lpName,
|
||||
__inout LPDWORD lpcName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__inout LPWSTR lpClass,
|
||||
__inout_opt LPDWORD lpcClass,
|
||||
__out_opt PFILETIME lpftLastWriteTime
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGENUMVALUEW)(
|
||||
__in HKEY hKey,
|
||||
__in DWORD dwIndex,
|
||||
__out LPWSTR lpValueName,
|
||||
__inout LPDWORD lpcchValueName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpType,
|
||||
__out_opt LPBYTE lpData,
|
||||
__out_opt LPDWORD lpcbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGQUERYINFOKEYW)(
|
||||
__in HKEY hKey,
|
||||
__out LPWSTR lpClass,
|
||||
__inout_opt LPDWORD lpcClass,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpcSubKeys,
|
||||
__out_opt LPDWORD lpcMaxSubKeyLen,
|
||||
__out_opt LPDWORD lpcMaxClassLen,
|
||||
__out_opt LPDWORD lpcValues,
|
||||
__out_opt LPDWORD lpcMaxValueNameLen,
|
||||
__out_opt LPDWORD lpcMaxValueLen,
|
||||
__out_opt LPDWORD lpcbSecurityDescriptor,
|
||||
__out_opt PFILETIME lpftLastWriteTime
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGQUERYVALUEEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName,
|
||||
__reserved LPDWORD lpReserved,
|
||||
__out_opt LPDWORD lpType,
|
||||
__out_bcount_part_opt(*lpcbData, *lpcbData) __out_data_source(REGISTRY) LPBYTE lpData,
|
||||
__inout_opt LPDWORD lpcbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGSETVALUEEXW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName,
|
||||
__reserved DWORD Reserved,
|
||||
__in DWORD dwType,
|
||||
__in_bcount_opt(cbData) CONST BYTE* lpData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
typedef LSTATUS (APIENTRY *PFN_REGDELETEVALUEW)(
|
||||
__in HKEY hKey,
|
||||
__in_opt LPCWSTR lpValueName
|
||||
);
|
||||
|
||||
HRESULT DAPI RegInitialize();
|
||||
void DAPI RegUninitialize();
|
||||
|
||||
void DAPI RegFunctionOverride(
|
||||
__in_opt PFN_REGCREATEKEYEXW pfnRegCreateKeyExW,
|
||||
__in_opt PFN_REGOPENKEYEXW pfnRegOpenKeyExW,
|
||||
__in_opt PFN_REGDELETEKEYEXW pfnRegDeleteKeyExW,
|
||||
__in_opt PFN_REGENUMKEYEXW pfnRegEnumKeyExW,
|
||||
__in_opt PFN_REGENUMVALUEW pfnRegEnumValueW,
|
||||
__in_opt PFN_REGQUERYINFOKEYW pfnRegQueryInfoKeyW,
|
||||
__in_opt PFN_REGQUERYVALUEEXW pfnRegQueryValueExW,
|
||||
__in_opt PFN_REGSETVALUEEXW pfnRegSetValueExW,
|
||||
__in_opt PFN_REGDELETEVALUEW pfnRegDeleteValueW
|
||||
);
|
||||
HRESULT DAPI RegCreate(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__out HKEY* phk
|
||||
);
|
||||
HRESULT DAPI RegCreateEx(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__in BOOL fVolatile,
|
||||
__in_opt SECURITY_ATTRIBUTES* pSecurityAttributes,
|
||||
__out HKEY* phk,
|
||||
__out_opt BOOL* pfCreated
|
||||
);
|
||||
HRESULT DAPI RegOpen(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in DWORD dwAccess,
|
||||
__out HKEY* phk
|
||||
);
|
||||
HRESULT DAPI RegDelete(
|
||||
__in HKEY hkRoot,
|
||||
__in_z LPCWSTR wzSubKey,
|
||||
__in REG_KEY_BITNESS kbKeyBitness,
|
||||
__in BOOL fDeleteTree
|
||||
);
|
||||
HRESULT DAPI RegKeyEnum(
|
||||
__in HKEY hk,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_z LPWSTR* psczKey
|
||||
);
|
||||
HRESULT DAPI RegValueEnum(
|
||||
__in HKEY hk,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_z LPWSTR* psczName,
|
||||
__out_opt DWORD *pdwType
|
||||
);
|
||||
HRESULT DAPI RegGetType(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD *pdwType
|
||||
);
|
||||
HRESULT DAPI RegReadBinary(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_bcount_opt(*pcbBuffer) BYTE** ppbBuffer,
|
||||
__out SIZE_T *pcbBuffer
|
||||
);
|
||||
HRESULT DAPI RegReadString(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI RegReadStringArray(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__deref_out_ecount_opt(pcStrings) LPWSTR** prgsczStrings,
|
||||
__out DWORD *pcStrings
|
||||
);
|
||||
HRESULT DAPI RegReadVersion(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD64* pdw64Version
|
||||
);
|
||||
HRESULT DAPI RegReadNumber(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI RegReadQword(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__out DWORD64* pqwValue
|
||||
);
|
||||
HRESULT DAPI RegWriteBinary(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_bcount(cbBuffer) const BYTE *pbBuffer,
|
||||
__in DWORD cbBuffer
|
||||
);
|
||||
HRESULT DAPI RegWriteString(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI RegWriteStringArray(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in_ecount(cValues) LPWSTR *rgwzStrings,
|
||||
__in DWORD cStrings
|
||||
);
|
||||
HRESULT DAPI RegWriteStringFormatted(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in __format_string LPCWSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI RegWriteNumber(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI RegWriteQword(
|
||||
__in HKEY hk,
|
||||
__in_z_opt LPCWSTR wzName,
|
||||
__in DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI RegQueryKey(
|
||||
__in HKEY hk,
|
||||
__out_opt DWORD* pcSubKeys,
|
||||
__out_opt DWORD* pcValues
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI ResGetStringLangId(
|
||||
__in_opt LPCWSTR wzPath,
|
||||
__in UINT uID,
|
||||
__out WORD *pwLangId
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadString(
|
||||
__in HINSTANCE hinst,
|
||||
__in UINT uID,
|
||||
__deref_out_z LPWSTR* ppwzString
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadStringAnsi(
|
||||
__in HINSTANCE hinst,
|
||||
__in UINT uID,
|
||||
__deref_out_z LPSTR* ppszString
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadData(
|
||||
__in_opt HINSTANCE hinst,
|
||||
__in_z LPCSTR szDataName,
|
||||
__deref_out_bcount(*pcb) PVOID *ppv,
|
||||
__out DWORD *pcb
|
||||
);
|
||||
|
||||
HRESULT DAPI ResExportDataToFile(
|
||||
__in_z LPCSTR szDataName,
|
||||
__in_z LPCWSTR wzTargetFile,
|
||||
__in DWORD dwCreationDisposition
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI ResGetStringLangId(
|
||||
__in_opt LPCWSTR wzPath,
|
||||
__in UINT uID,
|
||||
__out WORD *pwLangId
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadString(
|
||||
__in HINSTANCE hinst,
|
||||
__in UINT uID,
|
||||
__deref_out_z LPWSTR* ppwzString
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadStringAnsi(
|
||||
__in HINSTANCE hinst,
|
||||
__in UINT uID,
|
||||
__deref_out_z LPSTR* ppszString
|
||||
);
|
||||
|
||||
HRESULT DAPI ResReadData(
|
||||
__in_opt HINSTANCE hinst,
|
||||
__in_z LPCSTR szDataName,
|
||||
__deref_out_bcount(*pcb) PVOID *ppv,
|
||||
__out DWORD *pcb
|
||||
);
|
||||
|
||||
HRESULT DAPI ResExportDataToFile(
|
||||
__in_z LPCSTR szDataName,
|
||||
__in_z LPCWSTR wzTargetFile,
|
||||
__in DWORD dwCreationDisposition
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI ResWriteString(
|
||||
__in_z LPCWSTR wzResourceFile,
|
||||
__in DWORD dwDataId,
|
||||
__in_z LPCWSTR wzData,
|
||||
__in WORD wLangId
|
||||
);
|
||||
|
||||
HRESULT DAPI ResWriteData(
|
||||
__in_z LPCWSTR wzResourceFile,
|
||||
__in_z LPCSTR szDataName,
|
||||
__in PVOID pData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
|
||||
HRESULT DAPI ResImportDataFromFile(
|
||||
__in_z LPCWSTR wzTargetFile,
|
||||
__in_z LPCWSTR wzSourceFile,
|
||||
__in_z LPCSTR szDataName
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI ResWriteString(
|
||||
__in_z LPCWSTR wzResourceFile,
|
||||
__in DWORD dwDataId,
|
||||
__in_z LPCWSTR wzData,
|
||||
__in WORD wLangId
|
||||
);
|
||||
|
||||
HRESULT DAPI ResWriteData(
|
||||
__in_z LPCWSTR wzResourceFile,
|
||||
__in_z LPCSTR szDataName,
|
||||
__in PVOID pData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
|
||||
HRESULT DAPI ResImportDataFromFile(
|
||||
__in_z LPCWSTR wzTargetFile,
|
||||
__in_z LPCWSTR wzSourceFile,
|
||||
__in_z LPCSTR szDataName
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,54 +1,54 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <sys\stat.h>
|
||||
#include <fdi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// defines
|
||||
#define FILETABLESIZE 40
|
||||
|
||||
// structs
|
||||
struct MEM_FILE
|
||||
{
|
||||
LPCBYTE vpStart;
|
||||
UINT uiCurrent;
|
||||
UINT uiLength;
|
||||
};
|
||||
|
||||
typedef enum FAKE_FILE_TYPE { NORMAL_FILE, MEMORY_FILE } FAKE_FILE_TYPE;
|
||||
|
||||
typedef HRESULT (*REX_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext);
|
||||
typedef VOID (*REX_CALLBACK_WRITE)(UINT cb);
|
||||
|
||||
|
||||
struct FAKE_FILE // used __in internal file table
|
||||
{
|
||||
BOOL fUsed;
|
||||
FAKE_FILE_TYPE fftType;
|
||||
MEM_FILE mfFile; // State for memory file
|
||||
HANDLE hFile; // Handle for disk file
|
||||
};
|
||||
|
||||
// functions
|
||||
HRESULT RexInitialize();
|
||||
void RexUninitialize();
|
||||
|
||||
HRESULT RexExtract(
|
||||
__in_z LPCSTR szResource,
|
||||
__in_z LPCWSTR wzExtractId,
|
||||
__in_z LPCWSTR wzExtractDir,
|
||||
__in_z LPCWSTR wzExtractName,
|
||||
__in REX_CALLBACK_PROGRESS pfnProgress,
|
||||
__in REX_CALLBACK_WRITE pfnWrite,
|
||||
__in LPVOID pvContext
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <sys\stat.h>
|
||||
#include <fdi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// defines
|
||||
#define FILETABLESIZE 40
|
||||
|
||||
// structs
|
||||
struct MEM_FILE
|
||||
{
|
||||
LPCBYTE vpStart;
|
||||
UINT uiCurrent;
|
||||
UINT uiLength;
|
||||
};
|
||||
|
||||
typedef enum FAKE_FILE_TYPE { NORMAL_FILE, MEMORY_FILE } FAKE_FILE_TYPE;
|
||||
|
||||
typedef HRESULT (*REX_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext);
|
||||
typedef VOID (*REX_CALLBACK_WRITE)(UINT cb);
|
||||
|
||||
|
||||
struct FAKE_FILE // used __in internal file table
|
||||
{
|
||||
BOOL fUsed;
|
||||
FAKE_FILE_TYPE fftType;
|
||||
MEM_FILE mfFile; // State for memory file
|
||||
HANDLE hFile; // Handle for disk file
|
||||
};
|
||||
|
||||
// functions
|
||||
HRESULT RexInitialize();
|
||||
void RexUninitialize();
|
||||
|
||||
HRESULT RexExtract(
|
||||
__in_z LPCSTR szResource,
|
||||
__in_z LPCWSTR wzExtractId,
|
||||
__in_z LPCWSTR wzExtractDir,
|
||||
__in_z LPCWSTR wzExtractName,
|
||||
__in REX_CALLBACK_PROGRESS pfnProgress,
|
||||
__in REX_CALLBACK_WRITE pfnWrite,
|
||||
__in LPVOID pvContext
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _RMU_SESSION *PRMU_SESSION;
|
||||
|
||||
HRESULT DAPI RmuJoinSession(
|
||||
__out PRMU_SESSION *ppSession,
|
||||
__in_z LPCWSTR wzSessionKey
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddFile(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddProcessById(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in DWORD dwProcessId
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddProcessesByName(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzProcessName
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddService(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzServiceName
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuRegisterResources(
|
||||
__in PRMU_SESSION pSession
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuEndSession(
|
||||
__in PRMU_SESSION pSession
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _RMU_SESSION *PRMU_SESSION;
|
||||
|
||||
HRESULT DAPI RmuJoinSession(
|
||||
__out PRMU_SESSION *ppSession,
|
||||
__in_z LPCWSTR wzSessionKey
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddFile(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzPath
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddProcessById(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in DWORD dwProcessId
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddProcessesByName(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzProcessName
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuAddService(
|
||||
__in PRMU_SESSION pSession,
|
||||
__in_z LPCWSTR wzServiceName
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuRegisterResources(
|
||||
__in PRMU_SESSION pSession
|
||||
);
|
||||
|
||||
HRESULT DAPI RmuEndSession(
|
||||
__in PRMU_SESSION pSession
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,89 +1,89 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseRssChannel(p) if (p) { RssFreeChannel(p); }
|
||||
#define ReleaseNullRssChannel(p) if (p) { RssFreeChannel(p); p = NULL; }
|
||||
|
||||
|
||||
struct RSS_UNKNOWN_ATTRIBUTE
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzAttribute;
|
||||
LPWSTR wzValue;
|
||||
|
||||
RSS_UNKNOWN_ATTRIBUTE* pNext;
|
||||
};
|
||||
|
||||
struct RSS_UNKNOWN_ELEMENT
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzElement;
|
||||
LPWSTR wzValue;
|
||||
|
||||
RSS_UNKNOWN_ATTRIBUTE* pAttributes;
|
||||
RSS_UNKNOWN_ELEMENT* pNext;
|
||||
};
|
||||
|
||||
struct RSS_ITEM
|
||||
{
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzLink;
|
||||
LPWSTR wzDescription;
|
||||
|
||||
LPWSTR wzGuid;
|
||||
FILETIME ftPublished;
|
||||
|
||||
LPWSTR wzEnclosureUrl;
|
||||
DWORD dwEnclosureSize;
|
||||
LPWSTR wzEnclosureType;
|
||||
|
||||
RSS_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct RSS_CHANNEL
|
||||
{
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzLink;
|
||||
LPWSTR wzDescription;
|
||||
DWORD dwTimeToLive;
|
||||
|
||||
RSS_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
|
||||
DWORD cItems;
|
||||
RSS_ITEM rgItems[1];
|
||||
};
|
||||
|
||||
HRESULT DAPI RssInitialize(
|
||||
);
|
||||
|
||||
void DAPI RssUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI RssParseFromString(
|
||||
__in_z LPCWSTR wzRssString,
|
||||
__out RSS_CHANNEL **ppChannel
|
||||
);
|
||||
|
||||
HRESULT DAPI RssParseFromFile(
|
||||
__in_z LPCWSTR wzRssFile,
|
||||
__out RSS_CHANNEL **ppChannel
|
||||
);
|
||||
|
||||
// Adding this until we have the updated specstrings.h
|
||||
#ifndef __in_xcount
|
||||
#define __in_xcount(size)
|
||||
#endif
|
||||
|
||||
void DAPI RssFreeChannel(
|
||||
__in_xcount(pChannel->cItems) RSS_CHANNEL *pChannel
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseRssChannel(p) if (p) { RssFreeChannel(p); }
|
||||
#define ReleaseNullRssChannel(p) if (p) { RssFreeChannel(p); p = NULL; }
|
||||
|
||||
|
||||
struct RSS_UNKNOWN_ATTRIBUTE
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzAttribute;
|
||||
LPWSTR wzValue;
|
||||
|
||||
RSS_UNKNOWN_ATTRIBUTE* pNext;
|
||||
};
|
||||
|
||||
struct RSS_UNKNOWN_ELEMENT
|
||||
{
|
||||
LPWSTR wzNamespace;
|
||||
LPWSTR wzElement;
|
||||
LPWSTR wzValue;
|
||||
|
||||
RSS_UNKNOWN_ATTRIBUTE* pAttributes;
|
||||
RSS_UNKNOWN_ELEMENT* pNext;
|
||||
};
|
||||
|
||||
struct RSS_ITEM
|
||||
{
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzLink;
|
||||
LPWSTR wzDescription;
|
||||
|
||||
LPWSTR wzGuid;
|
||||
FILETIME ftPublished;
|
||||
|
||||
LPWSTR wzEnclosureUrl;
|
||||
DWORD dwEnclosureSize;
|
||||
LPWSTR wzEnclosureType;
|
||||
|
||||
RSS_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
};
|
||||
|
||||
struct RSS_CHANNEL
|
||||
{
|
||||
LPWSTR wzTitle;
|
||||
LPWSTR wzLink;
|
||||
LPWSTR wzDescription;
|
||||
DWORD dwTimeToLive;
|
||||
|
||||
RSS_UNKNOWN_ELEMENT* pUnknownElements;
|
||||
|
||||
DWORD cItems;
|
||||
RSS_ITEM rgItems[1];
|
||||
};
|
||||
|
||||
HRESULT DAPI RssInitialize(
|
||||
);
|
||||
|
||||
void DAPI RssUninitialize(
|
||||
);
|
||||
|
||||
HRESULT DAPI RssParseFromString(
|
||||
__in_z LPCWSTR wzRssString,
|
||||
__out RSS_CHANNEL **ppChannel
|
||||
);
|
||||
|
||||
HRESULT DAPI RssParseFromFile(
|
||||
__in_z LPCWSTR wzRssFile,
|
||||
__out RSS_CHANNEL **ppChannel
|
||||
);
|
||||
|
||||
// Adding this until we have the updated specstrings.h
|
||||
#ifndef __in_xcount
|
||||
#define __in_xcount(size)
|
||||
#endif
|
||||
|
||||
void DAPI RssFreeChannel(
|
||||
__in_xcount(pChannel->cItems) RSS_CHANNEL *pChannel
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+261
-261
@@ -1,261 +1,261 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sqlce_oledb.h>
|
||||
#include <sqlce_sync.h>
|
||||
#include <sqlce_err.h>
|
||||
|
||||
typedef void* SCE_DATABASE_HANDLE;
|
||||
typedef void* SCE_ROW_HANDLE;
|
||||
typedef void* SCE_QUERY_HANDLE;
|
||||
typedef void* SCE_QUERY_RESULTS_HANDLE;
|
||||
|
||||
extern const int SCE_ROW_HANDLE_BYTES;
|
||||
extern const int SCE_QUERY_HANDLE_BYTES;
|
||||
extern const int SCE_QUERY_RESULTS_HANDLE_BYTES;
|
||||
|
||||
#define ReleaseSceRow(prrh) if (prrh) { SceFreeRow(prrh); }
|
||||
#define ReleaseNullSceRow(prrh) if (prrh) { SceFreeRow(prrh); prrh = NULL; }
|
||||
#define ReleaseSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); }
|
||||
#define ReleaseNullSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); pqh = NULL; }
|
||||
#define ReleaseSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); }
|
||||
#define ReleaseNullSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); pqh = NULL; }
|
||||
|
||||
struct SCE_COLUMN_SCHEMA
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
DBTYPE dbtColumnType;
|
||||
DWORD dwLength;
|
||||
BOOL fPrimaryKey; // If this column is the primary key
|
||||
BOOL fNullable;
|
||||
BOOL fAutoIncrement;
|
||||
|
||||
LPWSTR wzRelationName;
|
||||
DWORD dwForeignKeyTable;
|
||||
DWORD dwForeignKeyColumn;
|
||||
};
|
||||
|
||||
struct SCE_INDEX_SCHEMA
|
||||
{
|
||||
LPWSTR wzName;
|
||||
|
||||
DWORD *rgColumns;
|
||||
DWORD cColumns;
|
||||
};
|
||||
|
||||
struct SCE_TABLE_SCHEMA
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
DWORD cColumns;
|
||||
SCE_COLUMN_SCHEMA *rgColumns;
|
||||
|
||||
DWORD cIndexes;
|
||||
SCE_INDEX_SCHEMA *rgIndexes;
|
||||
|
||||
// Internal to SCEUtil - consumers shouldn't access or modify
|
||||
// TODO: enforce / hide in a handle of some sort?
|
||||
IRowset *pIRowset;
|
||||
IRowsetChange *pIRowsetChange;
|
||||
};
|
||||
|
||||
struct SCE_DATABASE_SCHEMA
|
||||
{
|
||||
DWORD cTables;
|
||||
SCE_TABLE_SCHEMA *rgTables;
|
||||
};
|
||||
|
||||
struct SCE_DATABASE
|
||||
{
|
||||
SCE_DATABASE_HANDLE sdbHandle;
|
||||
SCE_DATABASE_SCHEMA *pdsSchema;
|
||||
};
|
||||
|
||||
HRESULT DAPI SceCreateDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__deref_out SCE_DATABASE **ppDatabase
|
||||
);
|
||||
HRESULT DAPI SceOpenDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__in LPCWSTR wzSchemaType,
|
||||
__in DWORD dwExpectedVersion,
|
||||
__deref_out SCE_DATABASE **ppDatabase,
|
||||
__in BOOL fReadOnly
|
||||
);
|
||||
HRESULT DAPI SceEnsureDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__in LPCWSTR wzSchemaType,
|
||||
__in DWORD dwExpectedVersion,
|
||||
__in SCE_DATABASE_SCHEMA *pdsSchema,
|
||||
__deref_out SCE_DATABASE **ppDatabase
|
||||
);
|
||||
HRESULT DAPI SceIsTableEmpty(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__out BOOL *pfEmpty
|
||||
);
|
||||
HRESULT DAPI SceGetFirstRow(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceGetNextRow(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceBeginTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceCommitTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceRollbackTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceDeleteRow(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI ScePrepareInsert(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceFinishUpdate(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle
|
||||
);
|
||||
HRESULT DAPI SceSetColumnBinary(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI SceSetColumnDword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnQword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnBool(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const BOOL fValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnString(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceSetColumnEmpty(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex
|
||||
);
|
||||
HRESULT DAPI SceGetColumnBinary(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out_opt BYTE **ppbBuffer,
|
||||
__inout SIZE_T *pcbBuffer
|
||||
);
|
||||
HRESULT DAPI SceGetColumnDword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out DWORD *pdwValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnQword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out DWORD64 *pqwValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnBool(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out BOOL *pfValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnString(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out_z LPWSTR *psczValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceBeginQuery(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_bcount(SCE_QUERY_HANDLE_BYTES) SCE_QUERY_HANDLE *psqhHandle
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnBinary(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnDword(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnQword(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnBool(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const BOOL fValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnString(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in_z_opt LPCWSTR wzString
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in const SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnEmpty(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle
|
||||
);
|
||||
HRESULT DAPI SceRunQueryExact(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceRunQueryRange(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle,
|
||||
__deref_out_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE *psqrhHandle
|
||||
);
|
||||
HRESULT DAPI SceGetNextResultRow(
|
||||
__in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
void DAPI SceCloseTable(
|
||||
__in SCE_TABLE_SCHEMA *pTable
|
||||
);
|
||||
HRESULT DAPI SceCloseDatabase(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
void DAPI SceFreeRow(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle
|
||||
);
|
||||
void DAPI SceFreeQuery(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle
|
||||
);
|
||||
void DAPI SceFreeQueryResults(
|
||||
__in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sqlce_oledb.h>
|
||||
#include <sqlce_sync.h>
|
||||
#include <sqlce_err.h>
|
||||
|
||||
typedef void* SCE_DATABASE_HANDLE;
|
||||
typedef void* SCE_ROW_HANDLE;
|
||||
typedef void* SCE_QUERY_HANDLE;
|
||||
typedef void* SCE_QUERY_RESULTS_HANDLE;
|
||||
|
||||
extern const int SCE_ROW_HANDLE_BYTES;
|
||||
extern const int SCE_QUERY_HANDLE_BYTES;
|
||||
extern const int SCE_QUERY_RESULTS_HANDLE_BYTES;
|
||||
|
||||
#define ReleaseSceRow(prrh) if (prrh) { SceFreeRow(prrh); }
|
||||
#define ReleaseNullSceRow(prrh) if (prrh) { SceFreeRow(prrh); prrh = NULL; }
|
||||
#define ReleaseSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); }
|
||||
#define ReleaseNullSceQuery(pqh) if (pqh) { SceFreeQuery(pqh); pqh = NULL; }
|
||||
#define ReleaseSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); }
|
||||
#define ReleaseNullSceQueryResults(pqh) if (pqh) { SceFreeQueryResults(pqh); pqh = NULL; }
|
||||
|
||||
struct SCE_COLUMN_SCHEMA
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
DBTYPE dbtColumnType;
|
||||
DWORD dwLength;
|
||||
BOOL fPrimaryKey; // If this column is the primary key
|
||||
BOOL fNullable;
|
||||
BOOL fAutoIncrement;
|
||||
|
||||
LPWSTR wzRelationName;
|
||||
DWORD dwForeignKeyTable;
|
||||
DWORD dwForeignKeyColumn;
|
||||
};
|
||||
|
||||
struct SCE_INDEX_SCHEMA
|
||||
{
|
||||
LPWSTR wzName;
|
||||
|
||||
DWORD *rgColumns;
|
||||
DWORD cColumns;
|
||||
};
|
||||
|
||||
struct SCE_TABLE_SCHEMA
|
||||
{
|
||||
LPCWSTR wzName;
|
||||
DWORD cColumns;
|
||||
SCE_COLUMN_SCHEMA *rgColumns;
|
||||
|
||||
DWORD cIndexes;
|
||||
SCE_INDEX_SCHEMA *rgIndexes;
|
||||
|
||||
// Internal to SCEUtil - consumers shouldn't access or modify
|
||||
// TODO: enforce / hide in a handle of some sort?
|
||||
IRowset *pIRowset;
|
||||
IRowsetChange *pIRowsetChange;
|
||||
};
|
||||
|
||||
struct SCE_DATABASE_SCHEMA
|
||||
{
|
||||
DWORD cTables;
|
||||
SCE_TABLE_SCHEMA *rgTables;
|
||||
};
|
||||
|
||||
struct SCE_DATABASE
|
||||
{
|
||||
SCE_DATABASE_HANDLE sdbHandle;
|
||||
SCE_DATABASE_SCHEMA *pdsSchema;
|
||||
};
|
||||
|
||||
HRESULT DAPI SceCreateDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__deref_out SCE_DATABASE **ppDatabase
|
||||
);
|
||||
HRESULT DAPI SceOpenDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__in LPCWSTR wzSchemaType,
|
||||
__in DWORD dwExpectedVersion,
|
||||
__deref_out SCE_DATABASE **ppDatabase,
|
||||
__in BOOL fReadOnly
|
||||
);
|
||||
HRESULT DAPI SceEnsureDatabase(
|
||||
__in_z LPCWSTR sczFile,
|
||||
__in LPCWSTR wzSchemaType,
|
||||
__in DWORD dwExpectedVersion,
|
||||
__in SCE_DATABASE_SCHEMA *pdsSchema,
|
||||
__deref_out SCE_DATABASE **ppDatabase
|
||||
);
|
||||
HRESULT DAPI SceIsTableEmpty(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__out BOOL *pfEmpty
|
||||
);
|
||||
HRESULT DAPI SceGetFirstRow(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceGetNextRow(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceBeginTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceCommitTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceRollbackTransaction(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
HRESULT DAPI SceDeleteRow(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI ScePrepareInsert(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceFinishUpdate(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle
|
||||
);
|
||||
HRESULT DAPI SceSetColumnBinary(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI SceSetColumnDword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnQword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnBool(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const BOOL fValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnString(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in_z_opt LPCWSTR wzValue
|
||||
);
|
||||
HRESULT DAPI SceSetColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__in const SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceSetColumnEmpty(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in DWORD dwColumnIndex
|
||||
);
|
||||
HRESULT DAPI SceGetColumnBinary(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out_opt BYTE **ppbBuffer,
|
||||
__inout SIZE_T *pcbBuffer
|
||||
);
|
||||
HRESULT DAPI SceGetColumnDword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out DWORD *pdwValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnQword(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out DWORD64 *pqwValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnBool(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out BOOL *pfValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnString(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out_z LPWSTR *psczValue
|
||||
);
|
||||
HRESULT DAPI SceGetColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle,
|
||||
__in DWORD dwColumnIndex,
|
||||
__out SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceBeginQuery(
|
||||
__in SCE_DATABASE *pDatabase,
|
||||
__in DWORD dwTableIndex,
|
||||
__in DWORD dwIndex,
|
||||
__deref_out_bcount(SCE_QUERY_HANDLE_BYTES) SCE_QUERY_HANDLE *psqhHandle
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnBinary(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in_bcount(cbBuffer) const BYTE* pbBuffer,
|
||||
__in SIZE_T cbBuffer
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnDword(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnQword(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const DWORD64 qwValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnBool(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in const BOOL fValue
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnString(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle,
|
||||
__in_z_opt LPCWSTR wzString
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnSystemTime(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowHandle,
|
||||
__in const SYSTEMTIME *pst
|
||||
);
|
||||
HRESULT DAPI SceSetQueryColumnEmpty(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle
|
||||
);
|
||||
HRESULT DAPI SceRunQueryExact(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
HRESULT DAPI SceRunQueryRange(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE *psqhHandle,
|
||||
__deref_out_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE *psqrhHandle
|
||||
);
|
||||
HRESULT DAPI SceGetNextResultRow(
|
||||
__in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle,
|
||||
__deref_out_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE *pRowHandle
|
||||
);
|
||||
void DAPI SceCloseTable(
|
||||
__in SCE_TABLE_SCHEMA *pTable
|
||||
);
|
||||
HRESULT DAPI SceCloseDatabase(
|
||||
__in SCE_DATABASE *pDatabase
|
||||
);
|
||||
void DAPI SceFreeRow(
|
||||
__in_bcount(SCE_ROW_HANDLE_BYTES) SCE_ROW_HANDLE rowReadHandle
|
||||
);
|
||||
void DAPI SceFreeQuery(
|
||||
__in_bcount(SCE_QUERY_BYTES) SCE_QUERY_HANDLE sqhHandle
|
||||
);
|
||||
void DAPI SceFreeQueryResults(
|
||||
__in_bcount(SCE_QUERY_RESULTS_BYTES) SCE_QUERY_RESULTS_HANDLE sqrhHandle
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,47 +1,47 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifndef REFKNOWNFOLDERID
|
||||
#define REFKNOWNFOLDERID REFGUID
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef BOOL (STDAPICALLTYPE *PFN_SHELLEXECUTEEXW)(
|
||||
__inout LPSHELLEXECUTEINFOW lpExecInfo
|
||||
);
|
||||
|
||||
void DAPI ShelFunctionOverride(
|
||||
__in_opt PFN_SHELLEXECUTEEXW pfnShellExecuteExW
|
||||
);
|
||||
HRESULT DAPI ShelExec(
|
||||
__in_z LPCWSTR wzTargetPath,
|
||||
__in_opt LPCWSTR wzParameters,
|
||||
__in_opt LPCWSTR wzVerb,
|
||||
__in_opt LPCWSTR wzWorkingDirectory,
|
||||
__in int nShowCmd,
|
||||
__in_opt HWND hwndParent,
|
||||
__out_opt HANDLE* phProcess
|
||||
);
|
||||
HRESULT DAPI ShelExecUnelevated(
|
||||
__in_z LPCWSTR wzTargetPath,
|
||||
__in_z_opt LPCWSTR wzParameters,
|
||||
__in_z_opt LPCWSTR wzVerb,
|
||||
__in_z_opt LPCWSTR wzWorkingDirectory,
|
||||
__in int nShowCmd
|
||||
);
|
||||
HRESULT DAPI ShelGetFolder(
|
||||
__out_z LPWSTR* psczFolderPath,
|
||||
__in int csidlFolder
|
||||
);
|
||||
HRESULT DAPI ShelGetKnownFolder(
|
||||
__out_z LPWSTR* psczFolderPath,
|
||||
__in REFKNOWNFOLDERID rfidFolder
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifndef REFKNOWNFOLDERID
|
||||
#define REFKNOWNFOLDERID REFGUID
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef BOOL (STDAPICALLTYPE *PFN_SHELLEXECUTEEXW)(
|
||||
__inout LPSHELLEXECUTEINFOW lpExecInfo
|
||||
);
|
||||
|
||||
void DAPI ShelFunctionOverride(
|
||||
__in_opt PFN_SHELLEXECUTEEXW pfnShellExecuteExW
|
||||
);
|
||||
HRESULT DAPI ShelExec(
|
||||
__in_z LPCWSTR wzTargetPath,
|
||||
__in_opt LPCWSTR wzParameters,
|
||||
__in_opt LPCWSTR wzVerb,
|
||||
__in_opt LPCWSTR wzWorkingDirectory,
|
||||
__in int nShowCmd,
|
||||
__in_opt HWND hwndParent,
|
||||
__out_opt HANDLE* phProcess
|
||||
);
|
||||
HRESULT DAPI ShelExecUnelevated(
|
||||
__in_z LPCWSTR wzTargetPath,
|
||||
__in_z_opt LPCWSTR wzParameters,
|
||||
__in_z_opt LPCWSTR wzVerb,
|
||||
__in_z_opt LPCWSTR wzWorkingDirectory,
|
||||
__in int nShowCmd
|
||||
);
|
||||
HRESULT DAPI ShelGetFolder(
|
||||
__out_z LPWSTR* psczFolderPath,
|
||||
__in int csidlFolder
|
||||
);
|
||||
HRESULT DAPI ShelGetKnownFolder(
|
||||
__out_z LPWSTR* psczFolderPath,
|
||||
__in REFKNOWNFOLDERID rfidFolder
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+136
-136
@@ -1,136 +1,136 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <cguid.h>
|
||||
#include <oledberr.h>
|
||||
#include <sqloledb.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Adding this until the SQL annotations are published to specstrings.h
|
||||
#ifndef __sql_command
|
||||
#define __sql_command
|
||||
#endif
|
||||
|
||||
// structs
|
||||
struct SQL_FILESPEC
|
||||
{
|
||||
WCHAR wzName[MAX_PATH];
|
||||
WCHAR wzFilename[MAX_PATH];
|
||||
WCHAR wzSize[MAX_PATH];
|
||||
WCHAR wzMaxSize[MAX_PATH];
|
||||
WCHAR wzGrow[MAX_PATH];
|
||||
};
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI SqlConnectDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out IDBCreateSession** ppidbSession
|
||||
);
|
||||
HRESULT DAPI SqlStartTransaction(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__out IDBCreateCommand** ppidbCommand,
|
||||
__out ITransaction** ppit
|
||||
);
|
||||
HRESULT DAPI SqlEndTransaction(
|
||||
__in ITransaction* pit,
|
||||
__in BOOL fCommit
|
||||
);
|
||||
HRESULT DAPI SqlDatabaseExists(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDatabaseExists(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlDatabaseEnsureExists(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDatabaseEnsureExists(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlCreateDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionCreateDatabase(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlDropDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDropDatabase(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionExecuteQuery(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in __sql_command LPCWSTR wzSql,
|
||||
__out_opt IRowset** ppirs,
|
||||
__out_opt DBROWCOUNT* pcRows,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlCommandExecuteQuery(
|
||||
__in IDBCreateCommand* pidbCommand,
|
||||
__in __sql_command LPCWSTR wzSql,
|
||||
__out IRowset** ppirs,
|
||||
__out DBROWCOUNT* pcRows
|
||||
);
|
||||
HRESULT DAPI SqlGetErrorInfo(
|
||||
__in IUnknown* pObjectWithError,
|
||||
__in REFIID IID_InterfaceWithError,
|
||||
__in DWORD dwLocaleId,
|
||||
__out_opt BSTR* pbstrErrorSource,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include <cguid.h>
|
||||
#include <oledberr.h>
|
||||
#include <sqloledb.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Adding this until the SQL annotations are published to specstrings.h
|
||||
#ifndef __sql_command
|
||||
#define __sql_command
|
||||
#endif
|
||||
|
||||
// structs
|
||||
struct SQL_FILESPEC
|
||||
{
|
||||
WCHAR wzName[MAX_PATH];
|
||||
WCHAR wzFilename[MAX_PATH];
|
||||
WCHAR wzSize[MAX_PATH];
|
||||
WCHAR wzMaxSize[MAX_PATH];
|
||||
WCHAR wzGrow[MAX_PATH];
|
||||
};
|
||||
|
||||
|
||||
// functions
|
||||
HRESULT DAPI SqlConnectDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out IDBCreateSession** ppidbSession
|
||||
);
|
||||
HRESULT DAPI SqlStartTransaction(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__out IDBCreateCommand** ppidbCommand,
|
||||
__out ITransaction** ppit
|
||||
);
|
||||
HRESULT DAPI SqlEndTransaction(
|
||||
__in ITransaction* pit,
|
||||
__in BOOL fCommit
|
||||
);
|
||||
HRESULT DAPI SqlDatabaseExists(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDatabaseExists(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlDatabaseEnsureExists(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDatabaseEnsureExists(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlCreateDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionCreateDatabase(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfDatabase,
|
||||
__in_opt const SQL_FILESPEC* psfLog,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlDropDatabase(
|
||||
__in_z LPCWSTR wzServer,
|
||||
__in_z LPCWSTR wzInstance,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__in BOOL fIntegratedAuth,
|
||||
__in_z LPCWSTR wzUser,
|
||||
__in_z LPCWSTR wzPassword,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionDropDatabase(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in_z LPCWSTR wzDatabase,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlSessionExecuteQuery(
|
||||
__in IDBCreateSession* pidbSession,
|
||||
__in __sql_command LPCWSTR wzSql,
|
||||
__out_opt IRowset** ppirs,
|
||||
__out_opt DBROWCOUNT* pcRows,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
HRESULT DAPI SqlCommandExecuteQuery(
|
||||
__in IDBCreateCommand* pidbCommand,
|
||||
__in __sql_command LPCWSTR wzSql,
|
||||
__out IRowset** ppirs,
|
||||
__out DBROWCOUNT* pcRows
|
||||
);
|
||||
HRESULT DAPI SqlGetErrorInfo(
|
||||
__in IUnknown* pObjectWithError,
|
||||
__in REFIID IID_InterfaceWithError,
|
||||
__in DWORD dwLocaleId,
|
||||
__out_opt BSTR* pbstrErrorSource,
|
||||
__out_opt BSTR* pbstrErrorDescription
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,45 +1,45 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum SRP_ACTION
|
||||
{
|
||||
SRP_ACTION_UNKNOWN,
|
||||
SRP_ACTION_UNINSTALL,
|
||||
SRP_ACTION_INSTALL,
|
||||
SRP_ACTION_MODIFY,
|
||||
} SRP_ACTION;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
SrpInitialize - initializes system restore point functionality.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) SrpInitialize(
|
||||
__in BOOL fInitializeComSecurity
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
SrpUninitialize - uninitializes system restore point functionality.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(void) SrpUninitialize();
|
||||
|
||||
/********************************************************************
|
||||
SrpCreateRestorePoint - creates a system restore point.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) SrpCreateRestorePoint(
|
||||
__in_z LPCWSTR wzApplicationName,
|
||||
__in SRP_ACTION action
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum SRP_ACTION
|
||||
{
|
||||
SRP_ACTION_UNKNOWN,
|
||||
SRP_ACTION_UNINSTALL,
|
||||
SRP_ACTION_INSTALL,
|
||||
SRP_ACTION_MODIFY,
|
||||
} SRP_ACTION;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
SrpInitialize - initializes system restore point functionality.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) SrpInitialize(
|
||||
__in BOOL fInitializeComSecurity
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
SrpUninitialize - uninitializes system restore point functionality.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(void) SrpUninitialize();
|
||||
|
||||
/********************************************************************
|
||||
SrpCreateRestorePoint - creates a system restore point.
|
||||
|
||||
*******************************************************************/
|
||||
DAPI_(HRESULT) SrpCreateRestorePoint(
|
||||
__in_z LPCWSTR wzApplicationName,
|
||||
__in SRP_ACTION action
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+311
-311
@@ -1,311 +1,311 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseStr(pwz) if (pwz) { StrFree(pwz); }
|
||||
#define ReleaseNullStr(pwz) if (pwz) { StrFree(pwz); pwz = NULL; }
|
||||
#define ReleaseBSTR(bstr) if (bstr) { ::SysFreeString(bstr); }
|
||||
#define ReleaseNullBSTR(bstr) if (bstr) { ::SysFreeString(bstr); bstr = NULL; }
|
||||
#define ReleaseStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); } }
|
||||
#define ReleaseNullStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); c = 0; rg = NULL; } }
|
||||
#define ReleaseNullStrSecure(pwz) if (pwz) { StrSecureZeroFreeString(pwz); pwz = NULL; }
|
||||
|
||||
#define DeclareConstBSTR(bstr_const, wz) const WCHAR bstr_const[] = { 0x00, 0x00, sizeof(wz)-sizeof(WCHAR), 0x00, wz }
|
||||
#define UseConstBSTR(bstr_const) const_cast<BSTR>(bstr_const + 4)
|
||||
|
||||
HRESULT DAPI StrAlloc(
|
||||
__deref_out_ecount_part(cch, 0) LPWSTR* ppwz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrAllocSecure(
|
||||
__deref_out_ecount_part(cch, 0) LPWSTR* ppwz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrTrimCapacity(
|
||||
__deref_out_z LPWSTR* ppwz
|
||||
);
|
||||
HRESULT DAPI StrTrimWhitespace(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAlloc(
|
||||
__deref_out_ecount_part(cch, 0) LPSTR* ppz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrAnsiTrimCapacity(
|
||||
__deref_out_z LPSTR* ppz
|
||||
);
|
||||
HRESULT DAPI StrAnsiTrimWhitespace(
|
||||
__deref_out_z LPSTR* ppz,
|
||||
__in_z LPCSTR szSource
|
||||
);
|
||||
HRESULT DAPI StrAllocString(
|
||||
__deref_out_ecount_z(cchSource+1) LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocStringSecure(
|
||||
__deref_out_ecount_z(cchSource + 1) LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocString(
|
||||
__deref_out_ecount_z(cchSource+1) LPSTR* ppsz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource,
|
||||
__in UINT uiCodepage
|
||||
);
|
||||
HRESULT DAPI StrAllocStringAnsi(
|
||||
__deref_out_ecount_z(cchSource+1) LPWSTR* ppwz,
|
||||
__in_z LPCSTR szSource,
|
||||
__in DWORD_PTR cchSource,
|
||||
__in UINT uiCodepage
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocStringAnsi(
|
||||
__deref_out_ecount_z(cchSource+1) LPSTR* ppsz,
|
||||
__in_z LPCSTR szSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocPrefix(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in DWORD_PTR cchPrefix
|
||||
);
|
||||
HRESULT DAPI StrAllocConcat(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocConcatSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocConcat(
|
||||
__deref_out_z LPSTR* ppz,
|
||||
__in_z LPCSTR pzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT __cdecl StrAllocFormatted(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAllocConcatFormatted(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAllocFormattedSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAnsiAllocFormatted(
|
||||
__deref_out_z LPSTR* ppsz,
|
||||
__in __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI StrAllocFormattedArgs(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAllocFormattedArgsSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocFormattedArgs(
|
||||
__deref_out_z LPSTR* ppsz,
|
||||
__in __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAllocFromError(
|
||||
__inout LPWSTR *ppwzMessage,
|
||||
__in HRESULT hrError,
|
||||
__in_opt HMODULE hModule,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI StrMaxLength(
|
||||
__in LPCVOID p,
|
||||
__out DWORD_PTR* pcch
|
||||
);
|
||||
HRESULT DAPI StrSize(
|
||||
__in LPCVOID p,
|
||||
__out DWORD_PTR* pcb
|
||||
);
|
||||
|
||||
HRESULT DAPI StrFree(
|
||||
__in LPVOID p
|
||||
);
|
||||
|
||||
|
||||
HRESULT DAPI StrReplaceStringAll(
|
||||
__inout LPWSTR* ppwzOriginal,
|
||||
__in_z LPCWSTR wzOldSubString,
|
||||
__in_z LPCWSTR wzNewSubString
|
||||
);
|
||||
HRESULT DAPI StrReplaceString(
|
||||
__inout LPWSTR* ppwzOriginal,
|
||||
__inout DWORD* pdwStartIndex,
|
||||
__in_z LPCWSTR wzOldSubString,
|
||||
__in_z LPCWSTR wzNewSubString
|
||||
);
|
||||
|
||||
HRESULT DAPI StrHexEncode(
|
||||
__in_ecount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__out_ecount(cchDest) LPWSTR wzDest,
|
||||
__in DWORD_PTR cchDest
|
||||
);
|
||||
HRESULT DAPI StrAllocHexEncode(
|
||||
__in_ecount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__deref_out_ecount_z(2*(cbSource+1)) LPWSTR* ppwzDest
|
||||
);
|
||||
HRESULT DAPI StrHexDecode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__out_bcount(cbDest) BYTE* pbDest,
|
||||
__in DWORD_PTR cbDest
|
||||
);
|
||||
HRESULT DAPI StrAllocHexDecode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__out_bcount(*pcbDest) BYTE** ppbDest,
|
||||
__out_opt DWORD* pcbDest
|
||||
);
|
||||
|
||||
HRESULT DAPI StrAllocBase85Encode(
|
||||
__in_bcount_opt(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__deref_out_z LPWSTR* pwzDest
|
||||
);
|
||||
HRESULT DAPI StrAllocBase85Decode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__deref_out_bcount(*pcbDest) BYTE** hbDest,
|
||||
__out DWORD_PTR* pcbDest
|
||||
);
|
||||
|
||||
HRESULT DAPI MultiSzLen(
|
||||
__in_ecount(*pcch) __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__out DWORD_PTR* pcch
|
||||
);
|
||||
HRESULT DAPI MultiSzPrepend(
|
||||
__deref_inout_ecount(*pcchMultiSz) __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__inout_opt DWORD_PTR *pcchMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzInsert
|
||||
);
|
||||
HRESULT DAPI MultiSzFindSubstring(
|
||||
__in __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzSubstring,
|
||||
__out_opt DWORD_PTR* pdwIndex,
|
||||
__deref_opt_out_z LPCWSTR* ppwzFoundIn
|
||||
);
|
||||
HRESULT DAPI MultiSzFindString(
|
||||
__in __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzString,
|
||||
__out_opt DWORD_PTR* pdwIndex,
|
||||
__deref_opt_out __nullnullterminated LPCWSTR* ppwzFound
|
||||
);
|
||||
HRESULT DAPI MultiSzRemoveString(
|
||||
__deref_inout __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__in DWORD_PTR dwIndex
|
||||
);
|
||||
HRESULT DAPI MultiSzInsertString(
|
||||
__deref_inout_z LPWSTR* ppwzMultiSz,
|
||||
__inout_opt DWORD_PTR *pcchMultiSz,
|
||||
__in DWORD_PTR dwIndex,
|
||||
__in_z LPCWSTR pwzInsert
|
||||
);
|
||||
HRESULT DAPI MultiSzReplaceString(
|
||||
__deref_inout __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__in DWORD_PTR dwIndex,
|
||||
__in_z LPCWSTR pwzString
|
||||
);
|
||||
|
||||
LPCWSTR DAPI wcsistr(
|
||||
__in_z LPCWSTR wzString,
|
||||
__in_z LPCWSTR wzCharSet
|
||||
);
|
||||
|
||||
HRESULT DAPI StrStringToInt16(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out SHORT* psOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt16(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out USHORT* pusOut
|
||||
);
|
||||
HRESULT DAPI StrStringToInt32(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out INT* piOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt32(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out UINT* puiOut
|
||||
);
|
||||
HRESULT DAPI StrStringToInt64(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out LONGLONG* pllOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt64(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out ULONGLONG* pullOut
|
||||
);
|
||||
void DAPI StrStringToUpper(
|
||||
__inout_z LPWSTR wzIn
|
||||
);
|
||||
void DAPI StrStringToLower(
|
||||
__inout_z LPWSTR wzIn
|
||||
);
|
||||
HRESULT DAPI StrAllocStringToUpperInvariant(
|
||||
__deref_out_z LPWSTR* pscz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in int cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocStringToLowerInvariant(
|
||||
__deref_out_z LPWSTR* pscz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in int cchSource
|
||||
);
|
||||
|
||||
HRESULT DAPI StrArrayAllocString(
|
||||
__deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray,
|
||||
__inout LPUINT pcStrArray,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
|
||||
HRESULT DAPI StrArrayFree(
|
||||
__in_ecount(cStrArray) LPWSTR *rgsczStrArray,
|
||||
__in UINT cStrArray
|
||||
);
|
||||
|
||||
HRESULT DAPI StrSplitAllocArray(
|
||||
__deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray,
|
||||
__inout LPUINT pcStrArray,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzDelim
|
||||
);
|
||||
|
||||
HRESULT DAPI StrSecureZeroString(
|
||||
__in LPWSTR pwz
|
||||
);
|
||||
HRESULT DAPI StrSecureZeroFreeString(
|
||||
__in LPWSTR pwz
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ReleaseStr(pwz) if (pwz) { StrFree(pwz); }
|
||||
#define ReleaseNullStr(pwz) if (pwz) { StrFree(pwz); pwz = NULL; }
|
||||
#define ReleaseBSTR(bstr) if (bstr) { ::SysFreeString(bstr); }
|
||||
#define ReleaseNullBSTR(bstr) if (bstr) { ::SysFreeString(bstr); bstr = NULL; }
|
||||
#define ReleaseStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); } }
|
||||
#define ReleaseNullStrArray(rg, c) { if (rg) { StrArrayFree(rg, c); c = 0; rg = NULL; } }
|
||||
#define ReleaseNullStrSecure(pwz) if (pwz) { StrSecureZeroFreeString(pwz); pwz = NULL; }
|
||||
|
||||
#define DeclareConstBSTR(bstr_const, wz) const WCHAR bstr_const[] = { 0x00, 0x00, sizeof(wz)-sizeof(WCHAR), 0x00, wz }
|
||||
#define UseConstBSTR(bstr_const) const_cast<BSTR>(bstr_const + 4)
|
||||
|
||||
HRESULT DAPI StrAlloc(
|
||||
__deref_out_ecount_part(cch, 0) LPWSTR* ppwz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrAllocSecure(
|
||||
__deref_out_ecount_part(cch, 0) LPWSTR* ppwz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrTrimCapacity(
|
||||
__deref_out_z LPWSTR* ppwz
|
||||
);
|
||||
HRESULT DAPI StrTrimWhitespace(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAlloc(
|
||||
__deref_out_ecount_part(cch, 0) LPSTR* ppz,
|
||||
__in DWORD_PTR cch
|
||||
);
|
||||
HRESULT DAPI StrAnsiTrimCapacity(
|
||||
__deref_out_z LPSTR* ppz
|
||||
);
|
||||
HRESULT DAPI StrAnsiTrimWhitespace(
|
||||
__deref_out_z LPSTR* ppz,
|
||||
__in_z LPCSTR szSource
|
||||
);
|
||||
HRESULT DAPI StrAllocString(
|
||||
__deref_out_ecount_z(cchSource+1) LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocStringSecure(
|
||||
__deref_out_ecount_z(cchSource + 1) LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocString(
|
||||
__deref_out_ecount_z(cchSource+1) LPSTR* ppsz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource,
|
||||
__in UINT uiCodepage
|
||||
);
|
||||
HRESULT DAPI StrAllocStringAnsi(
|
||||
__deref_out_ecount_z(cchSource+1) LPWSTR* ppwz,
|
||||
__in_z LPCSTR szSource,
|
||||
__in DWORD_PTR cchSource,
|
||||
__in UINT uiCodepage
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocStringAnsi(
|
||||
__deref_out_ecount_z(cchSource+1) LPSTR* ppsz,
|
||||
__in_z LPCSTR szSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocPrefix(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzPrefix,
|
||||
__in DWORD_PTR cchPrefix
|
||||
);
|
||||
HRESULT DAPI StrAllocConcat(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocConcatSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocConcat(
|
||||
__deref_out_z LPSTR* ppz,
|
||||
__in_z LPCSTR pzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
HRESULT __cdecl StrAllocFormatted(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAllocConcatFormatted(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAllocFormattedSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
...
|
||||
);
|
||||
HRESULT __cdecl StrAnsiAllocFormatted(
|
||||
__deref_out_z LPSTR* ppsz,
|
||||
__in __format_string LPCSTR szFormat,
|
||||
...
|
||||
);
|
||||
HRESULT DAPI StrAllocFormattedArgs(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAllocFormattedArgsSecure(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in __format_string LPCWSTR wzFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAnsiAllocFormattedArgs(
|
||||
__deref_out_z LPSTR* ppsz,
|
||||
__in __format_string LPCSTR szFormat,
|
||||
__in va_list args
|
||||
);
|
||||
HRESULT DAPI StrAllocFromError(
|
||||
__inout LPWSTR *ppwzMessage,
|
||||
__in HRESULT hrError,
|
||||
__in_opt HMODULE hModule,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT DAPI StrMaxLength(
|
||||
__in LPCVOID p,
|
||||
__out DWORD_PTR* pcch
|
||||
);
|
||||
HRESULT DAPI StrSize(
|
||||
__in LPCVOID p,
|
||||
__out DWORD_PTR* pcb
|
||||
);
|
||||
|
||||
HRESULT DAPI StrFree(
|
||||
__in LPVOID p
|
||||
);
|
||||
|
||||
|
||||
HRESULT DAPI StrReplaceStringAll(
|
||||
__inout LPWSTR* ppwzOriginal,
|
||||
__in_z LPCWSTR wzOldSubString,
|
||||
__in_z LPCWSTR wzNewSubString
|
||||
);
|
||||
HRESULT DAPI StrReplaceString(
|
||||
__inout LPWSTR* ppwzOriginal,
|
||||
__inout DWORD* pdwStartIndex,
|
||||
__in_z LPCWSTR wzOldSubString,
|
||||
__in_z LPCWSTR wzNewSubString
|
||||
);
|
||||
|
||||
HRESULT DAPI StrHexEncode(
|
||||
__in_ecount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__out_ecount(cchDest) LPWSTR wzDest,
|
||||
__in DWORD_PTR cchDest
|
||||
);
|
||||
HRESULT DAPI StrAllocHexEncode(
|
||||
__in_ecount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__deref_out_ecount_z(2*(cbSource+1)) LPWSTR* ppwzDest
|
||||
);
|
||||
HRESULT DAPI StrHexDecode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__out_bcount(cbDest) BYTE* pbDest,
|
||||
__in DWORD_PTR cbDest
|
||||
);
|
||||
HRESULT DAPI StrAllocHexDecode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__out_bcount(*pcbDest) BYTE** ppbDest,
|
||||
__out_opt DWORD* pcbDest
|
||||
);
|
||||
|
||||
HRESULT DAPI StrAllocBase85Encode(
|
||||
__in_bcount_opt(cbSource) const BYTE* pbSource,
|
||||
__in DWORD_PTR cbSource,
|
||||
__deref_out_z LPWSTR* pwzDest
|
||||
);
|
||||
HRESULT DAPI StrAllocBase85Decode(
|
||||
__in_z LPCWSTR wzSource,
|
||||
__deref_out_bcount(*pcbDest) BYTE** hbDest,
|
||||
__out DWORD_PTR* pcbDest
|
||||
);
|
||||
|
||||
HRESULT DAPI MultiSzLen(
|
||||
__in_ecount(*pcch) __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__out DWORD_PTR* pcch
|
||||
);
|
||||
HRESULT DAPI MultiSzPrepend(
|
||||
__deref_inout_ecount(*pcchMultiSz) __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__inout_opt DWORD_PTR *pcchMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzInsert
|
||||
);
|
||||
HRESULT DAPI MultiSzFindSubstring(
|
||||
__in __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzSubstring,
|
||||
__out_opt DWORD_PTR* pdwIndex,
|
||||
__deref_opt_out_z LPCWSTR* ppwzFoundIn
|
||||
);
|
||||
HRESULT DAPI MultiSzFindString(
|
||||
__in __nullnullterminated LPCWSTR pwzMultiSz,
|
||||
__in __nullnullterminated LPCWSTR pwzString,
|
||||
__out_opt DWORD_PTR* pdwIndex,
|
||||
__deref_opt_out __nullnullterminated LPCWSTR* ppwzFound
|
||||
);
|
||||
HRESULT DAPI MultiSzRemoveString(
|
||||
__deref_inout __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__in DWORD_PTR dwIndex
|
||||
);
|
||||
HRESULT DAPI MultiSzInsertString(
|
||||
__deref_inout_z LPWSTR* ppwzMultiSz,
|
||||
__inout_opt DWORD_PTR *pcchMultiSz,
|
||||
__in DWORD_PTR dwIndex,
|
||||
__in_z LPCWSTR pwzInsert
|
||||
);
|
||||
HRESULT DAPI MultiSzReplaceString(
|
||||
__deref_inout __nullnullterminated LPWSTR* ppwzMultiSz,
|
||||
__in DWORD_PTR dwIndex,
|
||||
__in_z LPCWSTR pwzString
|
||||
);
|
||||
|
||||
LPCWSTR DAPI wcsistr(
|
||||
__in_z LPCWSTR wzString,
|
||||
__in_z LPCWSTR wzCharSet
|
||||
);
|
||||
|
||||
HRESULT DAPI StrStringToInt16(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out SHORT* psOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt16(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out USHORT* pusOut
|
||||
);
|
||||
HRESULT DAPI StrStringToInt32(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out INT* piOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt32(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out UINT* puiOut
|
||||
);
|
||||
HRESULT DAPI StrStringToInt64(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out LONGLONG* pllOut
|
||||
);
|
||||
HRESULT DAPI StrStringToUInt64(
|
||||
__in_z LPCWSTR wzIn,
|
||||
__in DWORD cchIn,
|
||||
__out ULONGLONG* pullOut
|
||||
);
|
||||
void DAPI StrStringToUpper(
|
||||
__inout_z LPWSTR wzIn
|
||||
);
|
||||
void DAPI StrStringToLower(
|
||||
__inout_z LPWSTR wzIn
|
||||
);
|
||||
HRESULT DAPI StrAllocStringToUpperInvariant(
|
||||
__deref_out_z LPWSTR* pscz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in int cchSource
|
||||
);
|
||||
HRESULT DAPI StrAllocStringToLowerInvariant(
|
||||
__deref_out_z LPWSTR* pscz,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in int cchSource
|
||||
);
|
||||
|
||||
HRESULT DAPI StrArrayAllocString(
|
||||
__deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray,
|
||||
__inout LPUINT pcStrArray,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in DWORD_PTR cchSource
|
||||
);
|
||||
|
||||
HRESULT DAPI StrArrayFree(
|
||||
__in_ecount(cStrArray) LPWSTR *rgsczStrArray,
|
||||
__in UINT cStrArray
|
||||
);
|
||||
|
||||
HRESULT DAPI StrSplitAllocArray(
|
||||
__deref_inout_ecount_opt(*pcStrArray) LPWSTR **prgsczStrArray,
|
||||
__inout LPUINT pcStrArray,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_z LPCWSTR wzDelim
|
||||
);
|
||||
|
||||
HRESULT DAPI StrSecureZeroString(
|
||||
__in LPWSTR pwz
|
||||
);
|
||||
HRESULT DAPI StrSecureZeroFreeString(
|
||||
__in LPWSTR pwz
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,21 +1,21 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define ReleaseServiceHandle(h) if (h) { ::CloseServiceHandle(h); h = NULL; }
|
||||
|
||||
|
||||
HRESULT DAPI SvcQueryConfig(
|
||||
__in SC_HANDLE sch,
|
||||
__out QUERY_SERVICE_CONFIGW** ppConfig
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define ReleaseServiceHandle(h) if (h) { ::CloseServiceHandle(h); h = NULL; }
|
||||
|
||||
|
||||
HRESULT DAPI SvcQueryConfig(
|
||||
__in SC_HANDLE sch,
|
||||
__out QUERY_SERVICE_CONFIGW** ppConfig
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+556
-556
File diff suppressed because it is too large.
Load diff
@@ -1,34 +1,34 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI TimeFromString(
|
||||
__in_z LPCWSTR wzTime,
|
||||
__out FILETIME* pFileTime
|
||||
);
|
||||
HRESULT DAPI TimeFromString3339(
|
||||
__in_z LPCWSTR wzTime,
|
||||
__out FILETIME* pFileTime
|
||||
);
|
||||
HRESULT DAPI TimeCurrentTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
HRESULT DAPI TimeCurrentDateTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
HRESULT DAPI TimeSystemDateTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in const SYSTEMTIME *pst,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI TimeFromString(
|
||||
__in_z LPCWSTR wzTime,
|
||||
__out FILETIME* pFileTime
|
||||
);
|
||||
HRESULT DAPI TimeFromString3339(
|
||||
__in_z LPCWSTR wzTime,
|
||||
__out FILETIME* pFileTime
|
||||
);
|
||||
HRESULT DAPI TimeCurrentTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
HRESULT DAPI TimeCurrentDateTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
HRESULT DAPI TimeSystemDateTime(
|
||||
__deref_out_z LPWSTR* ppwz,
|
||||
__in const SYSTEMTIME *pst,
|
||||
__in BOOL fGMT
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+100
-100
@@ -1,100 +1,100 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wininet.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum URI_PROTOCOL
|
||||
{
|
||||
URI_PROTOCOL_UNKNOWN,
|
||||
URI_PROTOCOL_FILE,
|
||||
URI_PROTOCOL_FTP,
|
||||
URI_PROTOCOL_HTTP,
|
||||
URI_PROTOCOL_HTTPS,
|
||||
URI_PROTOCOL_LOCAL,
|
||||
URI_PROTOCOL_UNC
|
||||
} URI_PROTOCOL;
|
||||
|
||||
typedef struct _URI_INFO
|
||||
{
|
||||
INTERNET_SCHEME scheme;
|
||||
LPWSTR sczHostName;
|
||||
INTERNET_PORT port;
|
||||
LPWSTR sczUser;
|
||||
LPWSTR sczPassword;
|
||||
LPWSTR sczPath;
|
||||
LPWSTR sczQueryString;
|
||||
} URI_INFO;
|
||||
|
||||
|
||||
HRESULT DAPI UriCanonicalize(
|
||||
__inout_z LPWSTR* psczUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCrack(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out_opt INTERNET_SCHEME* pScheme,
|
||||
__deref_opt_out_z LPWSTR* psczHostName,
|
||||
__out_opt INTERNET_PORT* pPort,
|
||||
__deref_opt_out_z LPWSTR* psczUser,
|
||||
__deref_opt_out_z LPWSTR* psczPassword,
|
||||
__deref_opt_out_z LPWSTR* psczPath,
|
||||
__deref_opt_out_z LPWSTR* psczQueryString
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCrackEx(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__in URI_INFO* pUriInfo
|
||||
);
|
||||
|
||||
void DAPI UriInfoUninitialize(
|
||||
__in URI_INFO* pUriInfo
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCreate(
|
||||
__inout_z LPWSTR* psczUri,
|
||||
__in INTERNET_SCHEME scheme,
|
||||
__in_z_opt LPWSTR wzHostName,
|
||||
__in INTERNET_PORT port,
|
||||
__in_z_opt LPWSTR wzUser,
|
||||
__in_z_opt LPWSTR wzPassword,
|
||||
__in_z_opt LPWSTR wzPath,
|
||||
__in_z_opt LPWSTR wzQueryString
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCanonicalize(
|
||||
__inout_z LPWSTR* psczUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriFile(
|
||||
__deref_out_z LPWSTR* psczFile,
|
||||
__in_z LPCWSTR wzUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriProtocol(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out URI_PROTOCOL* pProtocol
|
||||
);
|
||||
|
||||
HRESULT DAPI UriRoot(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out LPWSTR* ppwzRoot,
|
||||
__out_opt URI_PROTOCOL* pProtocol
|
||||
);
|
||||
|
||||
HRESULT DAPI UriResolve(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__in_opt LPCWSTR wzBaseUri,
|
||||
__out LPWSTR* ppwzResolvedUri,
|
||||
__out_opt const URI_PROTOCOL* pResolvedProtocol
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wininet.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum URI_PROTOCOL
|
||||
{
|
||||
URI_PROTOCOL_UNKNOWN,
|
||||
URI_PROTOCOL_FILE,
|
||||
URI_PROTOCOL_FTP,
|
||||
URI_PROTOCOL_HTTP,
|
||||
URI_PROTOCOL_HTTPS,
|
||||
URI_PROTOCOL_LOCAL,
|
||||
URI_PROTOCOL_UNC
|
||||
} URI_PROTOCOL;
|
||||
|
||||
typedef struct _URI_INFO
|
||||
{
|
||||
INTERNET_SCHEME scheme;
|
||||
LPWSTR sczHostName;
|
||||
INTERNET_PORT port;
|
||||
LPWSTR sczUser;
|
||||
LPWSTR sczPassword;
|
||||
LPWSTR sczPath;
|
||||
LPWSTR sczQueryString;
|
||||
} URI_INFO;
|
||||
|
||||
|
||||
HRESULT DAPI UriCanonicalize(
|
||||
__inout_z LPWSTR* psczUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCrack(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out_opt INTERNET_SCHEME* pScheme,
|
||||
__deref_opt_out_z LPWSTR* psczHostName,
|
||||
__out_opt INTERNET_PORT* pPort,
|
||||
__deref_opt_out_z LPWSTR* psczUser,
|
||||
__deref_opt_out_z LPWSTR* psczPassword,
|
||||
__deref_opt_out_z LPWSTR* psczPath,
|
||||
__deref_opt_out_z LPWSTR* psczQueryString
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCrackEx(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__in URI_INFO* pUriInfo
|
||||
);
|
||||
|
||||
void DAPI UriInfoUninitialize(
|
||||
__in URI_INFO* pUriInfo
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCreate(
|
||||
__inout_z LPWSTR* psczUri,
|
||||
__in INTERNET_SCHEME scheme,
|
||||
__in_z_opt LPWSTR wzHostName,
|
||||
__in INTERNET_PORT port,
|
||||
__in_z_opt LPWSTR wzUser,
|
||||
__in_z_opt LPWSTR wzPassword,
|
||||
__in_z_opt LPWSTR wzPath,
|
||||
__in_z_opt LPWSTR wzQueryString
|
||||
);
|
||||
|
||||
HRESULT DAPI UriCanonicalize(
|
||||
__inout_z LPWSTR* psczUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriFile(
|
||||
__deref_out_z LPWSTR* psczFile,
|
||||
__in_z LPCWSTR wzUri
|
||||
);
|
||||
|
||||
HRESULT DAPI UriProtocol(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out URI_PROTOCOL* pProtocol
|
||||
);
|
||||
|
||||
HRESULT DAPI UriRoot(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__out LPWSTR* ppwzRoot,
|
||||
__out_opt URI_PROTOCOL* pProtocol
|
||||
);
|
||||
|
||||
HRESULT DAPI UriResolve(
|
||||
__in_z LPCWSTR wzUri,
|
||||
__in_opt LPCWSTR wzBaseUri,
|
||||
__out LPWSTR* ppwzResolvedUri,
|
||||
__out_opt const URI_PROTOCOL* pResolvedProtocol
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI UserBuildDomainUserName(
|
||||
__out_ecount_z(cchDest) LPWSTR wzDest,
|
||||
__in int cchDest,
|
||||
__in_z LPCWSTR pwzName,
|
||||
__in_z LPCWSTR pwzDomain
|
||||
);
|
||||
|
||||
HRESULT DAPI UserCheckIsMember(
|
||||
__in_z LPCWSTR pwzName,
|
||||
__in_z LPCWSTR pwzDomain,
|
||||
__in_z LPCWSTR pwzGroupName,
|
||||
__in_z LPCWSTR pwzGroupDomain,
|
||||
__out LPBOOL lpfMember
|
||||
);
|
||||
|
||||
HRESULT DAPI UserCreateADsPath(
|
||||
__in_z LPCWSTR wzObjectDomain,
|
||||
__in_z LPCWSTR wzObjectName,
|
||||
__out BSTR *pbstrAdsPath
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI UserBuildDomainUserName(
|
||||
__out_ecount_z(cchDest) LPWSTR wzDest,
|
||||
__in int cchDest,
|
||||
__in_z LPCWSTR pwzName,
|
||||
__in_z LPCWSTR pwzDomain
|
||||
);
|
||||
|
||||
HRESULT DAPI UserCheckIsMember(
|
||||
__in_z LPCWSTR pwzName,
|
||||
__in_z LPCWSTR pwzDomain,
|
||||
__in_z LPCWSTR pwzGroupName,
|
||||
__in_z LPCWSTR pwzGroupDomain,
|
||||
__out LPBOOL lpfMember
|
||||
);
|
||||
|
||||
HRESULT DAPI UserCreateADsPath(
|
||||
__in_z LPCWSTR wzObjectDomain,
|
||||
__in_z LPCWSTR wzObjectName,
|
||||
__out BSTR *pbstrAdsPath
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL WIXAPI IsVerboseLogging();
|
||||
HRESULT WIXAPI SetVerboseLoggingAtom(BOOL bValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL WIXAPI IsVerboseLogging();
|
||||
HRESULT WIXAPI SetVerboseLoggingAtom(BOOL bValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+369
-369
@@ -1,369 +1,369 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WIXAPI __stdcall
|
||||
#define ExitTrace WcaLogError
|
||||
#define ExitTrace1 WcaLogError
|
||||
#define ExitTrace2 WcaLogError
|
||||
#define ExitTrace3 WcaLogError
|
||||
|
||||
#include "dutil.h"
|
||||
|
||||
#define MessageExitOnLastError(x, e, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; } }
|
||||
#define MessageExitOnLastError1(x, e, f, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; } }
|
||||
|
||||
#define MessageExitOnFailure(x, e, s) if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 0); goto LExit; }
|
||||
#define MessageExitOnFailure1(x, e, f, s) if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 1, s); goto LExit; }
|
||||
#define MessageExitOnFailure2(x, e, f, s, t) if (FAILED(x)) { ExitTrace2(x, f, s, t); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 2, s, t); goto LExit; }
|
||||
#define MessageExitOnFailure3(x, e, f, s, t, u) if (FAILED(x)) { ExitTrace2(x, f, s, t, u); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 3, s, t, u); goto LExit; }
|
||||
|
||||
#define MessageExitOnNullWithLastError(p, x, e, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; }
|
||||
#define MessageExitOnNullWithLastError1(p, x, e, f, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; }
|
||||
#define MessageExitOnNullWithLastError2(p, x, e, f, s, t) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s, t); WcaErrorMessage(e, x, MB_OK, 2, s, t); goto LExit; }
|
||||
|
||||
// Generic action enum.
|
||||
typedef enum WCA_ACTION
|
||||
{
|
||||
WCA_ACTION_NONE,
|
||||
WCA_ACTION_INSTALL,
|
||||
WCA_ACTION_UNINSTALL,
|
||||
} WCA_ACTION;
|
||||
|
||||
typedef enum WCA_CASCRIPT
|
||||
{
|
||||
WCA_CASCRIPT_SCHEDULED,
|
||||
WCA_CASCRIPT_ROLLBACK,
|
||||
} WCA_CASCRIPT;
|
||||
|
||||
typedef enum WCA_CASCRIPT_CLOSE
|
||||
{
|
||||
WCA_CASCRIPT_CLOSE_PRESERVE,
|
||||
WCA_CASCRIPT_CLOSE_DELETE,
|
||||
} WCA_CASCRIPT_CLOSE;
|
||||
|
||||
typedef enum WCA_TODO
|
||||
{
|
||||
WCA_TODO_UNKNOWN,
|
||||
WCA_TODO_INSTALL,
|
||||
WCA_TODO_UNINSTALL,
|
||||
WCA_TODO_REINSTALL,
|
||||
} WCA_TODO;
|
||||
|
||||
typedef struct WCA_CASCRIPT_STRUCT
|
||||
{
|
||||
LPWSTR pwzScriptPath;
|
||||
HANDLE hScriptFile;
|
||||
} *WCA_CASCRIPT_HANDLE;
|
||||
|
||||
void WIXAPI WcaGlobalInitialize(
|
||||
__in HINSTANCE hInst
|
||||
);
|
||||
void WIXAPI WcaGlobalFinalize();
|
||||
|
||||
HRESULT WIXAPI WcaInitialize(
|
||||
__in MSIHANDLE hInstall,
|
||||
__in_z PCSTR szCustomActionLogName
|
||||
);
|
||||
UINT WIXAPI WcaFinalize(
|
||||
__in UINT iReturnValue
|
||||
);
|
||||
BOOL WIXAPI WcaIsInitialized();
|
||||
|
||||
MSIHANDLE WIXAPI WcaGetInstallHandle();
|
||||
MSIHANDLE WIXAPI WcaGetDatabaseHandle();
|
||||
|
||||
const char* WIXAPI WcaGetLogName();
|
||||
|
||||
void WIXAPI WcaSetReturnValue(
|
||||
__in UINT iReturnValue
|
||||
);
|
||||
BOOL WIXAPI WcaCancelDetected();
|
||||
|
||||
#define LOG_BUFFER 2048
|
||||
typedef enum LOGLEVEL
|
||||
{
|
||||
LOGMSG_TRACEONLY, // Never written to the log file (except in DEBUG builds)
|
||||
LOGMSG_VERBOSE, // Written to log when LOGVERBOSE
|
||||
LOGMSG_STANDARD // Written to log whenever informational logging is enabled
|
||||
} LOGLEVEL;
|
||||
|
||||
void __cdecl WcaLog(
|
||||
__in LOGLEVEL llv,
|
||||
__in_z __format_string PCSTR fmt, ...
|
||||
);
|
||||
BOOL WIXAPI WcaDisplayAssert(
|
||||
__in LPCSTR sz
|
||||
);
|
||||
void __cdecl WcaLogError(
|
||||
__in HRESULT hr,
|
||||
__in LPCSTR szMessage,
|
||||
...
|
||||
);
|
||||
|
||||
UINT WIXAPI WcaProcessMessage(
|
||||
__in INSTALLMESSAGE eMessageType,
|
||||
__in MSIHANDLE hRecord
|
||||
);
|
||||
UINT __cdecl WcaErrorMessage(
|
||||
__in int iError,
|
||||
__in HRESULT hrError,
|
||||
__in UINT uiType,
|
||||
__in DWORD cArgs,
|
||||
...
|
||||
);
|
||||
HRESULT WIXAPI WcaProgressMessage(
|
||||
__in UINT uiCost,
|
||||
__in BOOL fExtendProgressBar
|
||||
);
|
||||
|
||||
BOOL WIXAPI WcaIsInstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
BOOL WIXAPI WcaIsReInstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
BOOL WIXAPI WcaIsUninstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaSetComponentState(
|
||||
__in_z LPCWSTR wzComponent,
|
||||
__in INSTALLSTATE isState
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaTableExists(
|
||||
__in_z LPCWSTR wzTable
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaOpenView(
|
||||
__in_z LPCWSTR wzSql,
|
||||
__out MSIHANDLE* phView
|
||||
);
|
||||
HRESULT WIXAPI WcaExecuteView(
|
||||
__in MSIHANDLE hView,
|
||||
__in MSIHANDLE hRec
|
||||
);
|
||||
HRESULT WIXAPI WcaOpenExecuteView(
|
||||
__in_z LPCWSTR wzSql,
|
||||
__out MSIHANDLE* phView
|
||||
);
|
||||
HRESULT WIXAPI WcaFetchRecord(
|
||||
__in MSIHANDLE hView,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
HRESULT WIXAPI WcaFetchSingleRecord(
|
||||
__in MSIHANDLE hView,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetFormattedProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetFormattedString(
|
||||
__in_z LPCWSTR wzString,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetIntProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__inout int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetTargetPath(
|
||||
__in_z LPCWSTR wzFolder,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetProperty(
|
||||
__in_z LPCWSTR wzPropertyName,
|
||||
__in_z LPCWSTR wzPropertyValue
|
||||
);
|
||||
HRESULT WIXAPI WcaSetIntProperty(
|
||||
__in_z LPCWSTR wzPropertyName,
|
||||
__in int nPropertyValue
|
||||
);
|
||||
BOOL WIXAPI WcaIsPropertySet(
|
||||
__in LPCSTR szProperty
|
||||
);
|
||||
BOOL WIXAPI WcaIsUnicodePropertySet(
|
||||
__in LPCWSTR wzProperty
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetRecordInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordFormattedInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__out int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordFormattedString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaAllocStream(
|
||||
__deref_out_bcount_part(cbData, 0) BYTE** ppbData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
HRESULT WIXAPI WcaFreeStream(
|
||||
__in BYTE* pbData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetRecordStream(
|
||||
__in MSIHANDLE hRecBinary,
|
||||
__in UINT uiField,
|
||||
__deref_out_bcount_full(*pcbData) BYTE** ppbData,
|
||||
__out DWORD* pcbData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetRecordString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__in_z LPCWSTR wzData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetRecordInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__in int iValue
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDoDeferredAction(
|
||||
__in_z LPCWSTR wzAction,
|
||||
__in_z LPCWSTR wzCustomActionData,
|
||||
__in UINT uiCost
|
||||
);
|
||||
DWORD WIXAPI WcaCountOfCustomActionDataRecords(
|
||||
__in_z LPCWSTR wzData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaReadStringFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__deref_out_z LPWSTR* ppwzString
|
||||
);
|
||||
HRESULT WIXAPI WcaReadIntegerFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__out int* piResult
|
||||
);
|
||||
HRESULT WIXAPI WcaReadStreamFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__deref_out_bcount(*pcbData) BYTE** ppbData,
|
||||
__out DWORD_PTR* pcbData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteStringToCaData(
|
||||
__in_z LPCWSTR wzString,
|
||||
__deref_inout_z LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteIntegerToCaData(
|
||||
__in int i,
|
||||
__deref_out_z_opt LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteStreamToCaData(
|
||||
__in_bcount(cbData) const BYTE* pbData,
|
||||
__in DWORD cbData,
|
||||
__deref_inout_z_opt LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
|
||||
HRESULT __cdecl WcaAddTempRecord(
|
||||
__inout MSIHANDLE* phTableView,
|
||||
__inout MSIHANDLE* phColumns,
|
||||
__in_z LPCWSTR wzTable,
|
||||
__out_opt MSIDBERROR* pdbError,
|
||||
__in UINT uiUniquifyColumn,
|
||||
__in UINT cColumns,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDumpTable(
|
||||
__in_z LPCWSTR wzTable
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDeferredActionRequiresReboot();
|
||||
BOOL WIXAPI WcaDidDeferredActionRequireReboot();
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptCreateKey(
|
||||
__out LPWSTR* ppwzScriptKey
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptCreate(
|
||||
__in WCA_ACTION action,
|
||||
__in WCA_CASCRIPT script,
|
||||
__in BOOL fImpersonated,
|
||||
__in_z LPCWSTR wzScriptKey,
|
||||
__in BOOL fAppend,
|
||||
__out WCA_CASCRIPT_HANDLE* phScript
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptOpen(
|
||||
__in WCA_ACTION action,
|
||||
__in WCA_CASCRIPT script,
|
||||
__in BOOL fImpersonated,
|
||||
__in_z LPCWSTR wzScriptKey,
|
||||
__out WCA_CASCRIPT_HANDLE* phScript
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptClose(
|
||||
__in_opt WCA_CASCRIPT_HANDLE hScript,
|
||||
__in WCA_CASCRIPT_CLOSE closeOperation
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptReadAsCustomActionData(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__out LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptWriteString(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__in_z LPCWSTR wzValue
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptWriteNumber(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptFlush(
|
||||
__in WCA_CASCRIPT_HANDLE hScript
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptCleanup(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in BOOL fImpersonated
|
||||
);
|
||||
|
||||
HRESULT WIXAPI QuietExec(
|
||||
__inout_z LPWSTR wzCommand,
|
||||
__in DWORD dwTimeout
|
||||
);
|
||||
|
||||
HRESULT WIXAPI QuietExecEx(
|
||||
__inout_z LPWSTR wzCommand,
|
||||
__in DWORD dwTimeout,
|
||||
__in BOOL fLogCommand,
|
||||
__in BOOL fLogOutput
|
||||
);
|
||||
|
||||
WCA_TODO WIXAPI WcaGetComponentToDo(
|
||||
__in_z LPCWSTR wzComponentId
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WIXAPI __stdcall
|
||||
#define ExitTrace WcaLogError
|
||||
#define ExitTrace1 WcaLogError
|
||||
#define ExitTrace2 WcaLogError
|
||||
#define ExitTrace3 WcaLogError
|
||||
|
||||
#include "dutil.h"
|
||||
|
||||
#define MessageExitOnLastError(x, e, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; } }
|
||||
#define MessageExitOnLastError1(x, e, f, s) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; } }
|
||||
|
||||
#define MessageExitOnFailure(x, e, s) if (FAILED(x)) { ExitTrace(x, "%s", s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 0); goto LExit; }
|
||||
#define MessageExitOnFailure1(x, e, f, s) if (FAILED(x)) { ExitTrace1(x, f, s); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 1, s); goto LExit; }
|
||||
#define MessageExitOnFailure2(x, e, f, s, t) if (FAILED(x)) { ExitTrace2(x, f, s, t); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 2, s, t); goto LExit; }
|
||||
#define MessageExitOnFailure3(x, e, f, s, t, u) if (FAILED(x)) { ExitTrace2(x, f, s, t, u); WcaErrorMessage(e, x, INSTALLMESSAGE_ERROR | MB_OK, 3, s, t, u); goto LExit; }
|
||||
|
||||
#define MessageExitOnNullWithLastError(p, x, e, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, "%s", s); WcaErrorMessage(e, x, MB_OK, 0); goto LExit; }
|
||||
#define MessageExitOnNullWithLastError1(p, x, e, f, s) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s); WcaErrorMessage(e, x, MB_OK, 1, s); goto LExit; }
|
||||
#define MessageExitOnNullWithLastError2(p, x, e, f, s, t) if (NULL == p) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (!FAILED(x)) { x = E_FAIL; } ExitTrace(x, f, s, t); WcaErrorMessage(e, x, MB_OK, 2, s, t); goto LExit; }
|
||||
|
||||
// Generic action enum.
|
||||
typedef enum WCA_ACTION
|
||||
{
|
||||
WCA_ACTION_NONE,
|
||||
WCA_ACTION_INSTALL,
|
||||
WCA_ACTION_UNINSTALL,
|
||||
} WCA_ACTION;
|
||||
|
||||
typedef enum WCA_CASCRIPT
|
||||
{
|
||||
WCA_CASCRIPT_SCHEDULED,
|
||||
WCA_CASCRIPT_ROLLBACK,
|
||||
} WCA_CASCRIPT;
|
||||
|
||||
typedef enum WCA_CASCRIPT_CLOSE
|
||||
{
|
||||
WCA_CASCRIPT_CLOSE_PRESERVE,
|
||||
WCA_CASCRIPT_CLOSE_DELETE,
|
||||
} WCA_CASCRIPT_CLOSE;
|
||||
|
||||
typedef enum WCA_TODO
|
||||
{
|
||||
WCA_TODO_UNKNOWN,
|
||||
WCA_TODO_INSTALL,
|
||||
WCA_TODO_UNINSTALL,
|
||||
WCA_TODO_REINSTALL,
|
||||
} WCA_TODO;
|
||||
|
||||
typedef struct WCA_CASCRIPT_STRUCT
|
||||
{
|
||||
LPWSTR pwzScriptPath;
|
||||
HANDLE hScriptFile;
|
||||
} *WCA_CASCRIPT_HANDLE;
|
||||
|
||||
void WIXAPI WcaGlobalInitialize(
|
||||
__in HINSTANCE hInst
|
||||
);
|
||||
void WIXAPI WcaGlobalFinalize();
|
||||
|
||||
HRESULT WIXAPI WcaInitialize(
|
||||
__in MSIHANDLE hInstall,
|
||||
__in_z PCSTR szCustomActionLogName
|
||||
);
|
||||
UINT WIXAPI WcaFinalize(
|
||||
__in UINT iReturnValue
|
||||
);
|
||||
BOOL WIXAPI WcaIsInitialized();
|
||||
|
||||
MSIHANDLE WIXAPI WcaGetInstallHandle();
|
||||
MSIHANDLE WIXAPI WcaGetDatabaseHandle();
|
||||
|
||||
const char* WIXAPI WcaGetLogName();
|
||||
|
||||
void WIXAPI WcaSetReturnValue(
|
||||
__in UINT iReturnValue
|
||||
);
|
||||
BOOL WIXAPI WcaCancelDetected();
|
||||
|
||||
#define LOG_BUFFER 2048
|
||||
typedef enum LOGLEVEL
|
||||
{
|
||||
LOGMSG_TRACEONLY, // Never written to the log file (except in DEBUG builds)
|
||||
LOGMSG_VERBOSE, // Written to log when LOGVERBOSE
|
||||
LOGMSG_STANDARD // Written to log whenever informational logging is enabled
|
||||
} LOGLEVEL;
|
||||
|
||||
void __cdecl WcaLog(
|
||||
__in LOGLEVEL llv,
|
||||
__in_z __format_string PCSTR fmt, ...
|
||||
);
|
||||
BOOL WIXAPI WcaDisplayAssert(
|
||||
__in LPCSTR sz
|
||||
);
|
||||
void __cdecl WcaLogError(
|
||||
__in HRESULT hr,
|
||||
__in LPCSTR szMessage,
|
||||
...
|
||||
);
|
||||
|
||||
UINT WIXAPI WcaProcessMessage(
|
||||
__in INSTALLMESSAGE eMessageType,
|
||||
__in MSIHANDLE hRecord
|
||||
);
|
||||
UINT __cdecl WcaErrorMessage(
|
||||
__in int iError,
|
||||
__in HRESULT hrError,
|
||||
__in UINT uiType,
|
||||
__in DWORD cArgs,
|
||||
...
|
||||
);
|
||||
HRESULT WIXAPI WcaProgressMessage(
|
||||
__in UINT uiCost,
|
||||
__in BOOL fExtendProgressBar
|
||||
);
|
||||
|
||||
BOOL WIXAPI WcaIsInstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
BOOL WIXAPI WcaIsReInstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
BOOL WIXAPI WcaIsUninstalling(
|
||||
__in INSTALLSTATE isInstalled,
|
||||
__in INSTALLSTATE isAction
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaSetComponentState(
|
||||
__in_z LPCWSTR wzComponent,
|
||||
__in INSTALLSTATE isState
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaTableExists(
|
||||
__in_z LPCWSTR wzTable
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaOpenView(
|
||||
__in_z LPCWSTR wzSql,
|
||||
__out MSIHANDLE* phView
|
||||
);
|
||||
HRESULT WIXAPI WcaExecuteView(
|
||||
__in MSIHANDLE hView,
|
||||
__in MSIHANDLE hRec
|
||||
);
|
||||
HRESULT WIXAPI WcaOpenExecuteView(
|
||||
__in_z LPCWSTR wzSql,
|
||||
__out MSIHANDLE* phView
|
||||
);
|
||||
HRESULT WIXAPI WcaFetchRecord(
|
||||
__in MSIHANDLE hView,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
HRESULT WIXAPI WcaFetchSingleRecord(
|
||||
__in MSIHANDLE hView,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetFormattedProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetFormattedString(
|
||||
__in_z LPCWSTR wzString,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetIntProperty(
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__inout int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetTargetPath(
|
||||
__in_z LPCWSTR wzFolder,
|
||||
__out LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetProperty(
|
||||
__in_z LPCWSTR wzPropertyName,
|
||||
__in_z LPCWSTR wzPropertyValue
|
||||
);
|
||||
HRESULT WIXAPI WcaSetIntProperty(
|
||||
__in_z LPCWSTR wzPropertyName,
|
||||
__in int nPropertyValue
|
||||
);
|
||||
BOOL WIXAPI WcaIsPropertySet(
|
||||
__in LPCSTR szProperty
|
||||
);
|
||||
BOOL WIXAPI WcaIsUnicodePropertySet(
|
||||
__in LPCWSTR wzProperty
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetRecordInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordFormattedInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__out int* piData
|
||||
);
|
||||
HRESULT WIXAPI WcaGetRecordFormattedString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__inout LPWSTR* ppwzData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaAllocStream(
|
||||
__deref_out_bcount_part(cbData, 0) BYTE** ppbData,
|
||||
__in DWORD cbData
|
||||
);
|
||||
HRESULT WIXAPI WcaFreeStream(
|
||||
__in BYTE* pbData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaGetRecordStream(
|
||||
__in MSIHANDLE hRecBinary,
|
||||
__in UINT uiField,
|
||||
__deref_out_bcount_full(*pcbData) BYTE** ppbData,
|
||||
__out DWORD* pcbData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetRecordString(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__in_z LPCWSTR wzData
|
||||
);
|
||||
HRESULT WIXAPI WcaSetRecordInteger(
|
||||
__in MSIHANDLE hRec,
|
||||
__in UINT uiField,
|
||||
__in int iValue
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDoDeferredAction(
|
||||
__in_z LPCWSTR wzAction,
|
||||
__in_z LPCWSTR wzCustomActionData,
|
||||
__in UINT uiCost
|
||||
);
|
||||
DWORD WIXAPI WcaCountOfCustomActionDataRecords(
|
||||
__in_z LPCWSTR wzData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaReadStringFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__deref_out_z LPWSTR* ppwzString
|
||||
);
|
||||
HRESULT WIXAPI WcaReadIntegerFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__out int* piResult
|
||||
);
|
||||
HRESULT WIXAPI WcaReadStreamFromCaData(
|
||||
__deref_in LPWSTR* ppwzCustomActionData,
|
||||
__deref_out_bcount(*pcbData) BYTE** ppbData,
|
||||
__out DWORD_PTR* pcbData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteStringToCaData(
|
||||
__in_z LPCWSTR wzString,
|
||||
__deref_inout_z LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteIntegerToCaData(
|
||||
__in int i,
|
||||
__deref_out_z_opt LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
HRESULT WIXAPI WcaWriteStreamToCaData(
|
||||
__in_bcount(cbData) const BYTE* pbData,
|
||||
__in DWORD cbData,
|
||||
__deref_inout_z_opt LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
|
||||
HRESULT __cdecl WcaAddTempRecord(
|
||||
__inout MSIHANDLE* phTableView,
|
||||
__inout MSIHANDLE* phColumns,
|
||||
__in_z LPCWSTR wzTable,
|
||||
__out_opt MSIDBERROR* pdbError,
|
||||
__in UINT uiUniquifyColumn,
|
||||
__in UINT cColumns,
|
||||
...
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDumpTable(
|
||||
__in_z LPCWSTR wzTable
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaDeferredActionRequiresReboot();
|
||||
BOOL WIXAPI WcaDidDeferredActionRequireReboot();
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptCreateKey(
|
||||
__out LPWSTR* ppwzScriptKey
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptCreate(
|
||||
__in WCA_ACTION action,
|
||||
__in WCA_CASCRIPT script,
|
||||
__in BOOL fImpersonated,
|
||||
__in_z LPCWSTR wzScriptKey,
|
||||
__in BOOL fAppend,
|
||||
__out WCA_CASCRIPT_HANDLE* phScript
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptOpen(
|
||||
__in WCA_ACTION action,
|
||||
__in WCA_CASCRIPT script,
|
||||
__in BOOL fImpersonated,
|
||||
__in_z LPCWSTR wzScriptKey,
|
||||
__out WCA_CASCRIPT_HANDLE* phScript
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptClose(
|
||||
__in_opt WCA_CASCRIPT_HANDLE hScript,
|
||||
__in WCA_CASCRIPT_CLOSE closeOperation
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptReadAsCustomActionData(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__out LPWSTR* ppwzCustomActionData
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptWriteString(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__in_z LPCWSTR wzValue
|
||||
);
|
||||
|
||||
HRESULT WIXAPI WcaCaScriptWriteNumber(
|
||||
__in WCA_CASCRIPT_HANDLE hScript,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptFlush(
|
||||
__in WCA_CASCRIPT_HANDLE hScript
|
||||
);
|
||||
|
||||
void WIXAPI WcaCaScriptCleanup(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in BOOL fImpersonated
|
||||
);
|
||||
|
||||
HRESULT WIXAPI QuietExec(
|
||||
__inout_z LPWSTR wzCommand,
|
||||
__in DWORD dwTimeout
|
||||
);
|
||||
|
||||
HRESULT WIXAPI QuietExecEx(
|
||||
__inout_z LPWSTR wzCommand,
|
||||
__in DWORD dwTimeout,
|
||||
__in BOOL fLogCommand,
|
||||
__in BOOL fLogOutput
|
||||
);
|
||||
|
||||
WCA_TODO WIXAPI WcaGetComponentToDo(
|
||||
__in_z LPCWSTR wzComponentId
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,20 +1,20 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wcautil.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT WIXAPI WcaInitializeWow64();
|
||||
BOOL WIXAPI WcaIsWow64Process();
|
||||
BOOL WIXAPI WcaIsWow64Initialized();
|
||||
HRESULT WIXAPI WcaDisableWow64FSRedirection();
|
||||
HRESULT WIXAPI WcaRevertWow64FSRedirection();
|
||||
HRESULT WIXAPI WcaFinalizeWow64();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wcautil.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT WIXAPI WcaInitializeWow64();
|
||||
BOOL WIXAPI WcaIsWow64Process();
|
||||
BOOL WIXAPI WcaIsWow64Initialized();
|
||||
HRESULT WIXAPI WcaDisableWow64FSRedirection();
|
||||
HRESULT WIXAPI WcaRevertWow64FSRedirection();
|
||||
HRESULT WIXAPI WcaFinalizeWow64();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+130
-130
@@ -1,130 +1,130 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wcautil.h"
|
||||
|
||||
// Enumerations
|
||||
typedef enum eWrapQueryAction
|
||||
{
|
||||
wqaTableBegin = 1,
|
||||
wqaTableFinish,
|
||||
wqaRowBegin,
|
||||
wqaRowFinish
|
||||
} eWrapQueryAction;
|
||||
|
||||
typedef enum eColumnDataType
|
||||
{
|
||||
cdtString = 1,
|
||||
cdtInt,
|
||||
cdtStream,
|
||||
cdtUnknown
|
||||
} eColumnDataType;
|
||||
|
||||
typedef enum eFormatMaskColumn
|
||||
{
|
||||
efmcColumn1 = 1,
|
||||
efmcColumn2 = 1 << 1,
|
||||
efmcColumn3 = 1 << 2,
|
||||
efmcColumn4 = 1 << 3,
|
||||
efmcColumn5 = 1 << 4,
|
||||
efmcColumn6 = 1 << 5,
|
||||
efmcColumn7 = 1 << 6,
|
||||
efmcColumn8 = 1 << 7,
|
||||
efmcColumn9 = 1 << 8,
|
||||
efmcColumn10 = 1 << 9,
|
||||
efmcColumn11 = 1 << 10,
|
||||
efmcColumn12 = 1 << 11,
|
||||
efmcColumn13 = 1 << 12,
|
||||
efmcColumn14 = 1 << 13,
|
||||
efmcColumn15 = 1 << 14,
|
||||
efmcColumn16 = 1 << 15,
|
||||
efmcColumn17 = 1 << 16,
|
||||
efmcColumn18 = 1 << 17,
|
||||
efmcColumn19 = 1 << 18,
|
||||
efmcColumn20 = 1 << 19,
|
||||
efmcColumn21 = 1 << 20,
|
||||
efmcColumn22 = 1 << 21,
|
||||
efmcColumn23 = 1 << 22,
|
||||
efmcColumn24 = 1 << 23,
|
||||
efmcColumn25 = 1 << 24,
|
||||
efmcColumn26 = 1 << 25,
|
||||
efmcColumn27 = 1 << 26,
|
||||
efmcColumn28 = 1 << 27,
|
||||
efmcColumn29 = 1 << 28,
|
||||
efmcColumn30 = 1 << 29,
|
||||
efmcColumn31 = 1 << 30,
|
||||
efmcColumn32 = 1 << 31,
|
||||
} eFormatMaskColumn;
|
||||
|
||||
// Keeps track of the query instance for the reading CA (deferred CA)
|
||||
typedef struct WCA_WRAPQUERY_STRUCT
|
||||
{
|
||||
// These are used to size our dynamic arrays below
|
||||
DWORD dwColumns, dwRows, dwNextIndex;
|
||||
|
||||
// Dynamic arrays of column schema information
|
||||
eColumnDataType *pcdtColumnType;
|
||||
LPWSTR *ppwzColumnNames;
|
||||
|
||||
// Dynamic array of raw record data
|
||||
MSIHANDLE *phRecords;
|
||||
} *WCA_WRAPQUERY_HANDLE;
|
||||
|
||||
// Wrap a query
|
||||
// Setting the pfFormatMask enables control over which fields will be formatted, and which will be left unchanged
|
||||
// Setting dwComponentColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two additional columns to the right side of the table
|
||||
// - ISInstalled and ISAction - which map to the ComponentState of the component (the component is found in the column specified)
|
||||
// Note that if a component is NULL, the component state columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately
|
||||
// Setting dwDirectoryColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two more additional columns to the right side of the table
|
||||
// - SourcePath and TargetPath - which map to the Directory's Source and Target Path (the directory is found in the column specified)
|
||||
// Note that if a directory is NULL, the directory source/target path columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately
|
||||
HRESULT WIXAPI WcaWrapQuery(
|
||||
__in_z LPCWSTR pwzQuery,
|
||||
__inout LPWSTR * ppwzCustomActionData,
|
||||
__in_opt DWORD dwFormatMask,
|
||||
__in_opt DWORD dwComponentColumn,
|
||||
__in_opt DWORD dwDirectoryColumn
|
||||
);
|
||||
// This wraps an empty table query into the custom action data - this is a way to indicate to the deferred custom action that a necessary table doesn't exist, or its query returned no results
|
||||
HRESULT WIXAPI WcaWrapEmptyQuery(
|
||||
__inout LPWSTR * ppwzCustomActionData
|
||||
);
|
||||
|
||||
// Open a new unwrap query operation, with data from the ppwzCustomActionData string
|
||||
HRESULT WIXAPI WcaBeginUnwrapQuery(
|
||||
__out WCA_WRAPQUERY_HANDLE * phWrapQuery,
|
||||
__inout LPWSTR * ppwzCustomActionData
|
||||
);
|
||||
|
||||
// Get the number of records in a query being unwrapped
|
||||
DWORD WIXAPI WcaGetQueryRecords(
|
||||
__in const WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
|
||||
// This function resets a query back to its first row, so that the next fetch returns the first record
|
||||
void WIXAPI WcaFetchWrappedReset(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
// Fetch the next record in this query
|
||||
// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item.
|
||||
// so, don't use this function with PMSIHANDLE objects!
|
||||
HRESULT WIXAPI WcaFetchWrappedRecord(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
// Fetch the next record in the query where the string value in column dwComparisonColumn equals the value pwzExpectedValue
|
||||
// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item.
|
||||
// so, don't use this function with PMSIHANDLE objects!
|
||||
HRESULT WIXAPI WcaFetchWrappedRecordWhereString(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery,
|
||||
__in DWORD dwComparisonColumn,
|
||||
__in_z LPCWSTR pwzExpectedValue,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
// Release a query ID (frees memory, and frees the ID for a new query)
|
||||
void WIXAPI WcaFinishUnwrapQuery(
|
||||
__in_opt WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#include "wcautil.h"
|
||||
|
||||
// Enumerations
|
||||
typedef enum eWrapQueryAction
|
||||
{
|
||||
wqaTableBegin = 1,
|
||||
wqaTableFinish,
|
||||
wqaRowBegin,
|
||||
wqaRowFinish
|
||||
} eWrapQueryAction;
|
||||
|
||||
typedef enum eColumnDataType
|
||||
{
|
||||
cdtString = 1,
|
||||
cdtInt,
|
||||
cdtStream,
|
||||
cdtUnknown
|
||||
} eColumnDataType;
|
||||
|
||||
typedef enum eFormatMaskColumn
|
||||
{
|
||||
efmcColumn1 = 1,
|
||||
efmcColumn2 = 1 << 1,
|
||||
efmcColumn3 = 1 << 2,
|
||||
efmcColumn4 = 1 << 3,
|
||||
efmcColumn5 = 1 << 4,
|
||||
efmcColumn6 = 1 << 5,
|
||||
efmcColumn7 = 1 << 6,
|
||||
efmcColumn8 = 1 << 7,
|
||||
efmcColumn9 = 1 << 8,
|
||||
efmcColumn10 = 1 << 9,
|
||||
efmcColumn11 = 1 << 10,
|
||||
efmcColumn12 = 1 << 11,
|
||||
efmcColumn13 = 1 << 12,
|
||||
efmcColumn14 = 1 << 13,
|
||||
efmcColumn15 = 1 << 14,
|
||||
efmcColumn16 = 1 << 15,
|
||||
efmcColumn17 = 1 << 16,
|
||||
efmcColumn18 = 1 << 17,
|
||||
efmcColumn19 = 1 << 18,
|
||||
efmcColumn20 = 1 << 19,
|
||||
efmcColumn21 = 1 << 20,
|
||||
efmcColumn22 = 1 << 21,
|
||||
efmcColumn23 = 1 << 22,
|
||||
efmcColumn24 = 1 << 23,
|
||||
efmcColumn25 = 1 << 24,
|
||||
efmcColumn26 = 1 << 25,
|
||||
efmcColumn27 = 1 << 26,
|
||||
efmcColumn28 = 1 << 27,
|
||||
efmcColumn29 = 1 << 28,
|
||||
efmcColumn30 = 1 << 29,
|
||||
efmcColumn31 = 1 << 30,
|
||||
efmcColumn32 = 1 << 31,
|
||||
} eFormatMaskColumn;
|
||||
|
||||
// Keeps track of the query instance for the reading CA (deferred CA)
|
||||
typedef struct WCA_WRAPQUERY_STRUCT
|
||||
{
|
||||
// These are used to size our dynamic arrays below
|
||||
DWORD dwColumns, dwRows, dwNextIndex;
|
||||
|
||||
// Dynamic arrays of column schema information
|
||||
eColumnDataType *pcdtColumnType;
|
||||
LPWSTR *ppwzColumnNames;
|
||||
|
||||
// Dynamic array of raw record data
|
||||
MSIHANDLE *phRecords;
|
||||
} *WCA_WRAPQUERY_HANDLE;
|
||||
|
||||
// Wrap a query
|
||||
// Setting the pfFormatMask enables control over which fields will be formatted, and which will be left unchanged
|
||||
// Setting dwComponentColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two additional columns to the right side of the table
|
||||
// - ISInstalled and ISAction - which map to the ComponentState of the component (the component is found in the column specified)
|
||||
// Note that if a component is NULL, the component state columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately
|
||||
// Setting dwDirectoryColumn to something other than 0xFFFFFFFF tells WcaWrapQuery to add two more additional columns to the right side of the table
|
||||
// - SourcePath and TargetPath - which map to the Directory's Source and Target Path (the directory is found in the column specified)
|
||||
// Note that if a directory is NULL, the directory source/target path columns will also be left null, and it will be up to the deferred CA to fail or ignore the case appropriately
|
||||
HRESULT WIXAPI WcaWrapQuery(
|
||||
__in_z LPCWSTR pwzQuery,
|
||||
__inout LPWSTR * ppwzCustomActionData,
|
||||
__in_opt DWORD dwFormatMask,
|
||||
__in_opt DWORD dwComponentColumn,
|
||||
__in_opt DWORD dwDirectoryColumn
|
||||
);
|
||||
// This wraps an empty table query into the custom action data - this is a way to indicate to the deferred custom action that a necessary table doesn't exist, or its query returned no results
|
||||
HRESULT WIXAPI WcaWrapEmptyQuery(
|
||||
__inout LPWSTR * ppwzCustomActionData
|
||||
);
|
||||
|
||||
// Open a new unwrap query operation, with data from the ppwzCustomActionData string
|
||||
HRESULT WIXAPI WcaBeginUnwrapQuery(
|
||||
__out WCA_WRAPQUERY_HANDLE * phWrapQuery,
|
||||
__inout LPWSTR * ppwzCustomActionData
|
||||
);
|
||||
|
||||
// Get the number of records in a query being unwrapped
|
||||
DWORD WIXAPI WcaGetQueryRecords(
|
||||
__in const WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
|
||||
// This function resets a query back to its first row, so that the next fetch returns the first record
|
||||
void WIXAPI WcaFetchWrappedReset(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
// Fetch the next record in this query
|
||||
// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item.
|
||||
// so, don't use this function with PMSIHANDLE objects!
|
||||
HRESULT WIXAPI WcaFetchWrappedRecord(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
// Fetch the next record in the query where the string value in column dwComparisonColumn equals the value pwzExpectedValue
|
||||
// NOTE: the MSIHANDLE returned by this function should not be released, as it is the same handle used by the query object to maintain the item.
|
||||
// so, don't use this function with PMSIHANDLE objects!
|
||||
HRESULT WIXAPI WcaFetchWrappedRecordWhereString(
|
||||
__in WCA_WRAPQUERY_HANDLE hWrapQuery,
|
||||
__in DWORD dwComparisonColumn,
|
||||
__in_z LPCWSTR pwzExpectedValue,
|
||||
__out MSIHANDLE* phRec
|
||||
);
|
||||
|
||||
// Release a query ID (frees memory, and frees the ID for a new query)
|
||||
void WIXAPI WcaFinishUnwrapQuery(
|
||||
__in_opt WCA_WRAPQUERY_HANDLE hWrapQuery
|
||||
);
|
||||
+373
-373
@@ -1,373 +1,373 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// constants
|
||||
|
||||
#define IDNOACTION 0
|
||||
#define WIU_MB_OKIGNORECANCELRETRY 0xE
|
||||
|
||||
#define MAX_DARWIN_KEY 73
|
||||
#define MAX_DARWIN_COLUMN 255
|
||||
|
||||
#define WIU_LOG_DEFAULT INSTALLLOGMODE_FATALEXIT | INSTALLLOGMODE_ERROR | INSTALLLOGMODE_WARNING | \
|
||||
INSTALLLOGMODE_USER | INSTALLLOGMODE_INFO | INSTALLLOGMODE_RESOLVESOURCE | \
|
||||
INSTALLLOGMODE_OUTOFDISKSPACE | INSTALLLOGMODE_ACTIONSTART | \
|
||||
INSTALLLOGMODE_ACTIONDATA | INSTALLLOGMODE_COMMONDATA | INSTALLLOGMODE_PROPERTYDUMP
|
||||
|
||||
#define ReleaseMsi(h) if (h) { ::MsiCloseHandle(h); }
|
||||
#define ReleaseNullMsi(h) if (h) { ::MsiCloseHandle(h); h = NULL; }
|
||||
|
||||
|
||||
typedef enum WIU_RESTART
|
||||
{
|
||||
WIU_RESTART_NONE,
|
||||
WIU_RESTART_REQUIRED,
|
||||
WIU_RESTART_INITIATED,
|
||||
} WIU_RESTART;
|
||||
|
||||
typedef enum WIU_MSI_EXECUTE_MESSAGE_TYPE
|
||||
{
|
||||
WIU_MSI_EXECUTE_MESSAGE_NONE,
|
||||
WIU_MSI_EXECUTE_MESSAGE_PROGRESS,
|
||||
WIU_MSI_EXECUTE_MESSAGE_ERROR,
|
||||
WIU_MSI_EXECUTE_MESSAGE_MSI_MESSAGE,
|
||||
WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE,
|
||||
} WIU_MSI_EXECUTE_MESSAGE_TYPE;
|
||||
|
||||
|
||||
// structures
|
||||
|
||||
typedef struct _WIU_MSI_EXECUTE_MESSAGE
|
||||
{
|
||||
WIU_MSI_EXECUTE_MESSAGE_TYPE type;
|
||||
DWORD dwAllowedResults;
|
||||
|
||||
DWORD cData;
|
||||
LPCWSTR* rgwzData;
|
||||
|
||||
INT nResultRecommendation; // recommended return result for this message based on analysis of real world installs.
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD dwPercentage;
|
||||
} progress;
|
||||
struct
|
||||
{
|
||||
DWORD dwErrorCode;
|
||||
LPCWSTR wzMessage;
|
||||
} error;
|
||||
struct
|
||||
{
|
||||
INSTALLMESSAGE mt;
|
||||
LPCWSTR wzMessage;
|
||||
} msiMessage;
|
||||
struct
|
||||
{
|
||||
DWORD cFiles;
|
||||
LPCWSTR* rgwzFiles;
|
||||
} msiFilesInUse;
|
||||
};
|
||||
} WIU_MSI_EXECUTE_MESSAGE;
|
||||
|
||||
typedef struct _WIU_MSI_PROGRESS
|
||||
{
|
||||
DWORD dwTotal;
|
||||
DWORD dwCompleted;
|
||||
DWORD dwStep;
|
||||
BOOL fMoveForward;
|
||||
BOOL fEnableActionData;
|
||||
BOOL fScriptInProgress;
|
||||
} WIU_MSI_PROGRESS;
|
||||
|
||||
|
||||
typedef int (*PFN_MSIEXECUTEMESSAGEHANDLER)(
|
||||
__in WIU_MSI_EXECUTE_MESSAGE* pMessage,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
typedef struct _WIU_MSI_EXECUTE_CONTEXT
|
||||
{
|
||||
BOOL fRollback;
|
||||
PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler;
|
||||
LPVOID pvContext;
|
||||
WIU_MSI_PROGRESS rgMsiProgress[64];
|
||||
DWORD dwCurrentProgressIndex;
|
||||
|
||||
INSTALLUILEVEL previousInstallUILevel;
|
||||
HWND hwndPreviousParentWindow;
|
||||
INSTALLUI_HANDLERW pfnPreviousExternalUI;
|
||||
INSTALLUI_HANDLER_RECORD pfnPreviousExternalUIRecord;
|
||||
|
||||
BOOL fSetPreviousExternalUIRecord;
|
||||
BOOL fSetPreviousExternalUI;
|
||||
} WIU_MSI_EXECUTE_CONTEXT;
|
||||
|
||||
|
||||
// typedefs
|
||||
typedef UINT (WINAPI *PFN_MSIENABLELOGW)(
|
||||
__in DWORD dwLogMode,
|
||||
__in_z LPCWSTR szLogFile,
|
||||
__in DWORD dwLogAttributes
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOW)(
|
||||
__in LPCWSTR szProductCode,
|
||||
__in LPCWSTR szProperty,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR szValue,
|
||||
__inout LPDWORD pcchValue
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSIGETCOMPONENTPATHW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in LPCWSTR szComponent,
|
||||
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf,
|
||||
__inout_opt LPDWORD pcchBuf
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSILOCATECOMPONENTW)(
|
||||
__in LPCWSTR szComponent,
|
||||
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf,
|
||||
__inout_opt LPDWORD pcchBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOEXW)(
|
||||
__in LPCWSTR szProductCode,
|
||||
__in_opt LPCWSTR szUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in LPCWSTR szProperty,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR szValue,
|
||||
__inout_opt LPDWORD pcchValue
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSIQUERYFEATURESTATEW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in LPCWSTR szFeature
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPATCHINFOEXW)(
|
||||
__in_z LPCWSTR wzPatchCode,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out_opt LPWSTR wzValue,
|
||||
__inout DWORD* pcchValue
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIDETERMINEPATCHSEQUENCEW)(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT context,
|
||||
__in DWORD cPatchInfo,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIDETERMINEAPPLICABLEPATCHESW)(
|
||||
__in_z LPCWSTR wzProductPackagePath,
|
||||
__in DWORD cPatchInfo,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIINSTALLPRODUCTW)(
|
||||
__in LPCWSTR szPackagePath,
|
||||
__in_opt LPCWSTR szCommandLine
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSICONFIGUREPRODUCTEXW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in int iInstallLevel,
|
||||
__in INSTALLSTATE eInstallState,
|
||||
__in_opt LPCWSTR szCommandLine
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIREMOVEPATCHESW)(
|
||||
__in_z LPCWSTR wzPatchList,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in INSTALLTYPE eUninstallType,
|
||||
__in_z_opt LPCWSTR szPropertyList
|
||||
);
|
||||
typedef INSTALLUILEVEL (WINAPI *PFN_MSISETINTERNALUI)(
|
||||
__in INSTALLUILEVEL dwUILevel,
|
||||
__inout_opt HWND *phWnd
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSISETEXTERNALUIRECORD)(
|
||||
__in_opt INSTALLUI_HANDLER_RECORD puiHandler,
|
||||
__in DWORD dwMessageFilter,
|
||||
__in_opt LPVOID pvContext,
|
||||
__out_opt PINSTALLUI_HANDLER_RECORD ppuiPrevHandler
|
||||
);
|
||||
typedef INSTALLUI_HANDLERW (WINAPI *PFN_MSISETEXTERNALUIW)(
|
||||
__in_opt INSTALLUI_HANDLERW puiHandler,
|
||||
__in DWORD dwMessageFilter,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSW)(
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSEXW)(
|
||||
__in_z_opt LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in DWORD dwContext,
|
||||
__in DWORD dwIndex,
|
||||
__out_opt WCHAR wzInstalledProductCode[39],
|
||||
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext,
|
||||
__out_opt LPWSTR wzSid,
|
||||
__inout_opt LPDWORD pcchSid
|
||||
);
|
||||
|
||||
typedef UINT (WINAPI *PFN_MSIENUMRELATEDPRODUCTSW)(
|
||||
__in LPCWSTR lpUpgradeCode,
|
||||
__reserved DWORD dwReserved,
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSISOURCELISTADDSOURCEEXW)(
|
||||
__in LPCWSTR szProductCodeOrPatchCode,
|
||||
__in_opt LPCWSTR szUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in DWORD dwOptions,
|
||||
__in LPCWSTR szSource,
|
||||
__in_opt DWORD dwIndex
|
||||
);
|
||||
|
||||
|
||||
HRESULT DAPI WiuInitialize(
|
||||
);
|
||||
void DAPI WiuUninitialize(
|
||||
);
|
||||
void DAPI WiuFunctionOverride(
|
||||
__in_opt PFN_MSIENABLELOGW pfnMsiEnableLogW,
|
||||
__in_opt PFN_MSIGETCOMPONENTPATHW pfnMsiGetComponentPathW,
|
||||
__in_opt PFN_MSILOCATECOMPONENTW pfnMsiLocateComponentW,
|
||||
__in_opt PFN_MSIQUERYFEATURESTATEW pfnMsiQueryFeatureStateW,
|
||||
__in_opt PFN_MSIGETPRODUCTINFOW pfnMsiGetProductInfoW,
|
||||
__in_opt PFN_MSIGETPRODUCTINFOEXW pfnMsiGetProductInfoExW,
|
||||
__in_opt PFN_MSIINSTALLPRODUCTW pfnMsiInstallProductW,
|
||||
__in_opt PFN_MSICONFIGUREPRODUCTEXW pfnMsiConfigureProductExW,
|
||||
__in_opt PFN_MSISETINTERNALUI pfnMsiSetInternalUI,
|
||||
__in_opt PFN_MSISETEXTERNALUIW pfnMsiSetExternalUIW,
|
||||
__in_opt PFN_MSIENUMRELATEDPRODUCTSW pfnMsiEnumRelatedProductsW,
|
||||
__in_opt PFN_MSISETEXTERNALUIRECORD pfnMsiSetExternalUIRecord,
|
||||
__in_opt PFN_MSISOURCELISTADDSOURCEEXW pfnMsiSourceListAddSourceExW
|
||||
);
|
||||
HRESULT DAPI WiuGetComponentPath(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzComponentId,
|
||||
__out INSTALLSTATE* pInstallState,
|
||||
__out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuLocateComponent(
|
||||
__in_z LPCWSTR wzComponentId,
|
||||
__out INSTALLSTATE* pInstallState,
|
||||
__out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuQueryFeatureState(
|
||||
__in_z LPCWSTR wzProduct,
|
||||
__in_z LPCWSTR wzFeature,
|
||||
__out INSTALLSTATE* pInstallState
|
||||
);
|
||||
HRESULT DAPI WiuGetProductInfo(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetProductInfoEx(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetProductProperty(
|
||||
__in MSIHANDLE hProduct,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetPatchInfoEx(
|
||||
__in_z LPCWSTR wzPatchCode,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuDeterminePatchSequence(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT context,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo,
|
||||
__in DWORD cPatchInfo
|
||||
);
|
||||
HRESULT DAPI WiuDetermineApplicablePatches(
|
||||
__in_z LPCWSTR wzProductPackagePath,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo,
|
||||
__in DWORD cPatchInfo
|
||||
);
|
||||
HRESULT DAPI WiuEnumProducts(
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode
|
||||
);
|
||||
HRESULT DAPI WiuEnumProductsEx(
|
||||
__in_z_opt LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in DWORD dwContext,
|
||||
__in DWORD dwIndex,
|
||||
__out_opt WCHAR wzInstalledProductCode[39],
|
||||
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext,
|
||||
__out_opt LPWSTR wzSid,
|
||||
__inout_opt LPDWORD pcchSid
|
||||
);
|
||||
HRESULT DAPI WiuEnumRelatedProducts(
|
||||
__in_z LPCWSTR wzUpgradeCode,
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode
|
||||
);
|
||||
HRESULT DAPI WiuEnumRelatedProductCodes(
|
||||
__in_z LPCWSTR wzUpgradeCode,
|
||||
__deref_out_ecount_opt(pcRelatedProducts) LPWSTR** prgsczProductCodes,
|
||||
__out DWORD* pcRelatedProducts,
|
||||
__in BOOL fReturnHighestVersionOnly
|
||||
);
|
||||
HRESULT DAPI WiuEnableLog(
|
||||
__in DWORD dwLogMode,
|
||||
__in_z LPCWSTR wzLogFile,
|
||||
__in DWORD dwLogAttributes
|
||||
);
|
||||
HRESULT DAPI WiuInitializeExternalUI(
|
||||
__in PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler,
|
||||
__in INSTALLUILEVEL internalUILevel,
|
||||
__in HWND hwndParent,
|
||||
__in LPVOID pvContext,
|
||||
__in BOOL fRollback,
|
||||
__in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext
|
||||
);
|
||||
void DAPI WiuUninitializeExternalUI(
|
||||
__in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext
|
||||
);
|
||||
HRESULT DAPI WiuConfigureProductEx(
|
||||
__in_z LPCWSTR wzProduct,
|
||||
__in int iInstallLevel,
|
||||
__in INSTALLSTATE eInstallState,
|
||||
__in_z LPCWSTR wzCommandLine,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuInstallProduct(
|
||||
__in_z LPCWSTR wzPackagPath,
|
||||
__in_z LPCWSTR wzCommandLine,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuRemovePatches(
|
||||
__in_z LPCWSTR wzPatchList,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzPropertyList,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuSourceListAddSourceEx(
|
||||
__in_z LPCWSTR wzProductCodeOrPatchCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in DWORD dwCode,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_opt DWORD dwIndex
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// constants
|
||||
|
||||
#define IDNOACTION 0
|
||||
#define WIU_MB_OKIGNORECANCELRETRY 0xE
|
||||
|
||||
#define MAX_DARWIN_KEY 73
|
||||
#define MAX_DARWIN_COLUMN 255
|
||||
|
||||
#define WIU_LOG_DEFAULT INSTALLLOGMODE_FATALEXIT | INSTALLLOGMODE_ERROR | INSTALLLOGMODE_WARNING | \
|
||||
INSTALLLOGMODE_USER | INSTALLLOGMODE_INFO | INSTALLLOGMODE_RESOLVESOURCE | \
|
||||
INSTALLLOGMODE_OUTOFDISKSPACE | INSTALLLOGMODE_ACTIONSTART | \
|
||||
INSTALLLOGMODE_ACTIONDATA | INSTALLLOGMODE_COMMONDATA | INSTALLLOGMODE_PROPERTYDUMP
|
||||
|
||||
#define ReleaseMsi(h) if (h) { ::MsiCloseHandle(h); }
|
||||
#define ReleaseNullMsi(h) if (h) { ::MsiCloseHandle(h); h = NULL; }
|
||||
|
||||
|
||||
typedef enum WIU_RESTART
|
||||
{
|
||||
WIU_RESTART_NONE,
|
||||
WIU_RESTART_REQUIRED,
|
||||
WIU_RESTART_INITIATED,
|
||||
} WIU_RESTART;
|
||||
|
||||
typedef enum WIU_MSI_EXECUTE_MESSAGE_TYPE
|
||||
{
|
||||
WIU_MSI_EXECUTE_MESSAGE_NONE,
|
||||
WIU_MSI_EXECUTE_MESSAGE_PROGRESS,
|
||||
WIU_MSI_EXECUTE_MESSAGE_ERROR,
|
||||
WIU_MSI_EXECUTE_MESSAGE_MSI_MESSAGE,
|
||||
WIU_MSI_EXECUTE_MESSAGE_MSI_FILES_IN_USE,
|
||||
} WIU_MSI_EXECUTE_MESSAGE_TYPE;
|
||||
|
||||
|
||||
// structures
|
||||
|
||||
typedef struct _WIU_MSI_EXECUTE_MESSAGE
|
||||
{
|
||||
WIU_MSI_EXECUTE_MESSAGE_TYPE type;
|
||||
DWORD dwAllowedResults;
|
||||
|
||||
DWORD cData;
|
||||
LPCWSTR* rgwzData;
|
||||
|
||||
INT nResultRecommendation; // recommended return result for this message based on analysis of real world installs.
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
DWORD dwPercentage;
|
||||
} progress;
|
||||
struct
|
||||
{
|
||||
DWORD dwErrorCode;
|
||||
LPCWSTR wzMessage;
|
||||
} error;
|
||||
struct
|
||||
{
|
||||
INSTALLMESSAGE mt;
|
||||
LPCWSTR wzMessage;
|
||||
} msiMessage;
|
||||
struct
|
||||
{
|
||||
DWORD cFiles;
|
||||
LPCWSTR* rgwzFiles;
|
||||
} msiFilesInUse;
|
||||
};
|
||||
} WIU_MSI_EXECUTE_MESSAGE;
|
||||
|
||||
typedef struct _WIU_MSI_PROGRESS
|
||||
{
|
||||
DWORD dwTotal;
|
||||
DWORD dwCompleted;
|
||||
DWORD dwStep;
|
||||
BOOL fMoveForward;
|
||||
BOOL fEnableActionData;
|
||||
BOOL fScriptInProgress;
|
||||
} WIU_MSI_PROGRESS;
|
||||
|
||||
|
||||
typedef int (*PFN_MSIEXECUTEMESSAGEHANDLER)(
|
||||
__in WIU_MSI_EXECUTE_MESSAGE* pMessage,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
|
||||
typedef struct _WIU_MSI_EXECUTE_CONTEXT
|
||||
{
|
||||
BOOL fRollback;
|
||||
PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler;
|
||||
LPVOID pvContext;
|
||||
WIU_MSI_PROGRESS rgMsiProgress[64];
|
||||
DWORD dwCurrentProgressIndex;
|
||||
|
||||
INSTALLUILEVEL previousInstallUILevel;
|
||||
HWND hwndPreviousParentWindow;
|
||||
INSTALLUI_HANDLERW pfnPreviousExternalUI;
|
||||
INSTALLUI_HANDLER_RECORD pfnPreviousExternalUIRecord;
|
||||
|
||||
BOOL fSetPreviousExternalUIRecord;
|
||||
BOOL fSetPreviousExternalUI;
|
||||
} WIU_MSI_EXECUTE_CONTEXT;
|
||||
|
||||
|
||||
// typedefs
|
||||
typedef UINT (WINAPI *PFN_MSIENABLELOGW)(
|
||||
__in DWORD dwLogMode,
|
||||
__in_z LPCWSTR szLogFile,
|
||||
__in DWORD dwLogAttributes
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOW)(
|
||||
__in LPCWSTR szProductCode,
|
||||
__in LPCWSTR szProperty,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR szValue,
|
||||
__inout LPDWORD pcchValue
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSIGETCOMPONENTPATHW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in LPCWSTR szComponent,
|
||||
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf,
|
||||
__inout_opt LPDWORD pcchBuf
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSILOCATECOMPONENTW)(
|
||||
__in LPCWSTR szComponent,
|
||||
__out_ecount_opt(*pcchBuf) LPWSTR lpPathBuf,
|
||||
__inout_opt LPDWORD pcchBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPRODUCTINFOEXW)(
|
||||
__in LPCWSTR szProductCode,
|
||||
__in_opt LPCWSTR szUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in LPCWSTR szProperty,
|
||||
__out_ecount_opt(*pcchValue) LPWSTR szValue,
|
||||
__inout_opt LPDWORD pcchValue
|
||||
);
|
||||
typedef INSTALLSTATE (WINAPI *PFN_MSIQUERYFEATURESTATEW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in LPCWSTR szFeature
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIGETPATCHINFOEXW)(
|
||||
__in_z LPCWSTR wzPatchCode,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out_opt LPWSTR wzValue,
|
||||
__inout DWORD* pcchValue
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIDETERMINEPATCHSEQUENCEW)(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT context,
|
||||
__in DWORD cPatchInfo,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIDETERMINEAPPLICABLEPATCHESW)(
|
||||
__in_z LPCWSTR wzProductPackagePath,
|
||||
__in DWORD cPatchInfo,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIINSTALLPRODUCTW)(
|
||||
__in LPCWSTR szPackagePath,
|
||||
__in_opt LPCWSTR szCommandLine
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSICONFIGUREPRODUCTEXW)(
|
||||
__in LPCWSTR szProduct,
|
||||
__in int iInstallLevel,
|
||||
__in INSTALLSTATE eInstallState,
|
||||
__in_opt LPCWSTR szCommandLine
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIREMOVEPATCHESW)(
|
||||
__in_z LPCWSTR wzPatchList,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in INSTALLTYPE eUninstallType,
|
||||
__in_z_opt LPCWSTR szPropertyList
|
||||
);
|
||||
typedef INSTALLUILEVEL (WINAPI *PFN_MSISETINTERNALUI)(
|
||||
__in INSTALLUILEVEL dwUILevel,
|
||||
__inout_opt HWND *phWnd
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSISETEXTERNALUIRECORD)(
|
||||
__in_opt INSTALLUI_HANDLER_RECORD puiHandler,
|
||||
__in DWORD dwMessageFilter,
|
||||
__in_opt LPVOID pvContext,
|
||||
__out_opt PINSTALLUI_HANDLER_RECORD ppuiPrevHandler
|
||||
);
|
||||
typedef INSTALLUI_HANDLERW (WINAPI *PFN_MSISETEXTERNALUIW)(
|
||||
__in_opt INSTALLUI_HANDLERW puiHandler,
|
||||
__in DWORD dwMessageFilter,
|
||||
__in_opt LPVOID pvContext
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSW)(
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSIENUMPRODUCTSEXW)(
|
||||
__in_z_opt LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in DWORD dwContext,
|
||||
__in DWORD dwIndex,
|
||||
__out_opt WCHAR wzInstalledProductCode[39],
|
||||
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext,
|
||||
__out_opt LPWSTR wzSid,
|
||||
__inout_opt LPDWORD pcchSid
|
||||
);
|
||||
|
||||
typedef UINT (WINAPI *PFN_MSIENUMRELATEDPRODUCTSW)(
|
||||
__in LPCWSTR lpUpgradeCode,
|
||||
__reserved DWORD dwReserved,
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR lpProductBuf
|
||||
);
|
||||
typedef UINT (WINAPI *PFN_MSISOURCELISTADDSOURCEEXW)(
|
||||
__in LPCWSTR szProductCodeOrPatchCode,
|
||||
__in_opt LPCWSTR szUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in DWORD dwOptions,
|
||||
__in LPCWSTR szSource,
|
||||
__in_opt DWORD dwIndex
|
||||
);
|
||||
|
||||
|
||||
HRESULT DAPI WiuInitialize(
|
||||
);
|
||||
void DAPI WiuUninitialize(
|
||||
);
|
||||
void DAPI WiuFunctionOverride(
|
||||
__in_opt PFN_MSIENABLELOGW pfnMsiEnableLogW,
|
||||
__in_opt PFN_MSIGETCOMPONENTPATHW pfnMsiGetComponentPathW,
|
||||
__in_opt PFN_MSILOCATECOMPONENTW pfnMsiLocateComponentW,
|
||||
__in_opt PFN_MSIQUERYFEATURESTATEW pfnMsiQueryFeatureStateW,
|
||||
__in_opt PFN_MSIGETPRODUCTINFOW pfnMsiGetProductInfoW,
|
||||
__in_opt PFN_MSIGETPRODUCTINFOEXW pfnMsiGetProductInfoExW,
|
||||
__in_opt PFN_MSIINSTALLPRODUCTW pfnMsiInstallProductW,
|
||||
__in_opt PFN_MSICONFIGUREPRODUCTEXW pfnMsiConfigureProductExW,
|
||||
__in_opt PFN_MSISETINTERNALUI pfnMsiSetInternalUI,
|
||||
__in_opt PFN_MSISETEXTERNALUIW pfnMsiSetExternalUIW,
|
||||
__in_opt PFN_MSIENUMRELATEDPRODUCTSW pfnMsiEnumRelatedProductsW,
|
||||
__in_opt PFN_MSISETEXTERNALUIRECORD pfnMsiSetExternalUIRecord,
|
||||
__in_opt PFN_MSISOURCELISTADDSOURCEEXW pfnMsiSourceListAddSourceExW
|
||||
);
|
||||
HRESULT DAPI WiuGetComponentPath(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzComponentId,
|
||||
__out INSTALLSTATE* pInstallState,
|
||||
__out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuLocateComponent(
|
||||
__in_z LPCWSTR wzComponentId,
|
||||
__out INSTALLSTATE* pInstallState,
|
||||
__out_z LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuQueryFeatureState(
|
||||
__in_z LPCWSTR wzProduct,
|
||||
__in_z LPCWSTR wzFeature,
|
||||
__out INSTALLSTATE* pInstallState
|
||||
);
|
||||
HRESULT DAPI WiuGetProductInfo(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetProductInfoEx(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetProductProperty(
|
||||
__in MSIHANDLE hProduct,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuGetPatchInfoEx(
|
||||
__in_z LPCWSTR wzPatchCode,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in_z LPCWSTR wzProperty,
|
||||
__out LPWSTR* psczValue
|
||||
);
|
||||
HRESULT DAPI WiuDeterminePatchSequence(
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT context,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo,
|
||||
__in DWORD cPatchInfo
|
||||
);
|
||||
HRESULT DAPI WiuDetermineApplicablePatches(
|
||||
__in_z LPCWSTR wzProductPackagePath,
|
||||
__in PMSIPATCHSEQUENCEINFOW pPatchInfo,
|
||||
__in DWORD cPatchInfo
|
||||
);
|
||||
HRESULT DAPI WiuEnumProducts(
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode
|
||||
);
|
||||
HRESULT DAPI WiuEnumProductsEx(
|
||||
__in_z_opt LPCWSTR wzProductCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in DWORD dwContext,
|
||||
__in DWORD dwIndex,
|
||||
__out_opt WCHAR wzInstalledProductCode[39],
|
||||
__out_opt MSIINSTALLCONTEXT *pdwInstalledContext,
|
||||
__out_opt LPWSTR wzSid,
|
||||
__inout_opt LPDWORD pcchSid
|
||||
);
|
||||
HRESULT DAPI WiuEnumRelatedProducts(
|
||||
__in_z LPCWSTR wzUpgradeCode,
|
||||
__in DWORD iProductIndex,
|
||||
__out_ecount(MAX_GUID_CHARS + 1) LPWSTR wzProductCode
|
||||
);
|
||||
HRESULT DAPI WiuEnumRelatedProductCodes(
|
||||
__in_z LPCWSTR wzUpgradeCode,
|
||||
__deref_out_ecount_opt(pcRelatedProducts) LPWSTR** prgsczProductCodes,
|
||||
__out DWORD* pcRelatedProducts,
|
||||
__in BOOL fReturnHighestVersionOnly
|
||||
);
|
||||
HRESULT DAPI WiuEnableLog(
|
||||
__in DWORD dwLogMode,
|
||||
__in_z LPCWSTR wzLogFile,
|
||||
__in DWORD dwLogAttributes
|
||||
);
|
||||
HRESULT DAPI WiuInitializeExternalUI(
|
||||
__in PFN_MSIEXECUTEMESSAGEHANDLER pfnMessageHandler,
|
||||
__in INSTALLUILEVEL internalUILevel,
|
||||
__in HWND hwndParent,
|
||||
__in LPVOID pvContext,
|
||||
__in BOOL fRollback,
|
||||
__in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext
|
||||
);
|
||||
void DAPI WiuUninitializeExternalUI(
|
||||
__in WIU_MSI_EXECUTE_CONTEXT* pExecuteContext
|
||||
);
|
||||
HRESULT DAPI WiuConfigureProductEx(
|
||||
__in_z LPCWSTR wzProduct,
|
||||
__in int iInstallLevel,
|
||||
__in INSTALLSTATE eInstallState,
|
||||
__in_z LPCWSTR wzCommandLine,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuInstallProduct(
|
||||
__in_z LPCWSTR wzPackagPath,
|
||||
__in_z LPCWSTR wzCommandLine,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuRemovePatches(
|
||||
__in_z LPCWSTR wzPatchList,
|
||||
__in_z LPCWSTR wzProductCode,
|
||||
__in_z LPCWSTR wzPropertyList,
|
||||
__out WIU_RESTART* pRestart
|
||||
);
|
||||
HRESULT DAPI WiuSourceListAddSourceEx(
|
||||
__in_z LPCWSTR wzProductCodeOrPatchCode,
|
||||
__in_z_opt LPCWSTR wzUserSid,
|
||||
__in MSIINSTALLCONTEXT dwContext,
|
||||
__in DWORD dwCode,
|
||||
__in_z LPCWSTR wzSource,
|
||||
__in_opt DWORD dwIndex
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,19 +1,19 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI WuaPauseAutomaticUpdates();
|
||||
|
||||
HRESULT DAPI WuaResumeAutomaticUpdates();
|
||||
|
||||
HRESULT DAPI WuaRestartRequired(
|
||||
__out BOOL* pfRestartRequired
|
||||
);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI WuaPauseAutomaticUpdates();
|
||||
|
||||
HRESULT DAPI WuaResumeAutomaticUpdates();
|
||||
|
||||
HRESULT DAPI WuaRestartRequired(
|
||||
__out BOOL* pfRestartRequired
|
||||
);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
+167
-167
@@ -1,167 +1,167 @@
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument = {0x2933BF90, 0x7B36, 0x11d2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument20 = {0xF6D90F11, 0x9C73, 0x11D3, {0xB3, 0x2E, 0x00, 0xC0, 0x4F, 0x99, 0x0B, 0xB4}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument26 = {0xf5078f1b, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument30 = {0xf5078f32, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument40 = {0x88d969c0, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument50 = {0x88d969e5, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument60 = {0x88d96a05, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_XMLSchemaCache = {0x88d969c2, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument = {0x2933BF81, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument2 = {0x2933BF95, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMSchemaCollection = {0x373984C8, 0xB845, 0x449B, {0x91, 0xE7, 0x45, 0xAC, 0x83, 0x03, 0x6A, 0xDE}};
|
||||
|
||||
typedef enum XML_LOAD_ATTRIBUTE
|
||||
{
|
||||
XML_LOAD_PRESERVE_WHITESPACE = 1,
|
||||
} XML_LOAD_ATTRIBUTE;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI XmlInitialize();
|
||||
void DAPI XmlUninitialize();
|
||||
|
||||
HRESULT DAPI XmlCreateElement(
|
||||
__in IXMLDOMDocument *pixdDocument,
|
||||
__in_z LPCWSTR wzElementName,
|
||||
__out IXMLDOMElement **ppixnElement
|
||||
);
|
||||
HRESULT DAPI XmlCreateDocument(
|
||||
__in_opt LPCWSTR pwzElementName,
|
||||
__out IXMLDOMDocument** ppixdDocument,
|
||||
__out_opt IXMLDOMElement** ppixeRootElement = NULL
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocument(
|
||||
__in_z LPCWSTR wzDocument,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentEx(
|
||||
__in_z LPCWSTR wzDocument,
|
||||
__in DWORD dwAttributes,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromFile(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromBuffer(
|
||||
__in_bcount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD cbSource,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromFileEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwAttributes,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlSelectSingleNode(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR wzXPath,
|
||||
__out IXMLDOMNode **ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlSetAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__in_z LPCWSTR pwzAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlCreateTextNode(
|
||||
__in IXMLDOMDocument *pixdDocument,
|
||||
__in_z LPCWSTR wzText,
|
||||
__out IXMLDOMText **ppixnTextNode
|
||||
);
|
||||
HRESULT DAPI XmlGetText(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__deref_out_z BSTR* pbstrText
|
||||
);
|
||||
HRESULT DAPI XmlGetAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__deref_out_z BSTR* pbstrAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeEx(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR wzAttribute,
|
||||
__deref_out_z LPWSTR* psczAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlGetYesNoAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR wzAttribute,
|
||||
__out BOOL* pfYes
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeNumber(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeNumberBase(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__in int nBase,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeLargeNumber(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__out DWORD64* pdw64Value
|
||||
);
|
||||
HRESULT DAPI XmlGetNamedItem(
|
||||
__in IXMLDOMNamedNodeMap *pixnmAttributes,
|
||||
__in_opt LPCWSTR wzName,
|
||||
__out IXMLDOMNode **ppixnNamedItem
|
||||
);
|
||||
HRESULT DAPI XmlSetText(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzText
|
||||
);
|
||||
HRESULT DAPI XmlSetTextNumber(
|
||||
__in IXMLDOMNode *pixnNode,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI XmlCreateChild(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR pwzElementType,
|
||||
__out IXMLDOMNode** ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlRemoveAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute
|
||||
);
|
||||
HRESULT DAPI XmlSelectNodes(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR wzXPath,
|
||||
__out IXMLDOMNodeList **ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlNextAttribute(
|
||||
__in IXMLDOMNamedNodeMap* pixnnm,
|
||||
__out IXMLDOMNode** pixnAttribute,
|
||||
__deref_opt_out_z_opt BSTR* pbstrAttribute
|
||||
);
|
||||
HRESULT DAPI XmlNextElement(
|
||||
__in IXMLDOMNodeList* pixnl,
|
||||
__out IXMLDOMNode** pixnElement,
|
||||
__deref_opt_out_z_opt BSTR* pbstrElement
|
||||
);
|
||||
HRESULT DAPI XmlRemoveChildren(
|
||||
__in IXMLDOMNode* pixnSource,
|
||||
__in_z LPCWSTR pwzXPath
|
||||
);
|
||||
HRESULT DAPI XmlSaveDocument(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__inout LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI XmlSaveDocumentToBuffer(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__deref_out_bcount(*pcbDest) BYTE** ppbDest,
|
||||
__out DWORD* pcbDest
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#pragma once
|
||||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
|
||||
|
||||
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument = {0x2933BF90, 0x7B36, 0x11d2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument20 = {0xF6D90F11, 0x9C73, 0x11D3, {0xB3, 0x2E, 0x00, 0xC0, 0x4F, 0x99, 0x0B, 0xB4}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument26 = {0xf5078f1b, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument30 = {0xf5078f32, 0xc551, 0x11d3, {0x89, 0xb9, 0x00, 0x00, 0xf8, 0x1f, 0xe2, 0x21}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument40 = {0x88d969c0, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument50 = {0x88d969e5, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_DOMDocument60 = {0x88d96a05, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
extern __declspec(selectany) const CLSID XmlUtil_CLSID_XMLSchemaCache = {0x88d969c2, 0xf192, 0x11d4, {0xa6, 0x5f, 0x00, 0x40, 0x96, 0x32, 0x51, 0xe5}};
|
||||
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument = {0x2933BF81, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMDocument2 = {0x2933BF95, 0x7B36, 0x11D2, {0xB2, 0x0E, 0x00, 0xC0, 0x4F, 0x98, 0x3E, 0x60}};
|
||||
extern __declspec(selectany) const IID XmlUtil_IID_IXMLDOMSchemaCollection = {0x373984C8, 0xB845, 0x449B, {0x91, 0xE7, 0x45, 0xAC, 0x83, 0x03, 0x6A, 0xDE}};
|
||||
|
||||
typedef enum XML_LOAD_ATTRIBUTE
|
||||
{
|
||||
XML_LOAD_PRESERVE_WHITESPACE = 1,
|
||||
} XML_LOAD_ATTRIBUTE;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HRESULT DAPI XmlInitialize();
|
||||
void DAPI XmlUninitialize();
|
||||
|
||||
HRESULT DAPI XmlCreateElement(
|
||||
__in IXMLDOMDocument *pixdDocument,
|
||||
__in_z LPCWSTR wzElementName,
|
||||
__out IXMLDOMElement **ppixnElement
|
||||
);
|
||||
HRESULT DAPI XmlCreateDocument(
|
||||
__in_opt LPCWSTR pwzElementName,
|
||||
__out IXMLDOMDocument** ppixdDocument,
|
||||
__out_opt IXMLDOMElement** ppixeRootElement = NULL
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocument(
|
||||
__in_z LPCWSTR wzDocument,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentEx(
|
||||
__in_z LPCWSTR wzDocument,
|
||||
__in DWORD dwAttributes,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromFile(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromBuffer(
|
||||
__in_bcount(cbSource) const BYTE* pbSource,
|
||||
__in DWORD cbSource,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlLoadDocumentFromFileEx(
|
||||
__in_z LPCWSTR wzPath,
|
||||
__in DWORD dwAttributes,
|
||||
__out IXMLDOMDocument** ppixdDocument
|
||||
);
|
||||
HRESULT DAPI XmlSelectSingleNode(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR wzXPath,
|
||||
__out IXMLDOMNode **ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlSetAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__in_z LPCWSTR pwzAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlCreateTextNode(
|
||||
__in IXMLDOMDocument *pixdDocument,
|
||||
__in_z LPCWSTR wzText,
|
||||
__out IXMLDOMText **ppixnTextNode
|
||||
);
|
||||
HRESULT DAPI XmlGetText(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__deref_out_z BSTR* pbstrText
|
||||
);
|
||||
HRESULT DAPI XmlGetAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__deref_out_z BSTR* pbstrAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeEx(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR wzAttribute,
|
||||
__deref_out_z LPWSTR* psczAttributeValue
|
||||
);
|
||||
HRESULT DAPI XmlGetYesNoAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR wzAttribute,
|
||||
__out BOOL* pfYes
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeNumber(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeNumberBase(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__in int nBase,
|
||||
__out DWORD* pdwValue
|
||||
);
|
||||
HRESULT DAPI XmlGetAttributeLargeNumber(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute,
|
||||
__out DWORD64* pdw64Value
|
||||
);
|
||||
HRESULT DAPI XmlGetNamedItem(
|
||||
__in IXMLDOMNamedNodeMap *pixnmAttributes,
|
||||
__in_opt LPCWSTR wzName,
|
||||
__out IXMLDOMNode **ppixnNamedItem
|
||||
);
|
||||
HRESULT DAPI XmlSetText(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzText
|
||||
);
|
||||
HRESULT DAPI XmlSetTextNumber(
|
||||
__in IXMLDOMNode *pixnNode,
|
||||
__in DWORD dwValue
|
||||
);
|
||||
HRESULT DAPI XmlCreateChild(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR pwzElementType,
|
||||
__out IXMLDOMNode** ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlRemoveAttribute(
|
||||
__in IXMLDOMNode* pixnNode,
|
||||
__in_z LPCWSTR pwzAttribute
|
||||
);
|
||||
HRESULT DAPI XmlSelectNodes(
|
||||
__in IXMLDOMNode* pixnParent,
|
||||
__in_z LPCWSTR wzXPath,
|
||||
__out IXMLDOMNodeList **ppixnChild
|
||||
);
|
||||
HRESULT DAPI XmlNextAttribute(
|
||||
__in IXMLDOMNamedNodeMap* pixnnm,
|
||||
__out IXMLDOMNode** pixnAttribute,
|
||||
__deref_opt_out_z_opt BSTR* pbstrAttribute
|
||||
);
|
||||
HRESULT DAPI XmlNextElement(
|
||||
__in IXMLDOMNodeList* pixnl,
|
||||
__out IXMLDOMNode** pixnElement,
|
||||
__deref_opt_out_z_opt BSTR* pbstrElement
|
||||
);
|
||||
HRESULT DAPI XmlRemoveChildren(
|
||||
__in IXMLDOMNode* pixnSource,
|
||||
__in_z LPCWSTR pwzXPath
|
||||
);
|
||||
HRESULT DAPI XmlSaveDocument(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__inout LPCWSTR wzPath
|
||||
);
|
||||
HRESULT DAPI XmlSaveDocumentToBuffer(
|
||||
__in IXMLDOMDocument* pixdDocument,
|
||||
__deref_out_bcount(*pcbDest) BYTE** ppbDest,
|
||||
__out DWORD* pcbDest
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+216
-216
@@ -1,216 +1,216 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<Project
|
||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
|
||||
InitialTargets="_SetDefaultPathValues">
|
||||
|
||||
<Import Project="$(CustomBeforeWixCATargets)" Condition=" '$(CustomBeforeWixCATargets)' != '' and Exists('$(CustomBeforeWixCATargets)')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<WixCATargetsImported>true</WixCATargetsImported>
|
||||
|
||||
<WixTasksPath Condition=" '$(WixTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\..\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
<WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(MSBuildExtensionsPath)\..\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
<!-- This is a fallback in case using the relative paths above did not work. -->
|
||||
<WixTasksPath Condition=" !Exists('$(WixTasksPath)') ">$(MSBuildProgramFiles32)\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
|
||||
<TargetCAFileName Condition=" '$(TargetCAFileName)' == '' ">$(TargetName).CA$(TargetExt)</TargetCAFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="ReadRegistry" AssemblyFile="$(WixTasksPath)"/>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
_SetDefaultPathValues
|
||||
|
||||
Gets the default values of some paths from the registry.
|
||||
|
||||
[OUT]
|
||||
$(WixExtDir) - Default Wix Extension Directory
|
||||
$(WixToolPath) - Default Wix Tool install folder
|
||||
==================================================================================================
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<WixInstallRegKey>SOFTWARE\Microsoft\Windows Installer XML\3.14</WixInstallRegKey>
|
||||
<WixInstallRegKeyWow64>SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.14</WixInstallRegKeyWow64>
|
||||
</PropertyGroup>
|
||||
<Target
|
||||
Name="_SetDefaultPathValues">
|
||||
|
||||
<ReadRegistry
|
||||
Hive="LocalMachine"
|
||||
Key="$(WixInstallRegKey)"
|
||||
Name="InstallRoot"
|
||||
FailIfMissing="false"
|
||||
Condition=" '$(WixToolPath)' == '' ">
|
||||
|
||||
<Output TaskParameter="Value" PropertyName="WixToolPath" />
|
||||
</ReadRegistry>
|
||||
|
||||
<!-- If we didn't find the first registry path, assume we're in a 64bit process. -->
|
||||
<ReadRegistry
|
||||
Hive="LocalMachine"
|
||||
Key="$(WixInstallRegKeyWow64)"
|
||||
Name="InstallRoot"
|
||||
FailIfMissing="false"
|
||||
Condition=" '$(WixToolPath)' == '' ">
|
||||
|
||||
<Output TaskParameter="Value" PropertyName="WixToolPath" />
|
||||
</ReadRegistry>
|
||||
|
||||
<CreateProperty Value="$(WixToolPath)..\sdk\" Condition=" '$(WixSdkPath)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkPath" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkPath)x86\" Condition=" '$(WixSdkX86Path)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkX86Path" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkPath)x64\" Condition=" '$(WixSdkX64Path)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkX64Path" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(WixSdkPath)MakeSfxCA.exe" Condition=" '$(MakeSfxCA)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="MakeSfxCA" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkX86Path)SfxCA.dll" Condition=" '$(SfxCADll)' == '' and '$(Platform)' != 'x64'">
|
||||
<Output TaskParameter="Value" PropertyName="SfxCADll" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkX64Path)SfxCA.dll" Condition=" '$(SfxCADll)' == '' and '$(Platform)' == 'x64'">
|
||||
<Output TaskParameter="Value" PropertyName="SfxCADll" />
|
||||
</CreateProperty>
|
||||
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
PackCustomAction
|
||||
|
||||
Creates an MSI managed custom action package that includes the custom action assembly,
|
||||
local assembly dependencies, and project content files.
|
||||
|
||||
[IN]
|
||||
@(IntermediateAssembly) - Managed custom action assembly.
|
||||
@(Content) - Project items of type Content will be included in the package.
|
||||
$(CustomActionContents) - Optional space-delimited list of additional files to include.
|
||||
|
||||
[OUT]
|
||||
$(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub.
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="PackCustomAction"
|
||||
Inputs="@(IntermediateAssembly);@(Content);$(CustomActionContents)"
|
||||
Outputs="$(IntermediateOutputPath)$(TargetCAFileName)">
|
||||
|
||||
<!-- Find all referenced items marked CopyLocal, but exclude non-binary files. -->
|
||||
<CreateItem
|
||||
Include="@(ReferenceCopyLocalPaths)"
|
||||
Condition=" '%(ReferenceCopyLocalPaths.extension)' == '.dll' or '%(ReferenceCopyLocalPaths.extension)' == '.exe' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceComWrappersToCopyLocal)"
|
||||
Condition=" '%(ReferenceComWrappersToCopyLocal.extension)' == '.dll' or '%(ReferenceComWrappersToCopyLocal.extension)' == '.exe' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<!-- include PDBs for Debug only -->
|
||||
<CreateItem
|
||||
Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')"
|
||||
Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceCopyLocalPaths)"
|
||||
Condition=" '%(ReferenceCopyLocalPaths.extension)' == '.pdb' and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceComWrappersToCopyLocal)"
|
||||
Condition=" '%(ReferenceComWrappersToCopyLocal.extension)' == '.pdb' and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<!--
|
||||
Items to include in the CA package:
|
||||
- Reference assemblies marked CopyLocal
|
||||
- Project items of type Content
|
||||
- Additional items in the CustomActionContents property
|
||||
-->
|
||||
<CreateItem Include="@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionContents" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem Include="@(IntermediateAssembly->'%(FullPath)')">
|
||||
<Output TaskParameter="Include" ItemName="IntermediateCAAssembly" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')">
|
||||
<Output TaskParameter="Include" ItemName="IntermediateCAPackage" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateProperty Value="@(IntermediateCAPackage->'%(RootDir)%(Directory)%(Filename).rsp')">
|
||||
<Output TaskParameter="Value" PropertyName="IntermediateCAResponseFile" />
|
||||
</CreateProperty>
|
||||
|
||||
<!-- Use a response file to pass the potentially very long contents to MakeSfxCA.exe -->
|
||||
<WriteLinesToFile File="$(IntermediateCAResponseFile)" Lines="@(CustomActionContents->'"%(Identity)"')" Overwrite="true" />
|
||||
|
||||
<CreateItem Include="$(IntermediateCAResponseFile)">
|
||||
<Output TaskParameter="Include" ItemName="FileWrites" />
|
||||
</CreateItem>
|
||||
|
||||
<!-- Run the MakeSfxCA.exe CA packaging tool. -->
|
||||
<Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "@$(IntermediateCAResponseFile)"'
|
||||
WorkingDirectory="$(ProjectDir)" />
|
||||
|
||||
<!-- Add modules to be copied to output dir. -->
|
||||
<CreateItem Include="@(AddModules);@(IntermediateCAPackage)">
|
||||
<Output TaskParameter="Include" ItemName="AddModules" />
|
||||
</CreateItem>
|
||||
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
CleanCustomAction
|
||||
|
||||
Cleans the .CA.dll binary created by the PackCustomAction target.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="CleanCustomAction">
|
||||
<Delete Files="$(IntermediateOutputPath)$(TargetCAFileName)"
|
||||
TreatErrorsAsWarnings="true" />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
AfterCompile (redefinition)
|
||||
|
||||
Calls the PackCustomAction target after compiling.
|
||||
Overrides the empty AfterCompile target from Microsoft.Common.targets.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="AfterCompile"
|
||||
DependsOnTargets="PackCustomAction" />
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
BeforeClean (redefinition)
|
||||
|
||||
Calls the CleanCustomAction target before cleaning.
|
||||
Overrides the empty AfterCompile target from Microsoft.Common.targets.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="BeforeClean"
|
||||
DependsOnTargets="CleanCustomAction" />
|
||||
|
||||
<Import Project="$(CustomAfterWixCATargets)" Condition=" '$(CustomAfterWixCATargets)' != '' and Exists('$(CustomAfterWixCATargets)')" />
|
||||
|
||||
</Project>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
|
||||
|
||||
<Project
|
||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
|
||||
InitialTargets="_SetDefaultPathValues">
|
||||
|
||||
<Import Project="$(CustomBeforeWixCATargets)" Condition=" '$(CustomBeforeWixCATargets)' != '' and Exists('$(CustomBeforeWixCATargets)')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<WixCATargetsImported>true</WixCATargetsImported>
|
||||
|
||||
<WixTasksPath Condition=" '$(WixTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\..\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
<WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(MSBuildExtensionsPath)\..\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
<!-- This is a fallback in case using the relative paths above did not work. -->
|
||||
<WixTasksPath Condition=" !Exists('$(WixTasksPath)') ">$(MSBuildProgramFiles32)\WiX Toolset v3.14\bin\WixTasks.dll</WixTasksPath>
|
||||
|
||||
<TargetCAFileName Condition=" '$(TargetCAFileName)' == '' ">$(TargetName).CA$(TargetExt)</TargetCAFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="ReadRegistry" AssemblyFile="$(WixTasksPath)"/>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
_SetDefaultPathValues
|
||||
|
||||
Gets the default values of some paths from the registry.
|
||||
|
||||
[OUT]
|
||||
$(WixExtDir) - Default Wix Extension Directory
|
||||
$(WixToolPath) - Default Wix Tool install folder
|
||||
==================================================================================================
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<WixInstallRegKey>SOFTWARE\Microsoft\Windows Installer XML\3.14</WixInstallRegKey>
|
||||
<WixInstallRegKeyWow64>SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.14</WixInstallRegKeyWow64>
|
||||
</PropertyGroup>
|
||||
<Target
|
||||
Name="_SetDefaultPathValues">
|
||||
|
||||
<ReadRegistry
|
||||
Hive="LocalMachine"
|
||||
Key="$(WixInstallRegKey)"
|
||||
Name="InstallRoot"
|
||||
FailIfMissing="false"
|
||||
Condition=" '$(WixToolPath)' == '' ">
|
||||
|
||||
<Output TaskParameter="Value" PropertyName="WixToolPath" />
|
||||
</ReadRegistry>
|
||||
|
||||
<!-- If we didn't find the first registry path, assume we're in a 64bit process. -->
|
||||
<ReadRegistry
|
||||
Hive="LocalMachine"
|
||||
Key="$(WixInstallRegKeyWow64)"
|
||||
Name="InstallRoot"
|
||||
FailIfMissing="false"
|
||||
Condition=" '$(WixToolPath)' == '' ">
|
||||
|
||||
<Output TaskParameter="Value" PropertyName="WixToolPath" />
|
||||
</ReadRegistry>
|
||||
|
||||
<CreateProperty Value="$(WixToolPath)..\sdk\" Condition=" '$(WixSdkPath)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkPath" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkPath)x86\" Condition=" '$(WixSdkX86Path)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkX86Path" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkPath)x64\" Condition=" '$(WixSdkX64Path)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="WixSdkX64Path" />
|
||||
</CreateProperty>
|
||||
|
||||
<CreateProperty Value="$(WixSdkPath)MakeSfxCA.exe" Condition=" '$(MakeSfxCA)' == '' ">
|
||||
<Output TaskParameter="Value" PropertyName="MakeSfxCA" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkX86Path)SfxCA.dll" Condition=" '$(SfxCADll)' == '' and '$(Platform)' != 'x64'">
|
||||
<Output TaskParameter="Value" PropertyName="SfxCADll" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="$(WixSdkX64Path)SfxCA.dll" Condition=" '$(SfxCADll)' == '' and '$(Platform)' == 'x64'">
|
||||
<Output TaskParameter="Value" PropertyName="SfxCADll" />
|
||||
</CreateProperty>
|
||||
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
PackCustomAction
|
||||
|
||||
Creates an MSI managed custom action package that includes the custom action assembly,
|
||||
local assembly dependencies, and project content files.
|
||||
|
||||
[IN]
|
||||
@(IntermediateAssembly) - Managed custom action assembly.
|
||||
@(Content) - Project items of type Content will be included in the package.
|
||||
$(CustomActionContents) - Optional space-delimited list of additional files to include.
|
||||
|
||||
[OUT]
|
||||
$(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub.
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="PackCustomAction"
|
||||
Inputs="@(IntermediateAssembly);@(Content);$(CustomActionContents)"
|
||||
Outputs="$(IntermediateOutputPath)$(TargetCAFileName)">
|
||||
|
||||
<!-- Find all referenced items marked CopyLocal, but exclude non-binary files. -->
|
||||
<CreateItem
|
||||
Include="@(ReferenceCopyLocalPaths)"
|
||||
Condition=" '%(ReferenceCopyLocalPaths.extension)' == '.dll' or '%(ReferenceCopyLocalPaths.extension)' == '.exe' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceComWrappersToCopyLocal)"
|
||||
Condition=" '%(ReferenceComWrappersToCopyLocal.extension)' == '.dll' or '%(ReferenceComWrappersToCopyLocal.extension)' == '.exe' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<!-- include PDBs for Debug only -->
|
||||
<CreateItem
|
||||
Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')"
|
||||
Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceCopyLocalPaths)"
|
||||
Condition=" '%(ReferenceCopyLocalPaths.extension)' == '.pdb' and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem
|
||||
Include="@(ReferenceComWrappersToCopyLocal)"
|
||||
Condition=" '%(ReferenceComWrappersToCopyLocal.extension)' == '.pdb' and '$(Configuration)' == 'Debug' ">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionReferenceContents"/>
|
||||
</CreateItem>
|
||||
|
||||
<!--
|
||||
Items to include in the CA package:
|
||||
- Reference assemblies marked CopyLocal
|
||||
- Project items of type Content
|
||||
- Additional items in the CustomActionContents property
|
||||
-->
|
||||
<CreateItem Include="@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)">
|
||||
<Output TaskParameter="Include" ItemName="CustomActionContents" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem Include="@(IntermediateAssembly->'%(FullPath)')">
|
||||
<Output TaskParameter="Include" ItemName="IntermediateCAAssembly" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateItem Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')">
|
||||
<Output TaskParameter="Include" ItemName="IntermediateCAPackage" />
|
||||
</CreateItem>
|
||||
|
||||
<CreateProperty Value="@(IntermediateCAPackage->'%(RootDir)%(Directory)%(Filename).rsp')">
|
||||
<Output TaskParameter="Value" PropertyName="IntermediateCAResponseFile" />
|
||||
</CreateProperty>
|
||||
|
||||
<!-- Use a response file to pass the potentially very long contents to MakeSfxCA.exe -->
|
||||
<WriteLinesToFile File="$(IntermediateCAResponseFile)" Lines="@(CustomActionContents->'"%(Identity)"')" Overwrite="true" />
|
||||
|
||||
<CreateItem Include="$(IntermediateCAResponseFile)">
|
||||
<Output TaskParameter="Include" ItemName="FileWrites" />
|
||||
</CreateItem>
|
||||
|
||||
<!-- Run the MakeSfxCA.exe CA packaging tool. -->
|
||||
<Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "@$(IntermediateCAResponseFile)"'
|
||||
WorkingDirectory="$(ProjectDir)" />
|
||||
|
||||
<!-- Add modules to be copied to output dir. -->
|
||||
<CreateItem Include="@(AddModules);@(IntermediateCAPackage)">
|
||||
<Output TaskParameter="Include" ItemName="AddModules" />
|
||||
</CreateItem>
|
||||
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
CleanCustomAction
|
||||
|
||||
Cleans the .CA.dll binary created by the PackCustomAction target.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="CleanCustomAction">
|
||||
<Delete Files="$(IntermediateOutputPath)$(TargetCAFileName)"
|
||||
TreatErrorsAsWarnings="true" />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
AfterCompile (redefinition)
|
||||
|
||||
Calls the PackCustomAction target after compiling.
|
||||
Overrides the empty AfterCompile target from Microsoft.Common.targets.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="AfterCompile"
|
||||
DependsOnTargets="PackCustomAction" />
|
||||
|
||||
<!--
|
||||
==================================================================================================
|
||||
BeforeClean (redefinition)
|
||||
|
||||
Calls the CleanCustomAction target before cleaning.
|
||||
Overrides the empty AfterCompile target from Microsoft.Common.targets.
|
||||
|
||||
==================================================================================================
|
||||
-->
|
||||
<Target Name="BeforeClean"
|
||||
DependsOnTargets="CleanCustomAction" />
|
||||
|
||||
<Import Project="$(CustomAfterWixCATargets)" Condition=" '$(CustomAfterWixCATargets)' != '' and Exists('$(CustomAfterWixCATargets)')" />
|
||||
|
||||
</Project>
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Import Project="$(CustomBeforeWixNativeCATargets)" Condition=" '$(CustomBeforeWixNativeCATargets)' != '' and Exists('$(CustomBeforeWixNativeCATargets)')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<WixNativeCATargetsImported>true</WixNativeCATargetsImported>
|
||||
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v100' ">VS2010</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v110' ">VS2012</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v120' ">VS2013</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v140' ">VS2015</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v141' ">VS2017</WixPlatformToolset>
|
||||
|
||||
<WixPlatformToolset Condition=" '$(WixPlatformToolset)'=='' ">VS2015</WixPlatformToolset>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(CustomAfterWixNativeCATargets)" Condition=" '$(CustomAfterWixNativeCATargets)' != '' and Exists('$(CustomAfterWixNativeCATargets)')" />
|
||||
|
||||
</Project>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Import Project="$(CustomBeforeWixNativeCATargets)" Condition=" '$(CustomBeforeWixNativeCATargets)' != '' and Exists('$(CustomBeforeWixNativeCATargets)')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<WixNativeCATargetsImported>true</WixNativeCATargetsImported>
|
||||
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v100' ">VS2010</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v110' ">VS2012</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v120' ">VS2013</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v140' ">VS2015</WixPlatformToolset>
|
||||
<WixPlatformToolset Condition=" '$(PlatformToolset)'=='v141' ">VS2017</WixPlatformToolset>
|
||||
|
||||
<WixPlatformToolset Condition=" '$(WixPlatformToolset)'=='' ">VS2015</WixPlatformToolset>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(CustomAfterWixNativeCATargets)" Condition=" '$(CustomAfterWixNativeCATargets)' != '' and Exists('$(CustomAfterWixNativeCATargets)')" />
|
||||
|
||||
</Project>
|
||||
Reference in new issue
Block a user