SilverlightShow: Windows Phone 8: Native Code Support Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: Windows Phone 8: Native Code Support <p>Hi.</p> <p>Thanks for your helpful sample.I have a problem passing string in a wp8 project and I appreciate you if you could help me.</p> <p>I want to pass a string from a winrt component to c#/Xaml .I pass a string by refrence to winrt and in winrt c++ I give a value to that string.I debug the project with no error  but at runtime no address receive in c++  and the string (which is passed with out keyword) doesn't change in C# part of program. </p> http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx#comment9173 harsini http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx Sun, 07 Apr 2013 21:46:29 GMT Re: Windows Phone 8: Native Code Support <p>Hi,</p> <p>I am not able to call simple C++ Dll which is created in Windows 8 (Visual Studio 2012) through C# Visual Studio 2012 Windows 8 Phone App.I have used DLLImport method.In the button click while calling the function it is giving error - System Exception Not Null....Though the same code worked in Windows 8 Metro Apps.Please provide me any link of a simple example or tell me any better option.If needed I can post the code too.</p> <p>Please help.</p> <p>Regards,</p> <p>SB</p> <p><br /> </p> http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx#comment9150 Sulekha http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx Tue, 02 Apr 2013 13:13:49 GMT Re: Windows Phone 8: Native Code Support <p>Thanks. It was useful for me.</p> http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx#comment9127 mmluqman http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx Thu, 28 Mar 2013 16:39:13 GMT Re: Windows Phone 8: Native Code Support <p>Here is a quick response:</p> <ol> <li><em>Nothing</em> on Windows Phone runs in an "interpreted sandbox", not even on Windows Phone 7. Code is either JIT compiled or MDIL that is linked to native code. No interpreter is involved. More details in the "compile in the cloud" article of this series.</li> <li>Obviously, no matter what programming model we prefer, we have to deal with a secured environment where either the runtime or the operating system enforces restrictions on your code to prevent it from going rampage. Native development doesn't mean that you e.g. can freely access the file system or do similar things.</li> <li>I would be interested in how your "fellow engineer" was able to analyze the inner workings of code execution on Windows Phone, something that to my knowledge is not possible with reasonable effort.</li> <li>Not only Joe Belfiore but every other tech guy inside Microsoft who talked about this put a lot of emphasize on the fact that native means native, not C++/CLI or similar variants. Watch e.g. Peter Torrs talks for more.</li> </ol> <p>Even if there was an underlying sandboxed execution environment, the question still is why someone would care. You can write and build C++ code into native images, and the level of compatibility apparently is excellent, or else projects like SQLite, Ogre or Unity 3D would have a lot more trouble targeting Windows Phone 8. So as long as you are able to reuse code, use your standard libraries and get native performance, why bother to dig deeper?</p> <p>By the way, you can install Windows 8 in a virtual machine and test there if you don't have the possibility to use it on bare metal. I read that with some tweaks it's even possible to get the Windows Phone 8 emulators up and running.</p> <p><br /> </p> http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx#comment8683 MisterGoodcat http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx Fri, 07 Dec 2012 10:48:19 GMT Re: Windows Phone 8: Native Code Support <p>I have been asking the same question for months on various sites around the Internet since I first saw Joe Belfiore's video where he claimed that Windows Phone 8 allows native development. His body language did not convey conviction, at least to me, so I had a fellow engineer check if this was true, and he said that the so-called 100% native applications *still* run inside an interpreted sandbox. I am in a weird situation where I cannot install VS2012 or Windows 8 to check myself, so I would be very grateful if someone could give a definitive answer to this question:</p> <p><strong>When a Windows Phone 8 application image is built, what is its structure, and more importantly, what is the execution environment? Is there any managed code, WHATSOEVER, involved in the execution of that application?</strong></p> http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx#comment8682 NotConvinced http://www.silverlightshow.net/items/Windows-Phone-8-Native-Code-Support.aspx Fri, 07 Dec 2012 07:55:39 GMT