473,394 Members | 1,645 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.

Managed C++ equivalent for Foo([in] VARIANT_BOOL b, [out, retval] VARIANT *ptr)

I have an interface in Managed C++ where one of the methods is this one:

Object *Foo(Boolean *b)

When I use tlbexp to check the IDL the line above is converted to:

HRESULT Foo([in, out] VARIANT_BOOL *b, [out, retval] VARIANT *ptr)

However I need:

HRESULT Foo([in] VARIANT_BOOL b, [out, retval] VARIANT *ptr)

What must the declaration of the method look like?

Thanks in advance,
Boris
Nov 17 '05 #1
3 3535
>What must the declaration of the method look like?

Probably

Object *Foo(Boolean b)

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
Mattias Sjögren wrote:
What must the declaration of the method look like?


Probably

Object *Foo(Boolean b)


Which is converted to this IDL:

HRESULT Foo([in] unsigned char b, [out, retval] VARIANT *ptr)

Any other idea?

Boris
Nov 17 '05 #3
I got it:

Object *Foo([MarshalAsAttribute(UnmanagedType::VariantBool)]Boolean b)

See
http://msdn.microsoft.com/library/en...asp?frame=true.

Boris
Nov 17 '05 #4

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

Similar topics

1
by: ricolee99 | last post by:
Hi There, I'm trying to convert some VB code into C#. There is a function defined in VB, GetAbsolutePathName(path) where it returns the complete path from the root of the drive for the...
5
by: Alan Cobb | last post by:
Hi, In the managed C++ class below I get compile warning C4677 from VS2003. "signature of non-private function contains assembly private type", even though the managed enum is public. I have...
5
by: | last post by:
I'm having difficulty embedding a managed C++ control in Internet Explorer. I'm using the same object syntax in the html as I would for a c# control, but IE doesn't seem to find the control in the...
3
by: Boris | last post by:
I have an interface in Managed C++ where one of the methods is this one: Object *Foo(Boolean *b) When I use tlbexp to check the IDL the line above is converted to: HRESULT Foo( VARIANT_BOOL...
4
by: Geoff Jones | last post by:
Hi Can anybody tell me the equivalent code in VB for the following? public static void copyADataRow(DataRow objSrcRow, DataRow objTargetRow) { int i=0; for each(object item in...
7
by: MB | last post by:
I had a C++ dll that I used for C++ applications. I added a managed C++ class to this library and started to use the managed C++ class in my C# application. This works OK only if I build the C++...
5
by: =?Utf-8?B?VG9tYXM=?= | last post by:
Hello, Somebody knows which is the equivalent one in C++/CLI ? HINSTANCE ShellExecute(HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd
1
by: neelz | last post by:
Hi Friends, I am porting an application from Linux to Windows. In the source code, <sys/times.h>, time.h etc. header files are included and tms structure, times() function are getting used. I have...
1
by: sondha roy | last post by:
Is c#/c++ not 'managed' by default in NET framework?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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
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.