473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing CComSafeArray<double> x, through a reference using x.GetSafeArrayPtr(). Destr

1 New Member
I am trying to get CComSafeArray<double> x, through a reference using x.GetSafeArrayPtr(). When the destructor calls ~CComSafeArray() throw(), I am getting the follwing debug assertion "Expression: (((HRESULT)(hRes)) >= 0)". Is there a way to avoid it?

For back ground, I am passing "x" into a C# Interface wrapper to determine the value based on C# project.

C++ Code snippets:

Expand|Select|Wrap|Line Numbers
  1. CComSafeArray<double> x;
  2. CComSafeArray<double> y;
  3.  
  4. if (!GetData(x.GetSafeArrayPtr(), y.GetSafeArrayPtr())
  5.  
  6. {
  7.  
  8. ASSERT (FALSE);
  9.  
  10. }
Aug 29 '13 #1
0 1239

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: harry | last post by:
I have an object that's passed in to a function as a parameter i.e public boolean getProjectTitle(ProjectHeader_DTO obj) {...} If I then call a method on this object inside the function i.e...
3
by: mufasa | last post by:
We know C++ supports functions that can carry default values as follows: someFunction(int a, int b, int c =20); So calling someFunction(x,y) is perfectly legal! However, if I need to...
6
by: Mark Anderson | last post by:
I have code to develop result page links (like a search engine) for some results being passed from a database where I've no server-sdide acces - thus JS. The code is below and works fine except...
12
by: scottt | last post by:
hi, I am having a little problem passing in reference of my calling class (in my ..exe)into a DLL. Both programs are C# and what I am trying to do is pass a reference to my one class into a DLL...
22
by: tshad | last post by:
If I am passing a variable by reference to another routine by reference, do I need to dereference first? string testString; .... FirstSub(ref firstString) { HandleString(ref firstString); ...
4
by: Chris | last post by:
Suppose I have the following function signature void foo( Bar &myBar); and I want myBar to be an optional parameter, is there a way to do the logical equivalent of void foo( Bar &myBar =...
8
by: Sanders Kaufman | last post by:
I think I finally get the idea of passing by reference, but I'm struggling with the syntax and grammar of it. I've got an object and I want to send it to a function to have its properties...
3
by: duzhidian | last post by:
Hello: When I need a function to generate a string, I have two methods: 1. pass by reference: mystring = ""; myfunction( mystring ); // prototype of myfunction( &anystring );
20
by: MartinRinehart | last post by:
Is the following correct? x = "some string" x is a reference to "some string" foo(x) Reference is passed to function.
18
by: Carl Forsman | last post by:
there are 2 ways to return a value from a function ==================== 1) passing a reference as parameter - the following will return time void Table::Get(char* FieldName, *SYSTEMTIME time) {...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.