Search This Blog

Tuesday, September 22, 2009

using MFC dll's on Azure

Hi
I read somewhere that you can not run MFC dlls in the Azure platform , so its is wrong!!!
i managed to use mfc dll that i developed on .... VC++ 6.0 . in the Azure .
Be aware i didnt test MFC dll that developed on visualstudio 2005/2008.
how did i call my 32bit mfc dll from the web_role that runs in 64 bit ???
i created a WCF self host that using named pipe (net.pipe) , and when the web role loaded i run this self host , and from the self host i call to my native library ,via dllimport , the regular way.

When i deploy my package i didn't add any extra dll , its looks like the instance already have the needed library to support my mfc dll.

more than that my dll connect to sql server via odbc(CDatabase, CRecordSet) , so i just needed to change my connection string to point to sql azure ,and boooom i managed to make it work in the Azure too , again no extra dll needed to the package.

some useful links :
Using a 32bit Native DLL in Windows Azure
Executing Native Code in Windows Azure and the Development Environment
MSDN FullTrust Sample

i hope its save you some test time.
Yaniv

No comments: