Skip to content

Commit

Permalink
Fixed #947.
Browse files Browse the repository at this point in the history
This reverts previous fix da9490f and maps LPBSTR and PBSTR to BSTR* in scraper settings.
  • Loading branch information
mikebattista committed Feb 21, 2023
1 parent 8eed20d commit 2f1a3d9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 41 deletions.
5 changes: 0 additions & 5 deletions generation/WinSDK/autoTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"ValueType": "char*",
"CloseApi": "SysFreeString"
},
{
"Namespace": "Windows.Win32.Foundation",
"Name": "PBSTR",
"ValueType": "BSTR*"
},
{
"Namespace": "Windows.Win32.Foundation",
"Name": "HANDLE",
Expand Down
4 changes: 3 additions & 1 deletion generation/WinSDK/scraper.settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -12238,4 +12238,6 @@ VARIANT_BOOL=VARIANT_BOOL
_IFaxAccountNotify=IFaxAccountNotify
_IFaxServerNotify2=IFaxServerNotify2
PLSA_HANDLE=LSA_HANDLE*
PWINUSB_INTERFACE_HANDLE=WINUSB_INTERFACE_HANDLE*
PWINUSB_INTERFACE_HANDLE=WINUSB_INTERFACE_HANDLE*
PBSTR=BSTR*
LPBSTR=BSTR*
51 changes: 25 additions & 26 deletions scripts/ChangesSinceLastRelease.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,32 +162,6 @@ Windows.Win32.UI.Input.KeyboardAndMouse.VIRTUAL_KEY.VK_DBE_SBCSCHAR added
# Fixed #1466.
Windows.Win32.System.Wmi.IWbemClassObject.Get : plFlavor : [In,Out] => [Optional]
Windows.Win32.System.Wmi.IWbemClassObject.Get : pType : [In,Out] => [Optional]
# Fixed #947.
Windows.Win32.Foundation.PBSTR added
Windows.Win32.System.Mmc.Document.get_Location : Location...UInt16** => PBSTR
Windows.Win32.System.Mmc.Document.get_Name : Name...UInt16** => PBSTR
Windows.Win32.System.Mmc.Extension.get_Name : Name...UInt16** => PBSTR
Windows.Win32.System.Mmc.Extension.get_SnapinCLSID : SnapinCLSID...UInt16** => PBSTR
Windows.Win32.System.Mmc.Extension.get_Vendor : Vendor...UInt16** => PBSTR
Windows.Win32.System.Mmc.Extension.get_Version : Version...UInt16** => PBSTR
Windows.Win32.System.Mmc.INodeProperties.GetProperty : pbstrProperty...UInt16** => PBSTR
Windows.Win32.System.Mmc.MenuItem.get_DisplayName : DisplayName...UInt16** => PBSTR
Windows.Win32.System.Mmc.MenuItem.get_LanguageIndependentName : LanguageIndependentName...UInt16** => PBSTR
Windows.Win32.System.Mmc.MenuItem.get_LanguageIndependentPath : LanguageIndependentPath...UInt16** => PBSTR
Windows.Win32.System.Mmc.MenuItem.get_Path : Path...UInt16** => PBSTR
Windows.Win32.System.Mmc.Node.get_Bookmark : Bookmark...UInt16** => PBSTR
Windows.Win32.System.Mmc.Node.get_Name : Name...UInt16** => PBSTR
Windows.Win32.System.Mmc.Node.get_Nodetype : Nodetype...UInt16** => PBSTR
Windows.Win32.System.Mmc.Node.get_Property : PropertyValue...UInt16** => PBSTR
Windows.Win32.System.Mmc.Property.get_Name : Name...UInt16** => PBSTR
Windows.Win32.System.Mmc.SnapIn.get_Name : Name...UInt16** => PBSTR
Windows.Win32.System.Mmc.SnapIn.get_SnapinCLSID : SnapinCLSID...UInt16** => PBSTR
Windows.Win32.System.Mmc.SnapIn.get_Vendor : Vendor...UInt16** => PBSTR
Windows.Win32.System.Mmc.SnapIn.get_Version : Version...UInt16** => PBSTR
Windows.Win32.System.Mmc.View.get_CellContents : CellContents...UInt16** => PBSTR
Windows.Win32.System.Mmc.View.get_Memento : Memento...UInt16** => PBSTR
Windows.Win32.System.Ole.Apis.QueryPathOfRegTypeLib : lpbstrPathName...UInt16** => PBSTR
Windows.Win32.System.Ole.Apis.VarBstrCat : pbstrResult...UInt16** => PBSTR
# Add usage hints for _SVGIO
Windows.Win32.UI.Shell.IFolderView.ItemCount : uFlags...UInt32 => _SVGIO
Windows.Win32.UI.Shell.IFolderView.Items : uFlags...UInt32 => _SVGIO
Expand Down Expand Up @@ -348,3 +322,28 @@ Windows.Win32.Devices.Properties.DEVPROPTYPE.DEVPROP_TYPE_UINT32 added
Windows.Win32.Devices.Properties.DEVPROPTYPE.DEVPROP_TYPE_UINT64 added
Windows.Win32.Devices.Sensors.Apis.PropVariantGetInformation : RemappedType...UInt32* => DEVPROPTYPE*
Windows.Win32.Media.MediaFoundation.IMFVirtualCamera.AddProperty : Type...UInt32 => DEVPROPTYPE
# Fixed #947.
Windows.Win32.System.Mmc.Document.get_Location : Location...UInt16** => BSTR*
Windows.Win32.System.Mmc.Document.get_Name : Name...UInt16** => BSTR*
Windows.Win32.System.Mmc.Extension.get_Name : Name...UInt16** => BSTR*
Windows.Win32.System.Mmc.Extension.get_SnapinCLSID : SnapinCLSID...UInt16** => BSTR*
Windows.Win32.System.Mmc.Extension.get_Vendor : Vendor...UInt16** => BSTR*
Windows.Win32.System.Mmc.Extension.get_Version : Version...UInt16** => BSTR*
Windows.Win32.System.Mmc.INodeProperties.GetProperty : pbstrProperty...UInt16** => BSTR*
Windows.Win32.System.Mmc.MenuItem.get_DisplayName : DisplayName...UInt16** => BSTR*
Windows.Win32.System.Mmc.MenuItem.get_LanguageIndependentName : LanguageIndependentName...UInt16** => BSTR*
Windows.Win32.System.Mmc.MenuItem.get_LanguageIndependentPath : LanguageIndependentPath...UInt16** => BSTR*
Windows.Win32.System.Mmc.MenuItem.get_Path : Path...UInt16** => BSTR*
Windows.Win32.System.Mmc.Node.get_Bookmark : Bookmark...UInt16** => BSTR*
Windows.Win32.System.Mmc.Node.get_Name : Name...UInt16** => BSTR*
Windows.Win32.System.Mmc.Node.get_Nodetype : Nodetype...UInt16** => BSTR*
Windows.Win32.System.Mmc.Node.get_Property : PropertyValue...UInt16** => BSTR*
Windows.Win32.System.Mmc.Property.get_Name : Name...UInt16** => BSTR*
Windows.Win32.System.Mmc.SnapIn.get_Name : Name...UInt16** => BSTR*
Windows.Win32.System.Mmc.SnapIn.get_SnapinCLSID : SnapinCLSID...UInt16** => BSTR*
Windows.Win32.System.Mmc.SnapIn.get_Vendor : Vendor...UInt16** => BSTR*
Windows.Win32.System.Mmc.SnapIn.get_Version : Version...UInt16** => BSTR*
Windows.Win32.System.Mmc.View.get_CellContents : CellContents...UInt16** => BSTR*
Windows.Win32.System.Mmc.View.get_Memento : Memento...UInt16** => BSTR*
Windows.Win32.System.Ole.Apis.QueryPathOfRegTypeLib : lpbstrPathName...UInt16** => BSTR*
Windows.Win32.System.Ole.Apis.VarBstrCat : pbstrResult...UInt16** => BSTR*
Original file line number Diff line number Diff line change
Expand Up @@ -971,10 +971,6 @@ private ITypeSymbol GetTypeFromShortName(string name)
fixedName = Win32WideStringType;
break;

case "LPBSTR":
fixedName = "Windows.Win32.Foundation.PBSTR";
break;

default:
break;
}
Expand Down
5 changes: 0 additions & 5 deletions sources/ClangSharpSourceToWinmd/MetadataSyntaxTreeCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,6 @@ private string GetInfoForNativeType(string nativeTypeName, out bool isConst, out
isNullTerminated = true;
break;

case "LPBSTR":
metadataType = "Windows.Win32.Foundation.PBSTR";
isNullTerminated = true;
break;

case "LPCWSTR":
case "PCWSTR":
case "LPCWCH":
Expand Down

0 comments on commit 2f1a3d9

Please sign in to comment.