James Cadd
James Cadd

Reputation: 12216

Can an Azure service run unmanaged code?

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.

Upvotes: 3

Views: 1796

Answers (2)

Sriram Krishnan
Sriram Krishnan

Reputation: 296

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.

Upvotes: 5

JP Alioto
JP Alioto

Reputation: 45127

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.

Upvotes: 4

Related Questions