From 5647deccb1372b4ea478b34814e304ae8962f282 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 13 Apr 2008 19:04:18 +0200 Subject: libnetapi: add NetQueryDisplayInformation skeleton. Guenther (This used to be commit 6ec4a62b6d584f6745c3285474372f235614b598) --- source3/lib/netapi/libnetapi.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'source3/lib/netapi/libnetapi.c') diff --git a/source3/lib/netapi/libnetapi.c b/source3/lib/netapi/libnetapi.c index fd1802f99f..e71adc6893 100644 --- a/source3/lib/netapi/libnetapi.c +++ b/source3/lib/netapi/libnetapi.c @@ -585,3 +585,55 @@ NET_API_STATUS NetUserEnum(const char * server_name /* [in] [unique] */, return r.out.result; } +/**************************************************************** + NetQueryDisplayInformation +****************************************************************/ + +NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */, + uint32_t level /* [in] */, + uint32_t idx /* [in] */, + uint32_t entries_requested /* [in] */, + uint32_t prefmaxlen /* [in] */, + uint32_t *entries_read /* [out] [ref] */, + void **buffer /* [out] [noprint,ref] */) +{ + struct NetQueryDisplayInformation r; + struct libnetapi_ctx *ctx = NULL; + NET_API_STATUS status; + WERROR werr; + + status = libnetapi_getctx(&ctx); + if (status != 0) { + return status; + } + + /* In parameters */ + r.in.server_name = server_name; + r.in.level = level; + r.in.idx = idx; + r.in.entries_requested = entries_requested; + r.in.prefmaxlen = prefmaxlen; + + /* Out parameters */ + r.out.entries_read = entries_read; + r.out.buffer = buffer; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(NetQueryDisplayInformation, &r); + } + + if (LIBNETAPI_LOCAL_SERVER(server_name)) { + werr = NetQueryDisplayInformation_l(ctx, &r); + } else { + werr = NetQueryDisplayInformation_r(ctx, &r); + } + + r.out.result = W_ERROR_V(werr); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(NetQueryDisplayInformation, &r); + } + + return r.out.result; +} + -- cgit