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

Home Posts Topics Members FAQ

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 3536
>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?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
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...
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?

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.