SafeArrayCreateVector does not set FADF_HAVEVARTYPE


C

cricketj55

In Windows 2000 if you call SafeArrayCreateVector, the returned
SAFEARRAY does not have the FADF_HAVEVARTYPE set in the fFeatures word.

For example,

SAFEARRAY *psa1 = ::SafeArrayCreateVector( VT_VARIANT, 0, 1 );
SAFEARRAY *psa2 = ::SafeArrayCreateVectorEx( VT_VARIANT, 0, 1, NULL );

psa1->fFeatures == 0x2800 // no FADF_HAVEVARTYPE
but
psa2->fFeatures == 0x2880 // has FADF_HAVEVARTYPE

Under Windows XP and 2003, both SafeArrayCreateVector and
SafeArrayCreateVectorEx will set the FADF_HAVEVARTYPE flag.

SafeArrayGetVartype() will fail without the FADF_HAVEVARTYPE flag.

thanks,

cj
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top