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(); } 

there list of variant types available on msdn website


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -