Accessing dll

M

MortisReaper

I am having difficulty in passing string information thru a dll which is
in C++.
Below are the statements that I use that work with the dll.

Private Declare Sub PropCalc Lib "C:\Wrapper.dll" _
Alias "FluidPropCalc" (ByVal Inputxml As String, ByVal Outputxml As
String, ByRef lgth As Long)

Dim l As Long
Outputxml = String(255, 0)
PropCalc InputXml, Outputxml, l
Outputxml = Left(Outputxml, l)

I get an "Unhandled exception at 0x0600003a in EXCEL.EXE: 0xC0000005:
Access violation reading location 0x0600003a"

I am beginning to think excek does not work well with the dotnet
framework; can anyone tell me if this is so? I don't want to use a com
interop wrapper. I am using mixed mode c++.

Thanks to anyone that can provide some help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top