├── .gitignore ├── LICENSE ├── README.md ├── lclor.acf ├── lclor.idl ├── localhstring.cpp └── rundown.idl /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | /lclor_c.c 352 | /rundown.h 353 | /lclor.h 354 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Alex Ionescu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hazmat5 2 | Local OXID Resolver (LCLOR) : Research and Tooling 3 | 4 | Welcome to a repository on my research into DCOM's Local OXID Resolution mechanisms, and RPCSS internals. 5 | 6 | ## Local OXID Resolver Internals 7 | 8 | A lot of research has been done on DCOM internals by numerous folks, as well as into OXID resolution, but mostly from a network/remote perspective, with 9 | the assumption that local resolution works in a similar way. While the remote interfaces *can* be used locally, true local DCOM operates using a completely 10 | undocumented interface called ILocalObjectResolver, which is how clients and servers communicate in order to register their OIDs and OXIDs, as well as lookup 11 | OXIDs and set various parameters. 12 | 13 | Digging deep into these internals can lead to some interesting discoveries, and potential tools for system exploration, especially as these interfaces are now 14 | used as part of Container DCOM, and can have some exotic properties for folks doing research into that space. 15 | 16 | ### `lclor.idl` 17 | 18 | The interface behind the Local OR has never been published, other than the usual GitHub dumps of now-public-domain Windows Server 2003 source code. As one can 19 | imagine, the interfaces have received a number of modifications in the last 18 years. Indeed, even between Windows 10 19H1 and 20H1, significant changes were made 20 | in order to support Container DCOM, and to extend the capabilities offered to WinRT COM servers, in light of projects such as Windows Desktop Bridge (Centennial), 21 | through concepts such as "primary OXID" and "deploying" vs "execution" package names. 22 | 23 | The first deliverable of this repository is an up-to-date version of an IDL file necessary to communicate with the Local OR on 20H1 and later systems. Note that 24 | flag values, parameter ordering, and procedure numbers have changed since past versions, and this file will _not_ work with earlier versions of Windows 10. 25 | 26 | Research was performed using the great RpcView and OleViewDotNet tooling, Hex-Rays, and private symbols for combase.dll, starting with the basic `lclor.idl` file 27 | present on GitHub. 28 | 29 | ### `rundown.idl` 30 | 31 | The full, up-to-date, specification for the IRemUnknown-derived family of interfaces has also never been officially published, other than the limited information 32 | published in the official protocol specification, which covers the over-the-wire messages that are normally used in network DCOM. Additional methods, used locally, 33 | have either been seen in GitHub dumps or some blog posts and presentations from James Forshaw -- but even those have changed in 20H1 and later. 34 | 35 | These interfaces can be useful for a variety of local system exploration and analysis, and are easily obtainable by using the private symbols for combase.dll as 36 | well as the same tooling as mentionned above, and the `odeth.idl` file seen on GitHub. The second deliverable of this repository is an up-to-date version we call 37 | `rundown.idl`. 38 | 39 | ### `lclor.exe` 40 | 41 | The upcoming command-line tool will leverage the IDL file in order to implement some functionality for looking up and allocating OXIDs with the Local OR, displaying 42 | relevant and useful information for research and analysis purposes. 43 | 44 | See below for additional information, such as input arguments and flags, as well as some sample output. 45 | 46 | #### Usage 47 | 48 | ``` 49 | lclor v1.0.0 -- Local OXID Resolver Tool 50 | Copyright (C) 2021 Alex Ionescu (@aionescu) 51 | www.alex-ionescu.com 52 | 53 | 54 | Usage: lclor.exe [-i | -l [-B] | -b ] 55 | -b Bind to the given IRemUnknown IPID for the given OXID 56 | -i Display information on the Local OR 57 | -l Lookup information on the given OXID 58 | -B Attempt binding to the IPID after the lookup 59 | ```` 60 | 61 | #### Examples 62 | 63 | ``` 64 | lclor v1.0.0 -- Local OXID Resolver Tool 65 | Copyright (C) 2021 Alex Ionescu (@aionescu) 66 | www.alex-ionescu.com 67 | 68 | Looking up OXID 0x36EF4713E3988C5A... 69 | 70 | COM Server Version 5.7 71 | Supports Container Version 3 72 | Capability Flags: 0x0 73 | Linked Primary OXID: 0x36EF4713E3988C5A 74 | Apartment Type: NTA 75 | Authentication Hint: RPC_C_AUTHN_LEVEL_PKT 76 | Hosted by process ID: 2212 77 | Process GUID: {5A6D128D-D460-485D-A88B-56F4F024C5EB} 78 | IRemUnknown IPID: {0000AC01-08A4-FFFF-744E-5D33BA2A1435} 79 | Primary IRemUnknown IPID: {0000AC01-08A4-FFFF-744E-5D33BA2A1435} 80 | Binding String: ncalrpc:[OLE059D40EF2D5CBCA37D9896754A6C] 81 | ``` 82 | 83 | ``` 84 | lclor v1.0.0 -- Local OXID Resolver Tool 85 | Copyright (C) 2021 Alex Ionescu (@aionescu) 86 | www.alex-ionescu.com 87 | 88 | Looking up OXID 0xD6FF45175D39276E... 89 | 90 | COM Server Version 5.7 91 | Supports Container Version 3 92 | Capability Flags: 0x0 93 | Linked Primary OXID: 0xD6FF45175D39276E 94 | Apartment Type: NTA 95 | Flags: StrongNamed AppContainer Suspendable 96 | Authentication Hint: RPC_C_AUTHN_LEVEL_PKT_INTEGRITY 97 | Hosted by process ID: 13160 (ShellExperienceHost.exe) 98 | Process GUID: {39368377-6BBF-436B-B5C8-E7ADC99B84F9} 99 | Package name: Microsoft.Windows.ShellExperienceHost_10.0.21382.1_neutral_neutral_cw5n1h2txyewy 100 | User SID: S-1-5-21-1928273713-1136577611-1766458866-1004 101 | AppContainer SID: S-1-15-2-155514346-2573954481-755741238-1654018636-1233331829-3075935687-2861478708 102 | IRemUnknown IPID: {00007C01-3368-FFFF-2CCD-509DE410C457} 103 | Primary IRemUnknown IPID: {00007C01-3368-FFFF-2CCD-509DE410C457} 104 | Binding String: ncalrpc:[\\Sessions\\1\\AppContainerNamedObjects\\S-1-15-2-155514346-2573954481-755741238-1654018636-1233331829-3075935687-2861478708\\RPC Control\\OLE584D7099BF0C3175917BE7B61119] 105 | ``` 106 | 107 | ``` 108 | lclor v1.0.0 -- Local OXID Resolver Tool 109 | Copyright (C) 2021 Alex Ionescu (@aionescu) 110 | www.alex-ionescu.com 111 | 112 | Binding to OXID 0x36EF4713E3988C5A with IPID {0000AC01-08A4-FFFF-744E-5D33BA2A1435}... 113 | 114 | Binding successful (0x000001A9A07D9A58), press any key to exit... 115 | ``` 116 | 117 | ## RPCSS Database Internals 118 | 119 | The second area of research into DCOM internals is the set of mechanisms inside of RPCSS which manage communication with COM servers and clients, keeping track of 120 | their behavior, caching looked up OXIDs, generating OBJREFs, and allowing for the registration and activation (through the "activation kernel" in `DcomLaunch`) of 121 | COM classes. 122 | 123 | ### rpcssinfo.js 124 | 125 | The upocoming WinDbg Extension will provide, either when doing kernel debugging (with user-mode symbols) or when doing user-mode debugging of the `svchost.exe` 126 | instance hosting `RPCSS` (for example, a memory dump), additional members to the `@$cursession` object, including NatVis containers for the process list, classic 127 | COM server list, WinRT COM server list, and OXID list. 128 | 129 | ### `rpcssdmp.exe` 130 | 131 | The upcoming command-line tool will implement similar capabilities as the WinDbg extension named above, but through a command-line interface that does not require 132 | a debugger. 133 | 134 | ## References 135 | 136 | If you would like to know more about my research or work, I invite you to check out my blog at [http://www.alex-ionescu.com](http://www.alex-ionescu.com) as well as my 137 | training & consulting company, Winsider Seminars & Solutions Inc., at [http://www.windows-internals.com](http://www.windows-internals.com). 138 | 139 | James Forshaw is probably the foremost authority on DCOM these days, and his [Troopers 17 talk](https://www.troopers.de/downloads/troopers17/TR17_Demystifying_%20COM.pdf) 140 | is a great initial resource. 141 | 142 | You should also definitely read the incredibly informative [Airbus Cybersecurity blog post](https://airbus-cyber-security.com/the-oxid-resolver-part-2-accessing-a-remote-object-inside-dcom/). 143 | 144 | The [Inside COM+ book site](https://thrysoee.dk/InsideCOM+/ch19f.htm) also covers the remote OXID resolver. 145 | 146 | Of course, the [official protocol specification](https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-DCOM/%5bMS-DCOM%5d-171201.pdf) is also a key 147 | learning tool. 148 | 149 | ## Credits 150 | 151 | A special thank you to James Forshaw for advice on how to handle the LOCAL_HSTRING unmarshalling correctly. 152 | 153 | ## License 154 | 155 | ``` 156 | Copyright 2021 Alex Ionescu. All rights reserved. 157 | 158 | Redistribution and use in source and binary forms, with or without modification, are permitted provided 159 | that the following conditions are met: 160 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and 161 | the following disclaimer. 162 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions 163 | and the following disclaimer in the documentation and/or other materials provided with the 164 | distribution. 165 | 166 | THIS SOFTWARE IS PROVIDED BY ALEX IONESCU ``AS IS'' AND ANY EXPRESS OR IMPLIED 167 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 168 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALEX IONESCU 169 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 170 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 171 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 172 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 173 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 174 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 175 | 176 | The views and conclusions contained in the software and documentation are those of the authors and 177 | should not be interpreted as representing official policies, either expressed or implied, of Alex Ionescu. 178 | ``` 179 | -------------------------------------------------------------------------------- /lclor.acf: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Alex Ionescu. All rights reserved. 4 | 5 | Module Name: 6 | 7 | lclor.acf 8 | 9 | Abstract: 10 | 11 | This module implements the interface definition annotations for the Local 12 | OXID Resolver for Windows 10, 20H1 systems and later 13 | 14 | Author: 15 | 16 | Alex Ionescu (@aionescu) 18-May-2021 - Initial version 17 | 18 | Environment: 19 | 20 | User mode only. 21 | 22 | --*/ 23 | 24 | interface ILocalObjectExporter 25 | { 26 | typedef [context_handle_noserialize] PHPROCESS; 27 | [comm_status, fault_status] Connect(); 28 | [comm_status, fault_status] SetAppID(); 29 | [comm_status, fault_status] GetDefaultSecurityPermissions(); 30 | [comm_status, fault_status] AllocateReservedIds(); 31 | [comm_status, fault_status] BulkUpdateOIDs(); 32 | [comm_status, fault_status] ClientResolveOXID(); 33 | [comm_status, fault_status] ServerAllocateOXIDAndOIDs(); 34 | [comm_status, fault_status] ServerAllocateOIDs(); 35 | [comm_status, fault_status] ServerFreeOXIDAndOIDs(); 36 | [comm_status, fault_status] SetServerOIDFlags(); 37 | [comm_status, fault_status] Disconnect(); 38 | [comm_status, fault_status] GetUpdatedResolverBindings(); 39 | } 40 | -------------------------------------------------------------------------------- /lclor.idl: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Alex Ionescu. All rights reserved. 4 | 5 | Module Name: 6 | 7 | lclor.idl 8 | 9 | Abstract: 10 | 11 | This module implements the interface definition for the Local OXID Resolver 12 | for Windows 10, 20H1 systems and later 13 | 14 | Author: 15 | 16 | Alex Ionescu (@aionescu) 18-May-2021 - Initial version 17 | 18 | Environment: 19 | 20 | User mode only. 21 | 22 | --*/ 23 | 24 | [ 25 | uuid(e60c73e6-88f9-11cf-9af1-0020af6e72f4), 26 | version(2.0) 27 | ] 28 | 29 | interface ILocalObjectExporter 30 | { 31 | import "wtypes.idl"; 32 | import "hstring.idl"; 33 | 34 | typedef unsigned hyper ID; 35 | typedef ID MID; 36 | typedef ID OXID; 37 | typedef ID OID; 38 | typedef GUID IPID; 39 | typedef REFGUID REFIPID; 40 | 41 | cpp_quote("#if 0") 42 | cpp_quote("// Declare the LOCAL_HSTRING handle as wire_marshal for midl only") 43 | typedef [wire_marshal(wireBSTR), unique] HSTRING__* LOCAL_HSTRING; 44 | cpp_quote("#endif") 45 | cpp_quote("") 46 | cpp_quote("// Declare the LOCAL_HSTRING handle for C/C++") 47 | cpp_quote("typedef __RPC_unique_pointer HSTRING__* LOCAL_HSTRING;") 48 | cpp_quote("") 49 | 50 | typedef [context_handle] void *PHPROCESS; 51 | 52 | const DWORD PROXY_DECODE_MAX_STRUCT_SIZE = 300; 53 | typedef struct 54 | { 55 | DWORD offsetofChannelPtrFromProxyPtr; 56 | DWORD64 addressofOIDListHead; 57 | [range(0, PROXY_DECODE_MAX_STRUCT_SIZE)] DWORD sizeofIPIDEntry; 58 | DWORD offsetofNextIPIDPointerInIPIDEntry; 59 | DWORD offsetofFlagsInIPIDEntry; 60 | DWORD offsetofIPIDInIPIDEntry; 61 | DWORD offsetofServerAddressInIPIDEntry; 62 | DWORD offsetofOIDFLinkInIPIDEntry; 63 | DWORD serverIPIDEntryFlag; 64 | DWORD invalidIPIDEntryFlags; 65 | [range(0, PROXY_DECODE_MAX_STRUCT_SIZE)] DWORD sizeofOxidEntry; 66 | DWORD offsetofPidInOxidEntry; 67 | DWORD offsetofTidInOxidEntry; 68 | [range(0, PROXY_DECODE_MAX_STRUCT_SIZE)] DWORD sizeofCClientChannel; 69 | DWORD offsetofCanonicalIRpcChannelBufferInCClientChannel; 70 | DWORD offsetofIPIDEntryInCClientChannel; 71 | DWORD offsetofOxidEntryInCClientChannel; 72 | DWORD offsetofSignatureInCClientChannel; 73 | GUID guidSignatureofCClientChannel; 74 | } PROXY_DECODE_INFO; 75 | 76 | typedef struct 77 | { 78 | [string, unique] WCHAR* pName; 79 | WORD wId; 80 | } SECPKG; 81 | 82 | typedef struct tagDUALSTRINGARRAY 83 | { 84 | WORD wNumEntries; 85 | WORD wSecurityOffset; 86 | [size_is(wNumEntries)] WORD aStringArray[]; 87 | } DUALSTRINGARRAY; 88 | 89 | typedef enum 90 | { 91 | OR_OXID_CLIENT_DEPENDENCY_NONE = 0, 92 | OR_OXID_CLIENT_DEPENDENCY_UNIDIRECTIONAL = 1, 93 | OR_OXID_CLIENT_DEPENDENCY_BIDIRECTIONAL = 2, 94 | } ClientDependencyBehavior; 95 | 96 | typedef struct 97 | { 98 | WORD MajorVersion; 99 | WORD MinorVersion; 100 | } COMVERSION; 101 | 102 | typedef struct 103 | { 104 | DWORD id; 105 | DWORD version; 106 | DWORD size; 107 | [size_is((size + 7) & ~7)] BYTE data[]; 108 | } CONTAINER_EXTENT; 109 | 110 | typedef struct 111 | { 112 | DWORD size; 113 | DWORD reserved; 114 | [size_is((size + 1) & ~1), ref] CONTAINER_EXTENT** extent; 115 | } CONTAINER_EXTENT_ARRAY; 116 | 117 | typedef struct 118 | { 119 | DWORD version; 120 | DWORD64 capabilityFlags; 121 | CONTAINER_EXTENT_ARRAY* extensions; 122 | } CONTAINERVERSION; 123 | 124 | typedef struct 125 | { 126 | DWORD dwTid; 127 | DWORD dwPid; 128 | DWORD dwAuthnHint; 129 | COMVERSION version; 130 | CONTAINERVERSION containerVersion; 131 | IPID ipidRemUnknown; 132 | DWORD dwFlags; 133 | DUALSTRINGARRAY* psa; 134 | GUID guidProcessIdentifier; 135 | DWORD64 processHostId; 136 | ClientDependencyBehavior clientDependencyBehavior; 137 | LOCAL_HSTRING packageFullName; 138 | LOCAL_HSTRING userSid; 139 | LOCAL_HSTRING appcontainerSid; 140 | OXID primaryOxid; 141 | GUID primaryIpidRemUnknown; 142 | } INTERNAL_OXID_INFO; 143 | 144 | typedef struct 145 | { 146 | MID mid; 147 | OXID oxid; 148 | DWORD refs; 149 | } OXID_REF; 150 | 151 | typedef struct 152 | { 153 | MID mid; 154 | OID oid; 155 | } OID_MID_PAIR; 156 | 157 | typedef struct 158 | { 159 | MID mid; 160 | OXID oxid; 161 | OID oid; 162 | } OXID_OID_PAIR; 163 | 164 | typedef struct 165 | { 166 | MID mid; 167 | OID oid; 168 | DWORD unmarshalCount; 169 | } POTENTIAL_PROXY_OID; 170 | 171 | const DWORD CONNECT_DISABLEDCOM = 0x1; 172 | const DWORD CONNECT_ENABLE_CONTAINER_DCOM = 0x2; 173 | const DWORD CONNECT_MUTUALAUTH = 0x4; 174 | const DWORD CONNECT_SECUREREF = 0x8; 175 | const DWORD CONNECT_CATCH_SERVER_EXCEPTIONS = 0x10; 176 | const DWORD CONNECT_BREAK_ON_SILENCED_SERVER_EXCEPTIONS = 0x20; 177 | const DWORD CONNECT_DISABLE_CALL_FAILURE_LOGGING = 0x40; 178 | const DWORD CONNECT_DISABLE_INVALID_SD_LOGGING = 0x80; 179 | const DWORD CONNECT_ENABLE_OLD_MODAL_LOOP = 0x100; 180 | const DWORD CONNECT_ACCESS_RESTRICTIONS_VIA_POLICY = 0x200; 181 | 182 | const DWORD MAX_IDS = 0x20000; 183 | const DWORD MAX_OIDS = 0x100000; 184 | 185 | error_status_t 186 | Connect ( 187 | [in] handle_t hServer, 188 | [in, string, unique] WCHAR* pwszWinstaDesktop, 189 | [in, string, unique] WCHAR* pwszExePath, 190 | [in, unique] PROXY_DECODE_INFO* pProxyDecodeInfo, 191 | [in] DWORD dwProcessFlags, 192 | [in] WORD dwProcessArchitecture, 193 | [out] PHPROCESS* pProcess, 194 | [out] DWORD* pdwTimeoutInSeconds, 195 | [out] DUALSTRINGARRAY** ppdsaOrBindings, 196 | [out] MID* pLocalMid, 197 | [in, range(0,MAX_IDS)] DWORD cIdsToReserve, 198 | [out, size_is(cIdsToReserve)] ID aIdsReserved[], 199 | [out] DWORD* pcIdsReserved, 200 | [out] DWORD* pfConnectFlags, 201 | [out] DWORD* pIncomingContainerAuthnSvc, 202 | [out] DWORD* pOutgoingContainerAuthnSvc, 203 | [out, string] WCHAR** pLegacySecurity, 204 | [out] DWORD* pAuthnLevel, 205 | [out] DWORD* pImpLevel, 206 | [out] DWORD* pcServerSvc, 207 | [out, size_is(,*pcServerSvc)] WORD** aServerSvc, 208 | [out] DWORD* pcClientSvc, 209 | [out, size_is(,*pcClientSvc)] SECPKG** aClientSvc, 210 | [out] LONG* pcChannelHook, 211 | [out, size_is(,*pcChannelHook)] GUID** aChannelHook, 212 | [out] DWORD* pProcessID, 213 | [out] DWORD* pScmProcessID, 214 | [out] DWORD64* pSignature, 215 | [out] GUID* pguidRPCSSProcessIdentifier, 216 | [out] DWORD dwSDSizes[5], 217 | [out] DWORD* pdwSDBlob, 218 | [out, size_is(,*pdwSDBlob)] BYTE** pSDBlob 219 | ); 220 | 221 | error_status_t 222 | SetAppID ( 223 | [in] handle_t hServer, 224 | [in] PHPROCESS phProcess, 225 | [in] GUID guidAppID 226 | ); 227 | 228 | error_status_t 229 | GetDefaultSecurityPermissions ( 230 | [in] handle_t hServer, 231 | [out] DWORD dwSDSizes[4], 232 | [out] DWORD* pdwSDBlob, 233 | [out, size_is(, *pdwSDBlob)] BYTE** pSDBlob 234 | ); 235 | 236 | error_status_t 237 | AllocateReservedIds ( 238 | [in] handle_t hServer, 239 | [in] PHPROCESS phProcess, 240 | [in, range(0, MAX_IDS)] unsigned long cIdsToAlloc, 241 | [out, size_is(cIdsToAlloc)] ID aIdsAllocated[], 242 | [out] DWORD* pcIdsAllocated 243 | ); 244 | 245 | error_status_t 246 | BulkUpdateOIDs ( 247 | [in] handle_t hServer, 248 | [in] PHPROCESS phProcess, 249 | [in, range(0, MAX_OIDS)] DWORD cOidsToBeAdded, 250 | [in, size_is(cOidsToBeAdded)] OXID_OID_PAIR aOidsToBeAdded[], 251 | [out, size_is(cOidsToBeAdded)] DWORD aStatusOfAdds[], 252 | [in, range(0, MAX_OIDS)] DWORD cOidsToBeRemoved, 253 | [in, size_is(cOidsToBeRemoved)] OID_MID_PAIR aOidsToBeRemoved[], 254 | [in, range(0, MAX_OIDS)] DWORD cServerOidsToFree, 255 | [in, size_is(cServerOidsToFree)] OID aServerOids[], 256 | [in, range(0, MAX_OIDS)] DWORD cServerOidsToUnPin, 257 | [in, size_is(cServerOidsToUnPin)] OID aServerOidsToUnPin[], 258 | [in, range(0, MAX_OIDS)] DWORD cOxidsToFree, 259 | [in, size_is(cOxidsToFree)] OXID_REF aOxidsToFree[], 260 | [in, range(0, MAX_OIDS)] DWORD cUnmarshaledPotentialProxyOids, 261 | [in, size_is(cUnmarshaledPotentialProxyOids)] POTENTIAL_PROXY_OID aUnmarshaledPotentialProxyOids[] 262 | ); 263 | 264 | error_status_t 265 | ClientResolveOXID ( 266 | [in] handle_t hServer, 267 | [in] PHPROCESS phProcess, 268 | [in, ref] OXID *poxidServer, 269 | [in, unique] DUALSTRINGARRAY* pssaServerObjectResolverBindings, 270 | [out, ref] INTERNAL_OXID_INFO* poxidInfo, 271 | [out] MID* pLocalMidOfRemote, 272 | [out] DWORD* pulMarshaledTargetInfoLength, 273 | [out, size_is(,*pulMarshaledTargetInfoLength)] BYTE** pucMarshaledTargetInfo, 274 | [out] WORD* pAuthnSvc 275 | ); 276 | 277 | error_status_t 278 | ServerAllocateOXIDAndOIDs ( 279 | [in] handle_t hServer, 280 | [in] PHPROCESS phProcess, 281 | [out, ref] OXID* poxidServer, 282 | [in] DWORD fApartment, 283 | [in, range(0, MAX_OIDS)]unsigned long cOids, 284 | [out, size_is(cOids), length_is(*pcOidsAllocated)] OID aOid[], 285 | [out] DWORD* pcOidsAllocated, 286 | [in, ref] INTERNAL_OXID_INFO* poxidInfo, 287 | [in, unique] DUALSTRINGARRAY* pdsaStringBindings, 288 | [in, unique] DUALSTRINGARRAY* pdsaSecurityBindings, 289 | [out] DWORD64* pdwOrBindingsID, 290 | [out] DUALSTRINGARRAY** ppdsaOrBindings 291 | ); 292 | 293 | error_status_t 294 | ServerAllocateOIDs ( 295 | [in] handle_t hServer, 296 | [in] PHPROCESS phProcess, 297 | [in, ref] OXID* poxidServer, 298 | [in, range(0, MAX_OIDS)] DWORD cOidsReturn, 299 | [in, size_is(cOidsReturn)] OID aOidsReturn[], 300 | [in, range(0, MAX_OIDS)] DWORD cOidsAlloc, 301 | [out, size_is(cOidsAlloc)] OID aOidsAlloc[], 302 | [out] DWORD* pcOidsAllocated 303 | ); 304 | 305 | error_status_t 306 | ServerFreeOXIDAndOIDs ( 307 | [in] handle_t hServer, 308 | [in] PHPROCESS phProcess, 309 | [in] OXID oxidServer, 310 | [in, range(0, MAX_OIDS)]unsigned long cOids, 311 | [in, size_is(cOids)] OID aOids[] 312 | ); 313 | 314 | error_status_t 315 | SetServerOIDFlags ( 316 | [in] handle_t hServer, 317 | [in] PHPROCESS phProcess, 318 | [in] OID oid, 319 | [in] DWORD dwFlags 320 | ); 321 | 322 | error_status_t 323 | Disconnect ( 324 | [in] handle_t hClient, 325 | [in, out] PHPROCESS* pphProcess, 326 | [in] BOOL fQueueFastRundownWorkItem 327 | ); 328 | 329 | error_status_t 330 | GetUpdatedResolverBindings ( 331 | [in] handle_t hRpc, 332 | [in] PHPROCESS phProcess, 333 | [out] DUALSTRINGARRAY** ppdsaOrBindings, 334 | [out] DWORD64* pdwBindingsID 335 | ); 336 | } 337 | -------------------------------------------------------------------------------- /localhstring.cpp: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Alex Ionescu. All rights reserved. 4 | 5 | Module Name: 6 | 7 | localhstring.cpp 8 | 9 | Abstract: 10 | 11 | This module implements the required custom marshallers for LOCAL_HSTRING 12 | 13 | Author: 14 | 15 | Alex Ionescu (@aionescu) 18-May-2021 - Initial version 16 | 17 | Environment: 18 | 19 | User mode only. 20 | 21 | --*/ 22 | 23 | #include 24 | #include "lclor.h" 25 | 26 | _Use_decl_annotations_ 27 | void __RPC_FAR* __RPC_USER midl_user_allocate ( 28 | size_t cBytes 29 | ) 30 | { 31 | return ((void __RPC_FAR*)HeapAlloc(GetProcessHeap(), 0, cBytes)); 32 | } 33 | 34 | _Use_decl_annotations_ 35 | void __RPC_USER midl_user_free ( 36 | void __RPC_FAR* p 37 | ) 38 | { 39 | HeapFree(GetProcessHeap(), 0, p); 40 | } 41 | 42 | unsigned long __RPC_USER LOCAL_HSTRING_UserSize ( 43 | unsigned long __RPC_FAR* pFlags, 44 | unsigned long StartingSize, 45 | LOCAL_HSTRING __RPC_FAR* pMyObj 46 | ) 47 | { 48 | return HSTRING_UserSize(pFlags, StartingSize, pMyObj); 49 | } 50 | 51 | unsigned char __RPC_FAR* __RPC_USER LOCAL_HSTRING_UserMarshal ( 52 | unsigned long __RPC_FAR* pFlags, 53 | unsigned char __RPC_FAR* pBuffer, 54 | LOCAL_HSTRING __RPC_FAR* pMyObj 55 | ) 56 | { 57 | *pFlags = MSHCTX_LOCAL; 58 | return HSTRING_UserMarshal(pFlags, pBuffer, pMyObj); 59 | } 60 | 61 | unsigned char __RPC_FAR* __RPC_USER LOCAL_HSTRING_UserUnmarshal ( 62 | unsigned long __RPC_FAR* pFlags, 63 | unsigned char __RPC_FAR* pBuffer, 64 | LOCAL_HSTRING __RPC_FAR* pMyObj 65 | ) 66 | { 67 | return HSTRING_UserUnmarshal(pFlags, pBuffer, pMyObj); 68 | } 69 | 70 | void __RPC_USER LOCAL_HSTRING_UserFree ( 71 | unsigned long __RPC_FAR* pFlags, 72 | LOCAL_HSTRING __RPC_FAR* pMyObj) 73 | { 74 | HSTRING_UserFree(pFlags, pMyObj); 75 | } 76 | -------------------------------------------------------------------------------- /rundown.idl: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Alex Ionescu. All rights reserved. 4 | 5 | Module Name: 6 | 7 | rundown.idl 8 | 9 | Abstract: 10 | 11 | This module implements the interface definition for the IRemUnknown family 12 | of interfaces, that is to say: 13 | * IRemUnknown 14 | * IRemUnknown2 15 | * IRemUnknownN 16 | * IRundown 17 | 18 | Author: 19 | 20 | Alex Ionescu (@aionescu) 19-May-2021 - Initial version 21 | 22 | Environment: 23 | 24 | User mode only. 25 | 26 | --*/ 27 | 28 | import "unknwn.idl"; 29 | import "lclor.idl"; 30 | 31 | interface ObjectRpcBaseTypes 32 | { 33 | const DWORD OBJREF_SIGNATURE = 0x574f454d; 34 | 35 | const DWORD SORF_NULL = 0x0; 36 | 37 | const DWORD OBJREF_STANDARD = 0x1; 38 | const DWORD OBJREF_HANDLER = 0x2; 39 | const DWORD OBJREF_CUSTOM = 0x4; 40 | const DWORD OBJREF_EXTENDED = 0x8; 41 | 42 | typedef struct tagSTDOBJREF 43 | { 44 | DWORD flags; 45 | DWORD cPublicRefs; 46 | OXID oxid; 47 | OID oid; 48 | IPID ipid; 49 | } STDOBJREF; 50 | 51 | typedef struct tagDATAELEMENT 52 | { 53 | GUID dataID; 54 | DWORD cbSize; 55 | DWORD cbRounded; 56 | [size_is((cbSize + 7) & ~7)] BYTE Data[]; 57 | } DATAELEMENT; 58 | 59 | typedef struct tagOBJREFDATA 60 | { 61 | DWORD nElms; 62 | [size_is(nElms + 1 - (nElms & 1), ), unique] DATAELEMENT** ppElmArray; 63 | } OBJREFDATA; 64 | 65 | typedef struct tagOBJREF 66 | { 67 | DWORD signature; 68 | DWORD flags; 69 | GUID iid; 70 | [switch_is(flags), switch_type(DWORD)] 71 | union 72 | { 73 | [case(OBJREF_STANDARD)] 74 | struct 75 | { 76 | STDOBJREF std; 77 | DUALSTRINGARRAY saResAddr; 78 | } u_standard; 79 | [case(OBJREF_HANDLER)] 80 | struct 81 | { 82 | STDOBJREF std; 83 | CLSID clsid; 84 | DUALSTRINGARRAY saResAddr; 85 | } u_handler; 86 | [case(OBJREF_CUSTOM)] 87 | struct 88 | { 89 | CLSID clsid; 90 | DWORD cbExtension; 91 | DWORD size; 92 | [size_is(size), ref] BYTE* pData; 93 | } u_custom; 94 | [case(OBJREF_EXTENDED)] 95 | struct 96 | { 97 | STDOBJREF std; 98 | [unique] OBJREFDATA* pORData; 99 | DUALSTRINGARRAY saResAddr; 100 | } u_extended; 101 | } u_objref; 102 | } OBJREF; 103 | 104 | typedef struct tagMInterfacePointer 105 | { 106 | DWORD ulCntData; 107 | [size_is(ulCntData)] BYTE abData[]; 108 | } MInterfacePointer; 109 | 110 | typedef [unique] MInterfacePointer* PMInterfacePointer; 111 | typedef [disable_consistency_check] MInterfacePointer* PMInterfacePointerInternal; 112 | } 113 | 114 | [ 115 | object, 116 | uuid(00000131-0000-0000-C000-000000000046), 117 | async_uuid(000e0131-0000-0000-C000-000000000046) 118 | ] 119 | interface IRemUnknown : IUnknown 120 | { 121 | const DWORD MAX_REQUESTED_INTERFACES = 0x8000; 122 | 123 | typedef struct tagREMQIRESULT 124 | { 125 | HRESULT hResult; 126 | STDOBJREF std; 127 | } REMQIRESULT; 128 | 129 | typedef struct tagREMINTERFACEREF 130 | { 131 | IPID ipid; 132 | DWORD cPublicRefs; 133 | DWORD cPrivateRefs; 134 | } REMINTERFACEREF; 135 | typedef [disable_consistency_check] REMQIRESULT* PREMQIRESULT; 136 | 137 | HRESULT 138 | RemQueryInterface ( 139 | [in] REFIPID ripid, 140 | [in] DWORD cRefs, 141 | [in, range(1, MAX_REQUESTED_INTERFACES)] WORD cIids, 142 | [in, size_is(cIids)] IID* iids, 143 | [out, size_is(, cIids)] PREMQIRESULT* ppQIResults 144 | ); 145 | 146 | HRESULT 147 | RemAddRef ( 148 | [in] WORD cInterfaceRefs, 149 | [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[], 150 | [out, size_is(cInterfaceRefs)] HRESULT* pResults 151 | ); 152 | 153 | HRESULT 154 | RemRelease ( 155 | [in] WORD cInterfaceRefs, 156 | [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[] 157 | ); 158 | } 159 | 160 | [ 161 | object, 162 | uuid(00000143-0000-0000-C000-000000000046), 163 | async_uuid(000e0143-0000-0000-C000-000000000046) 164 | ] 165 | interface IRemUnknown2 : IRemUnknown 166 | { 167 | HRESULT 168 | RemQueryInterface2 ( 169 | [in] REFIPID ripid, 170 | [in, range(1, MAX_REQUESTED_INTERFACES)] WORD cIids, 171 | [in, size_is(cIids)] IID* iids, 172 | [out, size_is(cIids)] HRESULT* phr, 173 | [out, size_is(cIids)] PMInterfacePointerInternal* ppMIF 174 | ); 175 | } 176 | 177 | [ 178 | object, 179 | uuid(0000013C-0000-0000-C000-000000000046), 180 | async_uuid(000B013C-0000-0000-C000-000000000046) 181 | ] 182 | interface IRemUnknownN : IRemUnknown2 183 | { 184 | const DWORD IRUF_CONVERTTOWEAK = 0x01; 185 | const DWORD IRUF_CONVERTTOSTRONG = 0x02; 186 | const DWORD IRUF_DISCONNECTIFLASTSTRONG = 0x04; 187 | 188 | typedef struct tagXAptCallback 189 | { 190 | DWORD64 pfnCallback; 191 | DWORD64 pParam; 192 | DWORD64 pServerCtx; 193 | DWORD64 pUnk; 194 | GUID iid; 195 | INT iMethod; 196 | GUID guidProcessSecret; 197 | } XAptCallback; 198 | 199 | HRESULT 200 | AcknowledgeMarshalingSets ( 201 | [in] WORD cMarshalingSets, 202 | [in, size_is(cMarshalingSets)] DWORD64* pMarshalingSets 203 | ); 204 | 205 | HRESULT 206 | RemChangeRef ( 207 | [in] DWORD flags, 208 | [in] WORD cInterfaceRefs, 209 | [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[] 210 | ); 211 | 212 | HRESULT 213 | DoCallback ( 214 | [in] XAptCallback* pCallbackData 215 | ); 216 | 217 | HRESULT 218 | DoNonreentrantCallback ( 219 | [in] XAptCallback* pCallbackData 220 | ); 221 | 222 | HRESULT 223 | GetInterfaceNameFromIPID ( 224 | [in] REFIPID ripid, 225 | [out] HSTRING* interfaceName 226 | ); 227 | } 228 | 229 | [ 230 | object, 231 | uuid(00000134-0000-0000-C000-000000000046), 232 | async_uuid(000e0134-0000-0000-C000-000000000046) 233 | ] 234 | interface IRundown : IRemUnknownN 235 | { 236 | const DWORD MAX_OID_RUNDOWNS_PER_CALL = 100; 237 | 238 | HRESULT 239 | RundownOid ( 240 | [in, range(1, MAX_OID_RUNDOWNS_PER_CALL)] DWORD cOid, 241 | [in, size_is(cOid)] OID aOid[], 242 | [out, size_is(cOid)] BYTE aRundownStatus[] 243 | ); 244 | } 245 | --------------------------------------------------------------------------------