1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // |
5 | // WinRtHelpers.h |
6 | // |
7 | |
8 | // |
9 | // Helpers to fetch the first WinRT Type def from metadata import |
10 | // |
11 | // ====================================================================================== |
12 | |
13 | #pragma once |
14 | |
15 | #ifdef FEATURE_COMINTEROP |
16 | |
17 | // -------------------------------------------------------------------------------------- |
18 | // Return the first public WinRT type's namespace and typename - the names have the lifetime of the MetaData scope. |
19 | HRESULT GetFirstWinRTTypeDef( |
20 | IMDInternalImport * pMDInternalImport, |
21 | LPCSTR * pszNameSpace, // Tight to the lifetime of pssFakeNameSpaceAllocationBuffer when the WinMD file is empty |
22 | LPCSTR * pszTypeName, |
23 | LPCWSTR wszAssemblyPath, // Used for creating fake binding type name in case the WinMD file is empty |
24 | SString * pssFakeNameSpaceAllocationBuffer); // Used as allocation buffer for fake namespace |
25 | |
26 | HRESULT GetBindableWinRTName( |
27 | IMDInternalImport * pMDInternalImport, |
28 | IAssemblyName * pIAssemblyName); |
29 | |
30 | #endif //FEATURE_COMINTEROP |
31 | |