473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

LPSAFEARRAY and C#

Hi,

I am trying to use a function from C Win32 dll:

short APIENTRY TPE_NIP_View ( BSTR *filename,
LPSAFEARRAY *nipItemArr )

From C# I call the function:

NIP_ITEM[] nipItemArray;
err = TPE_NIP_View( ref str, out nipItemArray );

//nipItemArray is a struct and its definition is:

public struct NIP_ITEM
{
short theType;
short level;
short id;
string name;
string data;
}

When the dll function is finised, I get an unhandled exception. I have
stepped through the DLL and there doesnt appear to be any problems. I
think this line is the cause:

*nipItemArr = tmpArr; //last line of C dll

Any help on this would be appreciated

Regards,

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
0 1327

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Egbert Nierop \(MVP for IIS\) | last post by:
Hi, I'm 'improving' CComBSTR (yes, I do still program unmanaged code in addition to C# ) to contain features, not found in it. Does anybody have good code which maches LastIndexOf()? If...
10
by: thinktwice | last post by:
in my script file , i need call a method of a atl com module(implemented in vc++), which returan an safearray. i don't know how to convert it into array in jscript. i have tried serveral ways to...
5
by: mitch | last post by:
Is this really as hard as it seems. I've been truly suprised by the lack of any information/suggestions about this. It should be so simple. In c# I have: double data = {1.0,2.0,3.0,4.0}; I...
7
by: Tremendo | last post by:
Hi, I need to consume an unmanaged DLL from managed C#. The DLL is "ae766.dll". I have problems with one function in it. Who developed the DLL, provided the following information, regarding that...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.