473,421 Members | 1,668 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,421 software developers and data experts.

Does COM method return S_OK?

I have an unmanaged VC++ application calls a COM object which will be
implemented in C#.

The VC++ call is:

BOOL res;
VERIFY( importFilt->Import(&res) == S_OK );

My C# method is:

public int Import()
{
// TODO: Add ValidatorImport.Import implementation
return iVal;
}

Will my VC++ code actually succeed? Does the C# Import() method return S_OK
by default? Or is the return value value iVal?

Nov 17 '05 #1
1 2437
Will my VC++ code actually succeed? Does the C# Import() method return S_OK
by default?
Yes, as long as no exception is thrown.

Or is the return value value iVal?


No, that's returned through an extra [out,retval] parameter.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 17 '05 #2

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

Similar topics

3
by: Phil Powell | last post by:
My first time working with a PHP class, and after 6 hours of working out the kinks I am unable to return a value from the class, so now I appeal to the general audience what on earth did I do wrong...
0
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
1
by: Christoph Schittko [MVP] | last post by:
I wrote a custom WMI method provider in unmanaged C++. When I access the method from C# I get an SystemException with this information: _COMPlusExceptionCode 0xe0434f4d int _HResult...
8
by: TJ | last post by:
I need to be able to pass a pointer to a (managed code) Stream object to a COM method so it can serialize its data into the stream. I have a C# application that makes uses of Randolf Duke's...
2
by: Joe | last post by:
I have a javascript that calls a method of an activex control. I want to get the return value, S_OK or S_FALSE. I tried var r = document.Form1.PCtl.Download('h') document.write(r) // to see the...
0
by: Raed Sawalha | last post by:
I created a COM DLL uisng vc++ that installed in client side which capture the desktop screen, i converted the stream of bytes as one string to have it in char * the COM Method is ...
52
by: Julie | last post by:
I'm supporting an application at work. Below are some code segments that I can't understand how they work. First let me say, I would never code this standard. I'm just really creeped out that it...
4
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
How would I do, in both ends, to get a return value from a C++ dll called from C# app?
0
by: kboek | last post by:
I'm trying to use a method defined in the Windows Media Format SDK (wmsdkidl.h) virtual HRESULT STDMETHODCALLTYPE AcquireCredentials( /* */ WCHAR *pwszRealm, /* */ WCHAR...
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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...

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.