Calling C++ wrapper DLL from C# interop issue.

rated by 0 users
This post has 3 Replies | 2 Followers

Top 75 Contributor
Posts 61
Points 920
andy burbidge Posted: 02-26-2010 11:25 AM

We have a DLL written using C++ that acts as a wrapper around the Dialogic drivers Ver 6 SU 184 and presents an 'nice' API to our current VMS.

There is a requirement to use this DLL with another VMS written using C# .NET and so we under went the process is writing the interop code to call the C++ DLL from C#.

On calling the first initiaise function via the interop we get an exception "Memory cannot be read......" If the wrapper DLL has all the references to the Dialogic lib files remove then the function call works; so there does not appear to be a fault with the interop code.

All this can be carried out on XP PCs.

However, if the complete wrapper DLL with all the Dialogic libs linked in and tested on a Vista PC then it all works as expected. In fact it is possible to dial a number via interop on a Vista PC.

Is anyone able to explain why this should work on Vista but not on XP.

 

 Thanks in advance

Top 50 Contributor
Posts 129
Points 1,500

Hi,

Are you using the installing exactly the same SR on XP and Vista? There are separate installations.

Regards,

Paulo

  • | Post Points: 20
Top 75 Contributor
Posts 61
Points 920

Yes it appears so. We have done a directory comparison also and all the files have the same date and time stamp. Is this right?

I am interested to know what differences there and if it would cause what we are seeing.

  • | Post Points: 20
Top 25 Contributor
Male
Posts 178
Points 1,559
Dialogic Employee

As Paulo mentioned there are two separate releases of the system release.  One version covers Win XP/2003/2000 and the other Win Vista.  On the service update page you'll see links for both versions.

Also here is an app note that also may be useful for reference.  It proposes one solution for wrapping the C function calls in a wrapper to use in .NET

http://www.dialogic.com/products/docs/appnotes/11170-dalogic-apis-net-apps-an.pdf

- DL

Page 1 of 1 (4 items) | RSS