BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ActiveX and Variant problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
Marko
Guest





PostPosted: Wed Apr 18, 2007 5:05 pm    Post subject: ActiveX and Variant problem Reply with quote



==== i have an ActiveX control there is a VectroR(short size, TVariant AxisArr, TVariant PosArr) function


both of the TVariant element should be:
- AxisArr is a array of Smallint {0,1,2 allways }
- PosAss is a array of 3 coordinates ( 3x Single)


Everything works like this :


OleVariant AxisArr, PosArr;


int Bounds[2];
Bounds[0]=0;
Bounds[1]=2;
AxisArr = OleVariant(Bounds,1,varSmallint);
PosArr = OleVariant(Bounds,1,varSingle);

// putting elements {0,1,2} into array
AxisArr.PutElement(0,0);
AxisArr.PutElement(1,1);
AxisArr.PutElement(2,2);

for(...)
{
//reading x,y,z from external buffer and....

//saving into PosArr

// putting elements {x,y,z} into array
PosArr.PutElement(x,0);
PosArr.PutElement(y,1);
PosArr.PutElement(z,2);

//then launching the ActiveX function

MC->VectorR(3,AxisArr,PosArr)
}


Problem....

This algorythm works only when C++ Builder is open. When i'm trying to launch the exe file only - application fails.


I know that i'm using OleVariant. I just can't fint the way to initialize the TVariant (there is no PutElement function)...... How to do it?
But it works (only under Builder 5.0 control), so where is the problem .....

Please help !
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.