ldap_modify argument mod_val problem in C++?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hai,
i am using ldap_modify function to change attribute value using C++...
msgid=ldap_modify_ext_s( ld, dnNameval, ldapmod ,NULL,NULL );
the problem is mod_val argument in that function...
LDAP *id;
dnNameval ="distinguised name";
In the ldapmod have 3 values...
1.mod_type="which attribute want to change";
2.mod_op=LDAP_MOD_REPLACE;
3. ldapmod has struct...
<br/>


<pre style="margin-right:1em; line-height:1.4; background-color:#eeeeee; border:1px solid rgb(204,204,204); color:#444444 typedef struct ldapmod {
int mod_op;
char *mod_type;
union {
char **modv_strvals;
struct berval **modv_bvals;
} mod_vals;
#define mod_values mod_vals.modv_strvals
#define mod_bvalues mod_vals.modv_bvals
} LDAPMod;[/code]
i had pass value in the format of mod_vals=(PWCHAR*){"bala",Null};
the error is
error C2679: binary = : no operator found which takes a right-hand operand of type PWCHAR * (or there is no acceptable conversion) <span class="x_Apple-tab-span" style="white-space:pre
<br/>


i had pass value also in the format:
<span class="x_Apple-tab-span" style="white-space:pre mod_vals.modv_strvals=(PWCHAR*) Password1;<br/>
<span class="x_Apple-tab-span" style="white-space:pre mod_vals.modv_bvals=NULL;

that array has a null value...
Can,anyone help me,how to pass the values in that variable..and shall i had any header file to my program...
i already using winldap.h header...
and i didnt know which type of forum,i should submit...
Thanks in advance
Sanju

View the full article
 
Back
Top