×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Managed C++ on WP7

    Hi,

    there were couple of discussions on MSDN forums, here and stackoverflow as well about using the "Managed C++" for WP7 development.

    Even with Mango update the Silverlight or XNA applications are limited to C# or VB, it is still unclear if the C++ code which contains no dependency on frameworks can be compiled into MSIL library and be executed there - i have not tried it yet, but I can imagine that it will make my life easier if this will be possible.

    Can anyone give there a clear answer? Just to be sure what I am asking - is it possible to compile application logic written in C++ into intermediate language MSIL (according to my understanding there is no difference in the result, whatever language is used (C#, F# VB or C++) when compiled into MSIL and the WP7 runtime will execute it) , separate it into DLL library and execute it on WP7?

    Of course might be possible, that when C++ compiled into MSIL it will create some MSIL instructions, which are not supported by WP7 runtime, which can support only MSIL subset...

    Having a very clear answer here will help a lot.

    BR
    STeN

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144

    Re: Managed C++ on WP7

    I think if any discussion bioard would have a clear answer, it would be the MSDN forums, thus if there is no answers in there, then I would not think that we would have those ones in here either.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Re: Managed C++ on WP7

    do check this links :

    http://social.msdn.microsoft.com/For...4-2fde9273a947

    http://social.msdn.microsoft.com/For...8-bc2ae9e94c7c


    Haven't tried . Do let us know if it works in wp7 following links show compile C++ function to be used by C# .
    http://social.msdn.microsoft.com/for...-c3849e3ebba4/
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Managed C++ on WP7

    For the compilation issue, there is a compiler switch, /clr:safe. It will disable usage of unsafe stuff.
    There are some restrictions though, see http://msdn.microsoft.com/en-us/library/ykbbt679.aspx
    It matters a lot what kind of C++ code you have. STL has a managed counterpart (at least as I understand). However if you are using pointer-based C++, you will have to re-work them, managed pointers are not *, but ^. There might be some compiler flag to treat everything as managed pointer, I do not know.
    Then you have to feed the result into your WP7 code, that may be the easier part.

  5. #5
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Re: Managed C++ on WP7

    Just want to share this:


    4.2.2
    The application must not invoke native code via PInvoke or COM interoperability. If it does, it will fail the certification process


    WP7 certification process.
    refer:
    http://msdn.microsoft.com/en-us/libr...(v=VS.92).aspx
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Managed C++ on WP7

    Managed C++ is not native code, that is why it is "managed".

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    920

    Re: Managed C++ on WP7

    Quote Originally Posted by wizard_hu_ View Post
    Managed C++ is not native code, that is why it is "managed".
    People tend to associate c++ with native but in MS case there is the native version and the .NET (managed) version. Having Managed C++ support would be a plus to many developers. Specially the ones trying to port from C++ on other platforms. Still C# is also a viable option and the learning curve is not that big for devs with C based languages background.

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    173

    Re: Managed C++ on WP7

    Sometimes good to know :

    If i remember correct the MS's software term "managed" came to puclicity when .NET was released in the summer 2002.
    So in native .NET's world "memory is managed by the garbage collector (gc)". And in the native Win32/C/C++ world, the memory
    is unmanaged by the garbage collector.

  9. #9
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    Manaus, Brazil
    Posts
    5

    Re: Managed C++ on WP7

    Actually, Managed C++ was deprecated in favor of C++/CLI, just a small information.

    And back to Windows Phone, I think there's not even a remote possibility of running C++/CLI in it, as even Silverlight (Windows) doesn't allow C++/CLI to be used for creating applications. PInvoke will be allowed on Windows with the release of Silverlight 5, but there's no information if it will be coming like that to Windows Phone someday.

Similar Threads

  1. Where the database is managed..?
    By amrish20 in forum Symbian
    Replies: 1
    Last Post: 2008-06-11, 08:48
  2. has anyone managed to use ogg vorbis controller
    By rpunskyy in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2007-09-21, 12:12
  3. Managed Project
    By xj12 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-06-05, 12:54
  4. managed devices ?
    By uckermark-girl in forum Symbian
    Replies: 2
    Last Post: 2005-05-17, 06:38
  5. How is the Nokia M2M Gateway managed?
    By Nokia_FAQ in forum Nokia M2M
    Replies: 1
    Last Post: 2002-05-13, 21:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •