Toon posts:

[C++] Array (VARIANT-type)

Pagina: 1
Acties:

Verwijderd

Topicstarter
varData.vt <-- dit is het type van de variant
als dit nu VT_ARRAY | VT_UI1 (byte-array) is...

[DE vraag :p] Hoe kan ik dan de LENGTE van die bytearray zien? Of is dit niet mogelijk?

Verwijderd

Topicstarter
zou dat lukken met:
sizeof(varData.parray) / sizeof(varData.parray[0]) ?

Ik kwam juist op dit ideetje :D *nu zien offet wilt werken*

  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Nee.

Professionele website nodig?


Verwijderd

[DE vraag :p] Hoe kan ik dan de LENGTE van die bytearray zien? Of is dit niet mogelijk?
Kan je je vraag iets duidelijker formuleren? Je hebt blijkbaar een bytearray en ik neem aan dat dit een 'native' array is (zoals char[]). Van dit soort arrays wordt geen lengte bijgehouden, dat zul je zelf moeten doen op het moment dat deze array aangemaakt wordt.

Verwijderd

Topicstarter
the parray in the VARIANT datatype is declared as: "SAFEARRAY __RPC_FAR *parray;"

so i can easily get the lower & higher bounds... Do - & I got the length ;) easy :D

  • MSalters
  • Registratie: Juni 2001
  • Laatst online: 21-08 17:14
Zet er eens bij wat je bedoelt. Je hebt waarschijnlijk de Microsoft COM VARIANT.
Dan is heb je een union, elk union member komt overeen met een type. Voor elk array type is er een union member met een pointer en een count member

Man hopes. Genius creates. Ralph Waldo Emerson
Never worry about theory as long as the machinery does what it's supposed to do. R. A. Heinlein


  • madwizard
  • Registratie: Juli 2002
  • Laatst online: 26-10-2024

madwizard

Missionary to the word of ska

PSDK:
VT_ARRAY | <anything>
An array of data type <anything> was passed. (VT_EMPTY and VT_NULL are invalid types to combine with VT_ARRAY.) The pointer in pparray points to an array descriptor, which describes the dimensions, size, and in-memory location of the array. The array descriptor is never accessed directly, but instead is read and modified using the functions described in Conversion and Manipulation Functions.
Conversion and Manipulation Functions brengt je naar dat topic en die verwijst weer naar Array Manipulation API Functions. Daar staat vast wel wat tussen.

www.madwizard.org

Pagina: 1