You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows.Win32.PInvoke.Msi.g.cs contains [SupportedOSPlatform("Windows 8")] which the .NET SDK does not like as of v6.
Generated file (click to expand)
// ------------------------------------------------------------------------------// <auto-generated>// This code was generated by a tool.//// Changes to this file may cause incorrect behavior and will be lost if// the code is regenerated.// </auto-generated>// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436namespaceWindows.Win32{usingglobal::System;usingglobal::System.Diagnostics;usingglobal::System.Runtime.CompilerServices;usingglobal::System.Runtime.InteropServices;usingglobal::System.Runtime.Versioning;usingwinmdroot=global::Windows.Win32;/// <content>/// Contains extern methods from "Msi.dll"./// </content>internalstaticpartialclassPInvoke{/// <inheritdoc cref="MsiGetComponentPath(winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PWSTR, uint*)"/>[SupportedOSPlatform("Windows 8")]internalstaticunsafewinmdroot.System.ApplicationInstallationAndServicing.INSTALLSTATEMsiGetComponentPath(stringszProduct,stringszComponent,winmdroot.Foundation.PWSTRlpPathBuf,uint*pcchBuf){
fixed (char*szComponentLocal=szComponent){
fixed (char*szProductLocal=szProduct){winmdroot.System.ApplicationInstallationAndServicing.INSTALLSTATE__result=PInvoke.MsiGetComponentPath(szProductLocal,szComponentLocal,lpPathBuf,pcchBuf);return__result;}}}/// <summary>The MsiGetComponentPath function returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.</summary>/// <param name="szProduct">Specifies the product code for the client product.</param>/// <param name="szComponent">Specifies the component ID of the component to be located.</param>/// <param name="lpPathBuf">/// <para>Pointer to a variable that receives the path to the component. This parameter can be null. If the component is a registry key, the registry roots are represented numerically. If this is a registry subkey path, there is a backslash at the end of the Key Path. If this is a registry value key path, there is no backslash at the end. For example, a registry path on a 32-bit operating system of <b>HKEY_CURRENT_USER</b>\<b>SOFTWARE</b>\<b>Microsoft</b> is returned as "01:\SOFTWARE\Microsoft\". The registry roots returned on 32-bit operating systems are defined as shown in the following table.</para>/// <para><div class="alert"><b>Note</b> On 64-bit operating systems, a value of 20 is added to the numerical registry roots in this table to distinguish them from registry key paths on 32-bit operating systems. For example, a registry key path of <b>HKEY_CURRENT_USER</b>\<b>SOFTWARE</b>\<b>Microsoft</b> is returned as "21:\SOFTWARE\Microsoft\", if the component path is a registry key on a 64-bit operating system.</div> <div> </div></para>/// <para></para>/// <para>This doc was truncated.</para>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetcomponentpathw#parameters">Read more on docs.microsoft.com</see>.</para>/// </param>/// <param name="pcchBuf">/// <para>Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the <i>lpPathBuf</i> parameter. On input, this is the full size of the buffer, including a space for a terminating null character. If the buffer passed in is too small, the count returned does not include the terminating null character.</para>/// <para>If <i>lpPathBuf</i> is null, <i>pcchBuf</i> can be null.</para>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetcomponentpathw#parameters">Read more on docs.microsoft.com</see>.</para>/// </param>/// <returns>/// <para>The <b>MsiGetComponentPath</b> function returns the following values.</para>/// <para></para>/// <para>This doc was truncated.</para>/// </returns>/// <remarks>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetcomponentpathw">Learn more about this API from docs.microsoft.com</see>.</para>/// </remarks>[DllImport("Msi",ExactSpelling=true,EntryPoint="MsiGetComponentPathW")][DefaultDllImportSearchPaths(DllImportSearchPath.System32)][SupportedOSPlatform("Windows 8")]internalstaticexternunsafewinmdroot.System.ApplicationInstallationAndServicing.INSTALLSTATEMsiGetComponentPath(winmdroot.Foundation.PCWSTRszProduct,winmdroot.Foundation.PCWSTRszComponent,winmdroot.Foundation.PWSTRlpPathBuf,[Optional]uint*pcchBuf);/// <inheritdoc cref="MsiGetShortcutTarget(winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PWSTR, winmdroot.Foundation.PWSTR, winmdroot.Foundation.PWSTR)"/>[SupportedOSPlatform("Windows 8")]internalstaticunsafeuintMsiGetShortcutTarget(stringszShortcutPath,winmdroot.Foundation.PWSTRszProductCode,winmdroot.Foundation.PWSTRszFeatureId,winmdroot.Foundation.PWSTRszComponentCode){
fixed (char*szShortcutPathLocal=szShortcutPath){uint__result=PInvoke.MsiGetShortcutTarget(szShortcutPathLocal,szProductCode,szFeatureId,szComponentCode);return__result;}}/// <summary>The MsiGetShortcutTarget function examines a shortcut and returns its product, feature name, and component if available.</summary>/// <param name="szShortcutPath">A null-terminated string specifying the full path to a shortcut.</param>/// <param name="szProductCode">/// <para>A GUID for the product code of the shortcut. This string buffer must be 39 characters long. The first 38 characters are for the <a href="https://docs.microsoft.com/windows/desktop/Msi/guid">GUID</a>, and the last character is for the terminating null character. This parameter can be null.</para>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetshortcuttargetw#parameters">Read more on docs.microsoft.com</see>.</para>/// </param>/// <param name="szFeatureId">The feature name of the shortcut. The string buffer must be MAX_FEATURE_CHARS+1 characters long. This parameter can be null.</param>/// <param name="szComponentCode">/// <para>A GUID of the component code. This string buffer must be 39 characters long. The first 38 characters are for the <a href="https://docs.microsoft.com/windows/desktop/Msi/guid">GUID</a>, and the last character is for the terminating null character. This parameter can be null.</para>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetshortcuttargetw#parameters">Read more on docs.microsoft.com</see>.</para>/// </param>/// <returns>This function returns UINT.</returns>/// <remarks>/// <para><see href="https://docs.microsoft.com/windows/win32/api//msi/nf-msi-msigetshortcuttargetw">Learn more about this API from docs.microsoft.com</see>.</para>/// </remarks>[DllImport("Msi",ExactSpelling=true,EntryPoint="MsiGetShortcutTargetW")][DefaultDllImportSearchPaths(DllImportSearchPath.System32)][SupportedOSPlatform("Windows 8")]internalstaticexternuintMsiGetShortcutTarget(winmdroot.Foundation.PCWSTRszShortcutPath,winmdroot.Foundation.PWSTRszProductCode,winmdroot.Foundation.PWSTRszFeatureId,winmdroot.Foundation.PWSTRszComponentCode);}}
Repro steps
NativeMethods.txt content:
MsiGetComponentPath
MsiGetShortcutTarget
Context
CsWin32 version: 0.1.619-beta
Target Framework: net6.0-windows
The text was updated successfully, but these errors were encountered:
Windows.Win32.PInvoke.Msi.g.cs contains
[SupportedOSPlatform("Windows 8")]
which the .NET SDK does not like as of v6.Generated file (click to expand)
Repro steps
NativeMethods.txt
content:Context
The text was updated successfully, but these errors were encountered: