active directory - Getting Different values of VARIANT in VC++ -
i querying active directory c++. have bind iads object server , able retrieve user information. using variant data type retrieve objects. of object bstr strings. attributes badpwdcount, pwdlastset,logoncount not. hence not able retrieve values. please me this.
variant var; hr=testiad->get(query,&vari); if(hr==0) { printf(%s\n\n", v_bstr(&vari)); }
here don't know how use variant print data types other bstr.
variant
has member named vt
indicates value type contains. instance if vt
set vt_unknown
variant contains pointer iunknown interface can set or retrieved using punkval
member.
variant v; getvalueasvariant(&v); if(v.vt == vt_unknown) { iunknown *i = vt.punkval; // ... ... i->release(); }
Comments
Post a Comment