From 24f280dc4a700f00f5fbb8f13815b941620adb8e Mon Sep 17 00:00:00 2001 From: zlockard Date: Wed, 31 Jan 2024 13:45:54 -0800 Subject: Fixes for sample build errors and updates to the execution script to use new build flags (#1078) * Fixes for sample build errors * Fix additional sample * Add additional sample * Updated comments in Build-Sample.ps1 * Adjusting exclusions.csv to be accurate for GE. Still issues for NI that we need to understand better * Merge from develop branch * Merge from develop branch * Merge from develop branch * Delete WPD samples * Separate infverif additional options for old vs new WDK * Delete WPD samples entry in our CODEOWNERS file * Fix spelling error * For 22621 WDK Remove the /samples flag --------- Co-authored-by: Zac Lockard Co-authored-by: Jakob Lichtenberg (170957) --- wpd/WpdServiceSampleDriver/FakeContent.h | 151 ------------------------------- 1 file changed, 151 deletions(-) delete mode 100644 wpd/WpdServiceSampleDriver/FakeContent.h (limited to 'wpd/WpdServiceSampleDriver/FakeContent.h') diff --git a/wpd/WpdServiceSampleDriver/FakeContent.h b/wpd/WpdServiceSampleDriver/FakeContent.h deleted file mode 100644 index 3f1f7103..00000000 --- a/wpd/WpdServiceSampleDriver/FakeContent.h +++ /dev/null @@ -1,151 +0,0 @@ -#pragma once - -class FakeContent -{ -public: - FakeContent() : - CanDelete(false), - RequiredScope(FULL_DEVICE_ACCESS), - MarkedForDeletion(false) - { - Format = WPD_OBJECT_FORMAT_UNSPECIFIED; - ContentType = WPD_CONTENT_TYPE_UNSPECIFIED; - } - - FakeContent(const FakeContent& src) : - CanDelete(false) - { - *this = src; - } - - virtual ~FakeContent() - { - for(size_t index = 0; index < m_Children.GetCount(); index++) - { - if (m_Children[index]) - { - delete(m_Children[index]); - m_Children[index] = NULL; - } - } - m_Children.RemoveAll(); - } - - virtual FakeContent& operator= (const FakeContent& src) - { - ObjectID = src.ObjectID; - PersistentUniqueID = src.PersistentUniqueID; - ParentID = src.ParentID; - Name = src.Name; - ContentType = src.ContentType; - Format = src.Format; - CanDelete = src.CanDelete; - RequiredScope = src.RequiredScope; - ParentPersistentUniqueID = src.ParentPersistentUniqueID; - ContainerFunctionalObjectID = src.ContainerFunctionalObjectID; - - return *this; - } - - virtual HRESULT InitializeContent( - _Inout_ DWORD *pdwLastObjectID); - - virtual HRESULT InitializeEnumerationContext( - ACCESS_SCOPE Scope, - _In_ WpdObjectEnumeratorContext* pEnumeratorContext); - - virtual HRESULT GetSupportedProperties( - _In_ IPortableDeviceKeyCollection *pKeys); - - virtual HRESULT GetPropertyAttributes( - _In_ REFPROPERTYKEY Key, - _In_ IPortableDeviceValues* pAttributes); - - virtual HRESULT GetValue( - _In_ REFPROPERTYKEY Key, - _In_ IPortableDeviceValues* pStore); - - virtual HRESULT WriteValue( - _In_ REFPROPERTYKEY Key, - _In_ REFPROPVARIANT Value); - - virtual HRESULT CreatePropertiesOnlyObject( - _In_ IPortableDeviceValues* pObjectProperties, - _Out_ DWORD* pdwLastObjectID, - _Outptr_result_nullonfailure_ FakeContent** ppNewObject); - - virtual HRESULT GetSupportedResources( - _In_ IPortableDeviceKeyCollection* pResources); - - virtual HRESULT GetResourceAttributes( - _In_ REFPROPERTYKEY Resource, - _In_ IPortableDeviceValues* pAttributes); - - virtual HRESULT OpenResource( - _In_ REFPROPERTYKEY Resource, - const DWORD dwMode, - _In_ WpdObjectResourceContext* pResourceContext); - - virtual HRESULT ReadResourceData( - _In_ WpdObjectResourceContext* pResourceContext, - _Out_writes_to_(dwNumBytesToRead, *pdwNumBytesRead) BYTE* pBuffer, - const DWORD dwNumBytesToRead, - _Out_ DWORD* pdwNumBytesRead); - - virtual HRESULT WriteValues( - _In_ IPortableDeviceValues* pValues, - _In_ IPortableDeviceValues* pResults, - _Out_ bool* pbObjectChanged); - -public: - bool CanAccess( - ACCESS_SCOPE Scope); - - HRESULT GetAllValues( - _In_ IPortableDeviceValues* pStore); - - _Success_(return) - bool FindNext( - ACCESS_SCOPE Scope, - const DWORD dwIndex, - _Outptr_result_nullonfailure_ FakeContent** ppChild); - - HRESULT GetContent( - ACCESS_SCOPE Scope, - _In_ LPCWSTR wszObjectID, - _Outptr_result_nullonfailure_ FakeContent** ppContent); - - HRESULT GetObjectIDsByFormat( - ACCESS_SCOPE Scope, - _In_ REFGUID Format, - const DWORD dwDepth, - _In_ IPortableDevicePropVariantCollection* pObjectIDs); - - HRESULT GetObjectIDByPersistentID( - ACCESS_SCOPE Scope, - _In_ LPCWSTR wszPersistentID, - _In_ IPortableDevicePropVariantCollection* pObjectIDs); - - HRESULT MarkForDelete( - const DWORD dwOptions); - - HRESULT RemoveObjectsMarkedForDeletion( - ACCESS_SCOPE Scope); - -public: - CAtlStringW ObjectID; - CAtlStringW PersistentUniqueID; - CAtlStringW ParentID; - CAtlStringW Name; - CAtlStringW ParentPersistentUniqueID; - CAtlStringW ContainerFunctionalObjectID; - GUID ContentType; - GUID Format; - bool CanDelete; - bool MarkedForDeletion; - - // A bitmask of all the required scopes in order to access this object - ACCESS_SCOPE RequiredScope; - - CAtlArray m_Children; -}; -- cgit v1.3.1