ReactOS 0.4.16-dev-336-gb667d82
apibuf.c File Reference
#include "netapi32.h"
Include dependency graph for apibuf.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netapi32)
 
NET_API_STATUS WINAPI NetApiBufferAllocate (DWORD ByteCount, LPVOID *Buffer)
 
NET_API_STATUS WINAPI NetApiBufferFree (LPVOID Buffer)
 
NET_API_STATUS WINAPI NetApiBufferReallocate (LPVOID OldBuffer, DWORD NewByteCount, LPVOID *NewBuffer)
 
NET_API_STATUS WINAPI NetApiBufferSize (LPVOID Buffer, LPDWORD ByteCount)
 

Function Documentation

◆ NetApiBufferAllocate()

NET_API_STATUS WINAPI NetApiBufferAllocate ( DWORD  ByteCount,
LPVOID Buffer 
)

Definition at line 28 of file apibuf.c.

29{
30 TRACE("(%d, %p)\n", ByteCount, Buffer);
31
32 if (Buffer == NULL) return ERROR_INVALID_PARAMETER;
34 if (*Buffer)
35 return NERR_Success;
36 else
37 return GetLastError();
38}
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define HeapAlloc
Definition: compat.h:733
#define NERR_Success
Definition: lmerr.h:5
#define TRACE(s)
Definition: solgame.cpp:4
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1099

Referenced by AllocateEnumContext(), BuildAliasInfoBuffer(), BuildGroupInfoBuffer(), BuildSidFromSidAndRid(), BuildSidListFromDomainAndName(), BuildUserInfoBuffer(), DsAddressToSiteNamesA(), DsAddressToSiteNamesExA(), DsAddressToSiteNamesExW(), DsAddressToSiteNamesW(), DsEnumerateDomainTrustsA(), DsGetDcNameWithAccountA(), DsGetDcSiteCoverageA(), DsGetDcSiteCoverageW(), GetUserPrivileges(), NetEnumerateComputerNames(), NetGetDCName(), NetGroupEnum(), NetGroupGetUsers(), NetLocalGroupEnum(), NetLocalGroupGetMembers(), NetpAllocAnsiStrFromWStr(), NetpAllocStrFromWStr(), NetpAllocWStrFromAnsiStr(), NetpAllocWStrFromStr(), NetpAllocWStrFromWStr(), NetpGetComputerName(), NetUserChangePassword(), NetUserGetLocalGroups(), NetUserModalsGet(), NetWkstaUserGetInfo(), and WkstaEnumAdaptersCallback().

◆ NetApiBufferFree()

NET_API_STATUS WINAPI NetApiBufferFree ( LPVOID  Buffer)

Definition at line 43 of file apibuf.c.

44{
45 TRACE("(%p)\n", Buffer);
47 return NERR_Success;
48}
#define HeapFree(x, y, z)
Definition: compat.h:735

Referenced by _tmain(), AddGroupToUser(), AddUsersToGroup(), AllSysInfo(), BuildAliasInfoBuffer(), BuildGroupInfoBuffer(), BuildSidListFromDomainAndName(), BuildUserInfoBuffer(), cmdAccounts(), cmdConfig(), cmdUser(), DisplayGroup(), DisplayLocalGroup(), DisplayServerConfig(), DisplayServerStatistics(), DisplayShare(), DisplayUser(), DisplayWorkstationConfig(), DisplayWorkstationStatistics(), DsAddressToSiteNamesA(), DsAddressToSiteNamesExA(), DsDeregisterDnsHostRecordsA(), DsEnumerateDomainTrustsA(), DsGetDcNameWithAccountA(), DsGetDcSiteCoverageA(), DsGetSiteNameA(), EnumerateGroups(), EnumerateLocalGroups(), EnumerateShares(), EnumerateUsers(), EnumSessions(), FreeEnumContext(), GetGeneralGroupData(), GetUserGeneralData(), GetUserPrivileges(), GetUserProfileData(), InitGroupMembersList(), InitUserGroupsList(), NetGetDCName(), NetGroupEnum(), NetGroupGetUsers(), NetIDPageProc(), NetLocalGroupAddMembers(), NetLocalGroupDelMembers(), NetLocalGroupEnum(), NetLocalGroupGetMembers(), NetpAllocAnsiStrFromWStr(), NetpAllocStrFromWStr(), NetpAllocWStrFromAnsiStr(), NetpAllocWStrFromStr(), NetpGetComputerName(), NetUserChangePassword(), NetUserGetLocalGroups(), NetWkstaUserGetInfo(), ntlm_InitializeSecurityContextW(), PrintAllJobs(), PrintJobDetails(), SetUserGeneralData(), SetUserProfileData(), UpdateGroupProperties(), UpdateGroupsList(), UpdateUserProperties(), UpdateUsersList(), and UserMembershipPageProc().

◆ NetApiBufferReallocate()

NET_API_STATUS WINAPI NetApiBufferReallocate ( LPVOID  OldBuffer,
DWORD  NewByteCount,
LPVOID NewBuffer 
)

Definition at line 53 of file apibuf.c.

55{
56 TRACE("(%p, %d, %p)\n", OldBuffer, NewByteCount, NewBuffer);
57 if (NewByteCount)
58 {
59 if (OldBuffer)
60 *NewBuffer = HeapReAlloc(GetProcessHeap(), 0, OldBuffer, NewByteCount);
61 else
62 *NewBuffer = HeapAlloc(GetProcessHeap(), 0, NewByteCount);
63 return *NewBuffer ? NERR_Success : GetLastError();
64 }
65 else
66 {
67 if (!HeapFree(GetProcessHeap(), 0, OldBuffer))
68 return GetLastError();
69 *NewBuffer = 0;
70 return NERR_Success;
71 }
72}
#define HeapReAlloc
Definition: compat.h:734

Referenced by NetpGetComputerName(), and NetWkstaUserGetInfo().

◆ NetApiBufferSize()

NET_API_STATUS WINAPI NetApiBufferSize ( LPVOID  Buffer,
LPDWORD  ByteCount 
)

Definition at line 77 of file apibuf.c.

78{
79 DWORD dw;
80
81 TRACE("(%p, %p)\n", Buffer, ByteCount);
82 if (Buffer == NULL)
85 TRACE("size: %d\n", dw);
86 if (dw != 0xFFFFFFFF)
87 *ByteCount = dw;
88 else
89 *ByteCount = 0;
90
91 return NERR_Success;
92}
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID LPVOID DWORD_PTR dw
Definition: atlbase.h:40
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netapi32  )