Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 23 +++++++++++++++++------ dlls/adsldp/schema.c | 2 ++ 2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 8897545e4f..5504a376ba 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1478,26 +1478,37 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex }
case ADSTYPE_INTEGER: + case ADSTYPE_LARGE_INTEGER: { - WCHAR **values = ldap_get_valuesW(ldap->ld, ldap_ctx->entry, name); + struct berval **values = ldap_get_values_lenW(ldap->ld, ldap_ctx->entry, name); if (!values) return E_ADS_COLUMN_NOT_SET; - count = ldap_count_valuesW(values); + count = ldap_count_values_len(values);
col->pADsValues = heap_alloc_zero(count * sizeof(col->pADsValues[0])); if (!col->pADsValues) { - ldap_value_freeW(values); + ldap_value_free_len(values); return E_OUTOFMEMORY; }
for (i = 0; i < count; i++) { - col->pADsValues[i].u.Integer = wcstol(values[i], NULL, 10); - TRACE("%s => %d\n", debugstr_w(values[i]), col->pADsValues[i].u.Integer); + col->pADsValues[i].dwType = type; + + if (type == ADSTYPE_LARGE_INTEGER) + { + col->pADsValues[i].u.LargeInteger.QuadPart = _atoi64(values[i]->bv_val); + TRACE("%s => %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), wine_dbgstr_longlong(col->pADsValues[i].u.LargeInteger.QuadPart)); + } + else + { + col->pADsValues[i].u.Integer = atol(values[i]->bv_val); + TRACE("%s => %d\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer); + } }
- ldap_value_freeW(values); + ldap_value_free_len(values); col->hReserved = NULL; break; } diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c index 6965dc3274..e997c6f98e 100644 --- a/dlls/adsldp/schema.c +++ b/dlls/adsldp/schema.c @@ -101,6 +101,8 @@ ADSTYPEENUM get_schema_type(const WCHAR *name, const struct attribute_type *at, return ADSTYPE_CASE_IGNORE_STRING; if (!wcscmp(type->syntax, L"1.3.6.1.4.1.1466.115.121.1.40")) return ADSTYPE_OCTET_STRING; + if (!wcscmp(type->syntax, L"1.2.840.113556.1.4.906")) + return ADSTYPE_LARGE_INTEGER; if (!wcscmp(type->syntax, L"1.2.840.113556.1.4.907")) return ADSTYPE_NT_SECURITY_DESCRIPTOR;