OGG Encoder in C# or WinPRT compatible cx/c++ - silverlight

I am trying to modifying libogg 1.3.0( from xiph.org) to support windows phone project which can be directly referenced inside any windows phone 8 project.
I have successfully compiled it with windows phone compilation and generated the dlls. But now these generated dlls cannot be directly used with windows phone as reference.
Can anyone help me with how I can compile this libogg project so that it supports windows phone runtime?
thanks

You will need to create a Windows Runtime Component (C++/CX) that wraps your C++ library. That will define what is seen from C#/.NET.

Related

M2MQTT in Portable Class Library

I would like to share my M2MQTT code between a Windows 10 universal windows platform application and a windows phone 8.1 application. Perhaps a WPF app in the future.
I've attempted to use NuGet to include M2MQTT in a portable class library (PCL). I targeted the PCL with a minimum of requirements to satisfy both project types. I receive the following error. Is it possible to reference m2mqtt in a portable class library that can be shared by both UWP and WP8.1 projects?
Attempting to gather dependencies information for package 'M2Mqtt.4.2.0.1' with respect to project 'Pcl45', targeting '.NETPortable,Version=v4.6,Profile=Profile32'
Attempting to resolve dependencies for package 'M2Mqtt.4.2.0.1' with DependencyBehavior 'Lowest'
Resolving actions to install package 'M2Mqtt.4.2.0.1'
Resolved actions to install package 'M2Mqtt.4.2.0.1'
Install failed. Rolling back...
Package 'M2Mqtt 4.2.0.1' does not exist in project 'Pcl45'
Could not install package 'M2Mqtt 4.2.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.6,Profile=Profile32', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Additional Information 9/24/2015
I cloned the M2MQTT GitHub repository and noticed that there is a .pcl for Windows 8.1 and Windows phone 8.1. I didn't see support for UWP in a .pcl though.
I suppose I have my answer. No M2MQTT does not support .pcl in UWP projects.
Wondering if there are any plans to add .pcl support in the future?
Also if I might be able to use M2MQTT in Xamarin Android or Ios projects?
Additional Information 9/28/2015
Following suggestions from #Anders Gustafsson I successfully created a .pcl that I was able to consume in my UWP app and windows phone 8.1 app. No more duplication of code. Nice. Hope this will work in xamarin android and ios.
There is this warning.
Severity Code Description Project File Line Source Warning
Some NuGet packages were installed using a target framework different from
the current target framework and may need to be reinstalled. Visit
http://docs.nuget.org/docs/workflows/reinstalling-packages for more
information. Packages affected: M2Mqtt Pcl45 0 Build
M2MQTT is available as a PCL profile 32 assembly, which is capable of targeting Windows 8.1, Windows Phone 8.1 and Windows 10/UWP projects. The M2Mqtt.WinRT assembly is really a PCL Profile 32 assembly.
The problem you are facing is that this fact is not reflected in the NuGet package. In the NuGet package there are separate lib folders for win81 and wpa81 with the M2Mqtt.WinRT assembly in both. The desirable scenario would have been that there should have been a single sub-folder portable-win81+wpa81 containing the M2Mqtt.WinRT, then everything would (probably) have worked flawlessly for you.
There seems to be one workaround, although I cannot promise that it is fully reliable.
Start off creating a portable class library, but set the only target for the PCL to Windows 8.1. (If that does not work immediately, create a PCL that targets Windows 8.1 and Windows Phone 8.1, and when the PCL has been created, uncheck the Windows Phone 8.1 check box.)
Add the M2MQTT package from NuGet to your PCL. Your PCL will now reference the M2Mqtt.WinRT assembly in the win81 sub-folder.
Add Windows Phone 8.1 as a target of your PCL, so that your PCL (again) targets both Windows 8.1 and Windows Phone 8.1. You may receive warning messages from NuGet when doing this; ignore those messages.
Now, you should be able to consume the M2Mqtt.WinRT assembly from your PCL, and you should also be able to reference your PCL in a UWP application.
To add more reliability once you have managed to download the M2MQTT package from NuGet, you might manually delete and then re-add the reference to the M2Mqtt.WinRT assembly in your PCL project. That way you will short-circuit NuGet, preventing NuGet from accidentally trying to restore your M2Mqtt.WinRT reference from a non-existing (portable-win81+wpa81) directory.
I cloned the M2MQTT GitHub repository and noticed that there is a .pcl for Windows 8.1 and Windows phone 8.1. I didn't see support for UWP in a .pcl though.
I suppose I have my answer. No. M2MQTT does not currently support .pcl in UWP projects.

how to create win32 smart device project

hi
i need to develop silverlight application for windows embedded.as i referred some links silverlight for windows embedded supports only native code(C++). for this i build my silverlight application in blend2 and i converted that xaml file into c++ files using XAML2CPP. and now im trying to create win32 smart device project using VS2008 but for that im not getting which option we have to select and how to do can anyone of help me
AFAIK this can be done in two ways:
You can use a SDK provided by the OEM of your device, then create a Smart Device Project based on this SDK, then you can start the development of your Silverlight C++ project.
If you are the OEM of the device (it means, you have a BSP and you configure and generate the OS images and SDKs). Then you can create a subproject of your OS design and even include your application as part of your OS image, or you could just generate a new SDK and use option 1.

DLL is not supporting in windows 7 phone application using visual studio 2010

If I add any dll (like sqllite3.dll, sqlliteclient.dll) I get the below message:
Reference cannot be added to l because it was not built using the Windows Phone runtime. Windows Phone projects will work only with Windows Phone assemblies.
I could really do with a clean slate to start with that. Kindly provide simple database connection using database with reference dll.
You cannot run SQLite in Windows Phone 7, since it cannot run native code.
Instead, use a C# implementation.
you can also use SterlingDB based on top of isolated storage, with linq support:
http://sterling.codeplex.com/

Converting EmguCV/OpenCV to Windows Phone Runtime

I'd like to know whether there are any image processing libraries available for Windows Phone 7 apps.
EmguCV (.net wrapper for OpenCV) has all the features I want but I'm unable to use it on Windows Phone development as it encounters a runtime conflict. Is there any way I can convert this to a Silverlight/Windows Phone runtime?
Thanks.
You can't execute unmanaged code in a 3rd party app. Emgucv is just a wrapper and uses the unmanaged OpenCV. There's no real managed port out there. You'll have to port it yourself from the C codebase.

Where to get a Compiled "Windows Ribbon for WinForms 2.2"?

I am just wondering whether anyone knows where I can get a compiled version of Windows Ribbon for WinForms 2.2? I can only download the source from the website and as I don't have the Windows 7 SDK (and can't download) I can't compile it.
Even if you could download the DLL (you can't), it is not going to help you. To create your own ribbon for use in your own application you must create a ribbon markup file. That file needs to be compiled by UICC.EXE, a tool that is only available in the Windows 7 SDK. Without that tool, you cannot create your own ribbon.
Downloading the SDK is required. Note that the SDK version that comes with VS2010 is not good enough, it is a sub-set of the SDK and does not include uicc.exe

Resources