forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C++ function returning an array - can STDCALL cope?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 287

PostPosted: Mon Feb 18, 2013 3:50 pm    Post subject: C++ function returning an array - can STDCALL cope? Reply with quote

I;m trying to link to a C++ routine (provided by a 3rd party) which is declared as:

double[] ICurve_GetValues(...)

I've got, in my "wrapper":

REAL*8 :: RET(IVALUECOUNT)

STDCALL IP_ICurve_GetValues_ 'ICurve_GetValues'(...) : REAL*8
RET = IP_ICurve_GetValues_ (...)


but it crashes when called. I'm guessing I've got the STDCALL syntax wrong?

TIA

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7375
Location: Salford, UK

PostPosted: Mon Feb 18, 2013 10:24 pm    Post subject: Reply with quote

My first thought is that this will not work, whether STDCALL or not.

If the third party can make a change then you would stand a better chance if the array of doubles was an argument.
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 287

PostPosted: Mon Feb 18, 2013 11:06 pm    Post subject: Reply with quote

thanks Paul, I thought as much and have already made the same suggestion to the third party programmer.

K
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group