Olivier CLERE wrote:
> Here is the C code you asked me:
I'm quoting this to the list because there might be people there who can
help you better. I do not quite understand why you reply only to me.
> /*
> typedef struct berval {
> unsigned long bv_len;
> char *bv_val;
> };
>
> typedef struct ldapcontrol {
> char *ldctl_oid;
> struct berval ldctl_value;
> char ldctl_iscritical;
> } LDAPControl, *PLDAPControl;
> */
>
> In C:
> ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, tppldapctrl)
>
> In Perl:
> ldap_set_option($ld,LDAP_OPT_SERVER_CONTROLS,@tableau);
>
> ldap_set_option is a C function that belongs to LDAP SDK API and
> that is used through Perldap.
I have no experience at all, but perhaps someone else on the list does.
Please consult the documentation for PerLDAP and its ldap_set_option
function to determine what kind of structure is required for the third
parameter. Then, if you still have difficulty, ask again on the list with
details (e.g. "I need an array of references to hashes" or "I need to pack
an integer, a string, and a character into a string" or whatever).
> In Perl the type of @tableau should be an integer, which is
> surprising.
I can imagine. I do not understand the above sentence, since an array cannot
be an integer. But I do not have the documentation to PerLDAP, so I cannot
help you further.
> It works in C, it does not work in Perl as the navigator
> gives an error.
What do you mean with "the navigator"? I don't know anything with that name.
And what is the text of the error message?
> The function ldap_set_option works both in C and Perl but with
> another type of control. Here is the code:
>
> Perl:
> ldap_set_option($ld,LDAP_OPT_PROTOCOL_VERSION,LDAP_VERSION3);
>
> C:
> version = LDAP_VERSION3;
> ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version );
>
> The aim of my application is to communicate a port number to another
> computer which admits ldap requests. Thus, I have to put this
> port number in a LDAP request (called the bind request).
>
> I hope you can help me,
With what I have read so far, I cannot. But maybe someone else on the list
can. I encourage you to send your questions and responses to the list (or to
the list and the person you are responding to), rather than just to the
person you are responding to.
Cheers,
Philip
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]