public ref class Class1 sealed { public: Class1(); Windows::Foundation::IAsyncOperation<Windows::UI::Xaml::Media::Imaging::BitmapImage^>^ StreamToBitmap(Windows::Storage::Streams::IRandomAccessStream^ fileStream); }; }
Class1::Class1() { } IAsyncOperation<BitmapImage^>^ StreamToBitmap(IRandomAccessStream^ fileStream) { return create_async([=]() { auto bitmapImage = ref new BitmapImage(); bitmapImage->SetSource(fileStream); return bitmapImage; }); }
Error 2 error LNK2019: unresolved external symbol "public: virtual struct Windows::Foundation::IAsyncOperation<class Windows::UI::Xaml::Media::Imaging::BitmapImage ^> ^ __cdecl TestRuntimeC__toCS::Class1::[TestRuntimeC__toCS::__IClass1PublicNonVirtuals]::LoadImage(struct Windows::Storage::Streams::IRandomAccessStream ^)" (?LoadImage@?Q__IClass1PublicNonVirtuals@TestRuntimeC__toCS@@Class1@2@U$AAAP$AAU?$IAsyncOperation@P$AAVBitmapImage@Imaging@Media@Xaml@UI@Windows@@@Foundation@Windows@@P$AAUIRandomAccessStream@Streams@Storage@6@@Z) referenced in function "public: virtual long __stdcall TestRuntimeC__toCS::Class1::[TestRuntimeC__toCS::__IClass1PublicNonVirtuals]::__abi_TestRuntimeC__toCS___IClass1PublicNonVirtuals____abi_LoadImage(struct Windows::Storage::Streams::IRandomAccessStream ^,struct Windows::Foundation::IAsyncOperation<class Windows::UI::Xaml::Media::Imaging::BitmapImage ^> ^ *)" (?__abi_TestRuntimeC__toCS___IClass1PublicNonVirtuals____abi_LoadImage@?Q__IClass1PublicNonVirtuals@TestRuntimeC__toCS@@Class1@2@U$AAGJP$AAUIRandomAccessStream@Streams@Storage@Windows@@PAP$AAU?$IAsyncOperation@P$AAVBitmapImage@Imaging@Media@Xaml@UI@Windows@@@Foundation@7@@Z) C:\Users\Stamatis\Documents\Visual Studio 2013\Projects\TestRuntimeC++toCS\TestRuntimeC++toCS\Class1.obj TestRuntimeC++toCS
IAsyncOperation<BitmapImage^>^ StreamToBitmap(IRandomAccessStream^ fileStream)
IAsyncOperation<BitmapImage^>^ Class1::StreamToBitmap(IRandomAccessStream^ fileStream)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)