I have a few questions about C++/CX. (C++ standard version, use VS 2008, use library, FFMpeg)


  • Hi!!! I'm sangyoon from korea.

    I can't speak english well. so, I'm not sure the following statements are correct.

    I have not figured out yet for C++/CX.

    so, That brings me to 4 Questions:

    1. What is C++/CX's c++ standard version? (ex C++ 0x or C++ 11)

    2. I heard that that while the C++/CX syntax is very similar to C++/CLI, the underlying implementation is very different, it does not use the CLR or a garbage collector, and it generates completely native code.
    If so, use the C++/CX(without WinRT, WRL) can be VS2008?

    3. Use the Windows8 Metro style project with C++/CX can be native C, C++ library?
    I linked static library. but I could't link dynamic link library. Is it possible? If so, When I creating dll set special setting?

    4. I want use FFMpeg of OpenSource in Metro style apps. Is it possible?

    thank you.


    Wednesday, December 14, 2011 3:49 AM


  • C++/CX is not yet standardized. The compiler's C++ standard support would change over time.

    C++/CX requires a new compiler. You can probably upgrade the compiler through a new version of Windows SDK, but I would use the new IDE which also has editor support for C++/CX (intellisense, parameter info etc).

    Metro Style has a different set of APIs available, if the native library does not use APIs outside of the WINAPI_PARTITION_APP partition or has a metro style port (e.g. SQLite, STL and CRT), then yes. There may be other runtime issues like you can't read or write to certain locations when running metro even when the library support file access, but the error handling should be already there if the code is aware of NTFS file/folder permissions.

    You can load system dlls through Load-Time Dynamic Linking. If you have a release edition of third party DLL, run it through Windows App Cert Kit to see if it calls any APIs outside of the WINAPI_PARTITION_APP partition. Note debug version of third-party dlls may raise false positives as debug versions are not meant to be redistributable. As for FFMpeg, you need to check how you can modify the OS tier (e.g. replace CreateFile with CreateFile2). The job would be easier if its OS calls are made through a module (something like CRT) that can be ported to WinRT without changing the rest of the code.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    Wednesday, December 14, 2011 2:57 PM