Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2006, 04:41 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Handle VARIANT return type

Hi guys

Please help me out here. I never used VARIANT.
I tried to read about it ,but can not understand properly.Here is my problem.


I am using a activeX in my program .
There is a method of activeX like this.

VARIANT AcquireScanChannelData( BOOL Input = true);


Which Returns VARIANT .


If input is true, it returns a variant that contains a one-dimensional
array of float value (VARIANT structure is defined as VT_12 |
VT_ARRAY).


If input is false, it returns a variant that contains a one-dimensional
array of short valued (VARIANT structure is defined as VT_12 |
VT_ARRAY).


I need to call function like this AcquireScanChannelData(true)


My problem is that in what data type I should take returning array .


I tried float[] , * float ,but nothing working
It gives in error like
error C2440: '=' : cannot convert from 'System::Object __gc *' to
'float'


error C2440: '=' : cannot convert from 'System::Object __gc *' to
'float[]'


Please help me out here ,I am stuck badly.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic return type mega C# 4 November 30th, 2006 11:00 AM
Generic return type mega C# 2005 1 November 30th, 2006 07:27 AM
Return TYPE TABLE to VB from Oracle muttleychess Pro VB Databases 3 August 2nd, 2006 03:28 PM
error on Webmethod when return type is a dataset Hagop General .NET 1 August 10th, 2005 05:45 AM
return type? Sibananda Tripathy J2EE 1 January 3rd, 2005 04:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.