locked
How to get an ABI::Windows::Foundation::IPropertyValueStatics instance? RRS feed

  • Question

  • Dear all:

    I need to insert the value in ABI::Windows::Foundation::Collections::IPropertySet, but i find that there has only one way to create the value which it needed: using method in ABI::Windows::Foundation::IPropertyValueStatics interface like CreateBoolean(...). But how can i get the ABI::Windows::Foundation::IPropertyValueStatics interface instance? I searched in msn and google  there has not any clue!  

    Thanks.


    • Edited by questionA Tuesday, May 7, 2013 7:31 AM
    Tuesday, May 7, 2013 7:26 AM

Answers

All replies

  • Hi,

    Would you please provide us some other codes about this? Did you use MFT or other Sinker need this?

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, May 8, 2013 4:54 AM
  • Thanks for your reply.

    Yes, I'm writting a MFT which i need some method to tell the client some status of MFT. 

    So I try to insert some data in ABI::Windows::Foundation::Collections::IPropertySet, but the only way to create the value is to use ABI::Windows::Foundation::IPropertyValueStatics, but how can i get the IPropertyValueStatics interface instance? MSDN does not mention anything about it.

    Thursday, May 9, 2013 6:12 AM
  • Hi,

    Generally speaking, we should use PropertySet class to pass the value to MFT

    Like this

        auto configuration = ref new PropertySet();
        configuration->Insert("effect", effectName);
        outputVideo->AddVideoEffect("PolarTransform.PolarEffect", true, configuration);

    And then we can use IPropertyValue interface to get the value.
     http://msdn.microsoft.com/en-us/library/br224510(v=vs.85).aspx

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jesse Jiang Thursday, May 16, 2013 6:08 AM
    Thursday, May 9, 2013 7:40 AM
  • Yes, the method is using in my code to make javascript configure the MFT. But How to make the javascript to get some property from MFT?
    Friday, May 10, 2013 8:59 AM
  • We can use C++/CX as a wrapper.

     

    Best regards,

    Jesse



    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 13, 2013 6:37 AM
  • Hello,

    If you are creating your MFT within JavaScript you can simply add a public WinRT method to the MFT (I.e. IFACEMETHOD). Another option is to create a custom interface and derive your MFT from that interface. You can then derive from IMFGetService and return "this" cast to the custom interface. This second method is likely best practice but is not necessary.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Monday, May 13, 2013 9:47 PM
    Moderator
  • Could you please explain how to make C++/CX wrapper to call "auto configuration = ref new PropertySet();" in WRL.

    Denis

    Sunday, December 29, 2013 1:17 PM