@@ -600,90 +600,6 @@ namespace
600600 },
601601 },
602602 };
603-
604- #pragma region TAEF hookup for the test case array above
605- struct ArrayIndexTaefAdapterRow : public Microsoft ::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom | Microsoft::WRL::InhibitFtmBase>, IDataRow>
606- {
607- HRESULT RuntimeClassInitialize (const size_t index)
608- {
609- _index = index;
610- return S_OK;
611- }
612-
613- STDMETHODIMP GetTestData (BSTR /* pszName*/ , SAFEARRAY** ppData) override
614- {
615- const auto indexString{ wil::str_printf<std::wstring>(L" %zu" , _index) };
616- auto safeArray{ SafeArrayCreateVector (VT_BSTR, 0 , 1 ) };
617- LONG index{ 0 };
618- auto indexBstr{ wil::make_bstr (indexString.c_str ()) };
619- (void )SafeArrayPutElement (safeArray, &index, indexBstr.release ());
620- *ppData = safeArray;
621- return S_OK;
622- }
623-
624- STDMETHODIMP GetMetadataNames (SAFEARRAY** ppMetadataNames) override
625- {
626- *ppMetadataNames = nullptr ;
627- return S_FALSE;
628- }
629-
630- STDMETHODIMP GetMetadata (BSTR /* pszName*/ , SAFEARRAY** ppData) override
631- {
632- *ppData = nullptr ;
633- return S_FALSE;
634- }
635-
636- STDMETHODIMP GetName (BSTR* ppszRowName) override
637- {
638- *ppszRowName = nullptr ;
639- return S_FALSE;
640- }
641-
642- private:
643- size_t _index;
644- };
645-
646- struct ArrayIndexTaefAdapterSource : public Microsoft ::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom | Microsoft::WRL::InhibitFtmBase>, IDataSource>
647- {
648- STDMETHODIMP Advance (IDataRow** ppDataRow) override
649- {
650- if (_index < std::extent_v<decltype (testCases)>)
651- {
652- Microsoft::WRL::MakeAndInitialize<ArrayIndexTaefAdapterRow>(ppDataRow, _index++);
653- }
654- else
655- {
656- *ppDataRow = nullptr ;
657- }
658- return S_OK;
659- }
660-
661- STDMETHODIMP Reset () override
662- {
663- _index = 0 ;
664- return S_OK;
665- }
666-
667- STDMETHODIMP GetTestDataNames (SAFEARRAY** names) override
668- {
669- auto safeArray{ SafeArrayCreateVector (VT_BSTR, 0 , 1 ) };
670- LONG index{ 0 };
671- auto dataNameBstr{ wil::make_bstr (L" index" ) };
672- (void )SafeArrayPutElement (safeArray, &index, dataNameBstr.release ());
673- *names = safeArray;
674- return S_OK;
675- }
676-
677- STDMETHODIMP GetTestDataType (BSTR /* name*/ , BSTR* type) override
678- {
679- *type = nullptr ;
680- return S_OK;
681- }
682-
683- private:
684- size_t _index{ 0 };
685- };
686- #pragma endregion
687603}
688604
689605extern " C" HRESULT __declspec (dllexport) __cdecl ReflowTestDataSource(IDataSource** ppDataSource, void *)
0 commit comments