0

In my Windows Store app I am using a C++ component in order to use a Sink Writer. I created a C++/WRL project for that with a function which accepts a stream as a parameter in order for the Sink Writer to write to. The type of this parameter is Windows::Storage::Streams::FileRandomAccessStream. Now it is giving the error saying that the namespace Windows::Storage is not known, and when I include the header file windows.storage.h the error is "use of undefined type 'ABI::Windows::Storage::Streams::FileRandomAccessStream'".

Does anyone know what the problem is and how to fix it?

Thanks in advance!

Ronald

Ronald
  • 657
  • 1
  • 6
  • 13
  • 1
    This sounds very similar to this post: http://stackoverflow.com/questions/12687502/how-to-return-a-build-in-winrt-component-using-wrl – Raman Sharma Dec 24 '12 at 01:29

1 Answers1

0

Runtime classes are a logical concept of the Windows Runtime type system. When programming at the Windows Runtime ABI layer (e.g. using WRL), you cannot use logical features like runtime classes; only through language projections (like C++/CX) are these features usable.

Instead, programming at the ABI layer is much like COM programming: there are only interfaces. You may only refer to a FileRandomAccessStream object via one of the interfaces that type implements (e.g. IRandomAccessStream).

James McNellis
  • 348,265
  • 75
  • 913
  • 977