tags:

views:

392

answers:

2

I created a WCF service that uses TagLib# (http://developer.novell.com/wiki/index.php/TagLib_Sharp) which relies on an unmanaged dll (Win32 I think) to do much of the heavy lifting. Is there any chance of hosting this WCF service in Azure?

I did find this in the .csdef file:

<WebRole name="WebRole" enableNativeCodeExecution="true">

Does that do what I hope it does?

As an addendum does it matter if the unmanaged code is 32 or 64 bit? I know from experience that trying to call a 32 bit Dll from a 64 bit WCF service doesn't work and I believe Azure is a 64 bit platform.

+2  A: 

On the 32-bit platform, it can be done using P/Invoke. But, not on the 64-bit platform. Take a look at this article for more information. But, you could host the service yourself and and use the service bus feature of Azure if you wanted.

JP Alioto
Perfect, thanks!
James Cadd
+2  A: 

I actually think JP got it the other way around. P/Invoke in the cloud will work with 64-bit but not with 32-bit since all our VMs run Win 2k8 x64 by default. You can always spawn a new process of course.

Also, note that registering COM servers won't work today - I'm not sure how Taglib uses COM.

Sriram Krishnan
It seems like the workaround is to spawn a 32 bit subprocess in Azure, then do the p/invoking.
James Cadd
Yup. In that case, the sub process will be on WOW64 so everything should be 32 bit
Sriram Krishnan