simply_red Posted October 19, 2006 Posted October 19, 2006 Hi,i'm sorry for my english.... i have a program in vb 6 that use one function from c++ dll, it give it SafeArrays as parameteres....all work good.the pb come when i use an activex control with the same code as the program in vb, and this control is used in excel..... the function in c++ have several safearrays as parameters, one of them i can't get it (the c++ can't 'catch' the data) all the other are just arrays of double or of struct, but the pb one is an array of struct witch contain an array Private Type GElement data() As Double S As Double S3 As DoubleEnd TypePrivate arGroupes() As GElement ....RetVal = myCppFunction(arGroupes(),...).....double __declspec(dllexport) CALLBACK myCppFunction(LPSAFEARRAY FAR *saData,....)...GElement HUGEP * arGroupes;...{....SafeArrayAccessData(*saData, (void HUGEP**)&arGroupes); //arGroupe will not contain what it have to ....}
simply_red Posted October 20, 2006 Author Posted October 20, 2006 (edited) i am stupid it's not a pb with safearraythe order was differentPrivate Type GElementdata() As DoubleS As DoubleS3 As DoubleEnd TypePrivate Type GElementS As DoubleS3 As Doubledata() As DoubleEnd Type Edited October 20, 2006 by simply_red
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now