Bonjour je veux exporter un UDT VBA vers C++, j'y arrive, mais je ne sais pas comment acceder aux champs de mon UDT
ma struct cpp
struct DATA
{
long struct_x;
BSTR struct_y;
}; ma fonction d'import cpp
void
__stdcall ImportUDT(SAFEARRAY **tableau)
{
DATA *elt;
HRESULT ret;
unsignedlong i;
if ((ret = SafeArrayAccessData(*tableau,(void **) &elt))==S_OK)
{
for (i = 0; i < (*tableau)->rgsabound->cElements; i++)
{
//code comme par exemple
elt[i].struct_x = 0 ;//ce qu'il y a dans le i eme element de *tableau au champs UDT_x (cf type vba en dessous)
elt[i].struct_y = "" ;//ce qu'il y a dans le tableau
}
SafeArrayUnaccessData(*tableau);
}
} (*tableau) est un tableau d'element d'un type bien particulier implementé en VBA
Private Type MonUDT
UDT_x As Long
UDT_y As String
End Type
comment puis acceder aux champs UDT_x et UDT_y contenus dans (*tableau) ???

wis : in tartiflette I trust (like the others)
