StrataFrame Forum

Third party dll load error

http://forum.strataframe.net/Topic32194.aspx

By Larry Caylor - 9/10/2013

I'm working on adding a third party text to speech server to my application. To interface to the speech server, the vendor (NeoSpeech) provides a dll that communicates with their TTS server. The problem I'm having is I get an error when I try to load the dll. To trouble shoot the problem I created a simple standard non-StrataFrame WinForm application that consists of a form and a class that uses the dll to communicate with the TTS server. In this case everything works fine. Next I created a StrataFrame application (with out security). When I call the method in the class that uses the dll I get an error (see attachment). Any idea why it works with a standard WinForm application but not a StrataFrame WinForm application?
By Larry Caylor - 9/11/2013

Mystery Solved. I was doing my testing in VS2010. When you create a standard WinForm project the target CPU is set to x86. When you create a StrataFrame WinForm project the target CPU is set to Any. The third party dll was compiled for x86 so it worked in the standard WinForm project but not the SF project. Setting the SF project compiler option to x86 fixed the problem. Now I just need to find out if the vendor has a version of the dll that targets Any CPU.
By Trent L. Taylor - 9/11/2013

Ahh...yes, the inevitable problem faced by all over assemblies.  We have fought this in the past as well.  With everything practically an x64 environment anymore, it is best to allow your app to be built as "Any CPU" so that the app can run in either x86 or x64 and take advantage of the x64 when available.  Obviously, x86 will run in both.  But will be limited to 32-bit.  We have one old assembly in our medical app that we will replace next year that has been holding up back on the client side.  On our server, we are running at x64.  This will be a nice limitation to get rid of for sure!
By Edhy Rijo - 9/11/2013

Me too have a project which I am being forced to compile on x86 instead of x64, waiting for the vendor to provide x64 version is taking forever BigGrin