ReactOS  0.4.15-dev-439-g292f67a
wksta_new.c File Reference
#include "netapi32.h"
#include "wkssvc_c.h"
Include dependency graph for wksta_new.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netapi32)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T len)
 
void __RPC_USER midl_user_free (void __RPC_FAR *ptr)
 
handle_t __RPC_USER WKSSVC_IDENTIFY_HANDLE_bind (WKSSVC_IDENTIFY_HANDLE pszSystemName)
 
void __RPC_USER WKSSVC_IDENTIFY_HANDLE_unbind (WKSSVC_IDENTIFY_HANDLE pszSystemName, handle_t hBinding)
 
handle_t __RPC_USER WKSSVC_IMPERSONATE_HANDLE_bind (WKSSVC_IMPERSONATE_HANDLE pszSystemName)
 
void __RPC_USER WKSSVC_IMPERSONATE_HANDLE_unbind (WKSSVC_IMPERSONATE_HANDLE pszSystemName, handle_t hBinding)
 
NET_API_STATUS NetpBind (LPCWSTR pszServerName, handle_t *pBindingHandle)
 
NET_API_STATUS NetpUnbind (handle_t BindingHandle)
 
NET_API_STATUS WINAPI NetAddAlternateComputerName (_In_opt_ LPCWSTR Server, _In_ LPCWSTR AlternateName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
 
NET_API_STATUS WINAPI NetEnumerateComputerNames (_In_opt_ LPCWSTR Server, _In_ NET_COMPUTER_NAME_TYPE NameType, _In_ ULONG Reserved, _Out_ PDWORD EntryCount, _Out_ LPWSTR **ComputerNames)
 
NET_API_STATUS WINAPI NetGetJoinInformation (_In_ LPCWSTR lpServer, _Out_ LPWSTR *lpNameBuffer, _Out_ PNETSETUP_JOIN_STATUS BufferType)
 
NET_API_STATUS WINAPI NetGetJoinableOUs (_In_opt_ LPCWSTR lpServer, _In_ LPCWSTR lpDomain, _In_opt_ LPCWSTR lpAccount, _In_opt_ LPCWSTR lpPassword, _Out_ DWORD *OUCount, _Out_ LPWSTR **OUs)
 
NET_API_STATUS WINAPI NetJoinDomain (_In_opt_ LPCWSTR lpServer, _In_ LPCWSTR lpDomain, _In_opt_ LPCWSTR lpAccountOU, _In_opt_ LPCWSTR lpAccount, _In_opt_ LPCWSTR lpPassword, _In_ DWORD fJoinOptions)
 
NET_API_STATUS WINAPI NetRemoveAlternateComputerName (_In_opt_ LPCWSTR Server, _In_ LPCWSTR AlternateName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
 
NET_API_STATUS WINAPI NetRenameMachineInDomain (_In_opt_ LPCWSTR lpServer, _In_opt_ LPCWSTR lpNewMachineName, _In_opt_ LPCWSTR lpAccount, _In_opt_ LPCWSTR lpPassword, _In_ DWORD fRenameOptions)
 
NET_API_STATUS WINAPI NetSetPrimaryComputerName (_In_opt_ LPCWSTR Server, _In_ LPCWSTR PrimaryName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
 
NET_API_STATUS WINAPI NetUnjoinDomain (_In_opt_ LPCWSTR lpServer, _In_opt_ LPCWSTR lpAccount, _In_opt_ LPCWSTR lpPassword, _In_ DWORD fUnjoinOptions)
 
NET_API_STATUS WINAPI NetUseAdd (_In_ LMSTR UncServerName, _In_ DWORD Level, _In_ LPBYTE Buf, _Out_ LPDWORD ParmError)
 
NET_API_STATUS WINAPI NetUseDel (_In_ LMSTR UncServerName, _In_ LMSTR UseName, _In_ DWORD ForceCond)
 
NET_API_STATUS WINAPI NetUseEnum (_In_ LMSTR UncServerName, _In_ DWORD Level, _Out_ LPBYTE *BufPtr, _In_ DWORD PreferedMaximumSize, _Out_ LPDWORD EntriesRead, _Out_ LPDWORD TotalEntries, _Inout_ LPDWORD ResumeHandle)
 
NET_API_STATUS WINAPI NetUseGetInfo (_In_ LMSTR UncServerName, _In_ LMSTR UseName, _In_ DWORD Level, _Out_ LPBYTE *BufPtr)
 
NET_API_STATUS WINAPI NetValidateName (_In_opt_ LPCWSTR lpServer, _In_ LPCWSTR lpName, _In_opt_ LPCWSTR lpAccount, _In_opt_ LPCWSTR lpPassword, _In_ NETSETUP_NAME_TYPE NameType)
 
NET_API_STATUS WINAPI NetWkstaSetInfo (_In_ LPWSTR servername, _In_ DWORD level, _In_ LPBYTE buffer, _Out_ LPDWORD parm_err)
 
NET_API_STATUS WINAPI NetWkstaTransportAdd (_In_opt_ LPWSTR servername, _In_ DWORD level, _In_ LPBYTE buf, _Out_ LPDWORD parm_err)
 
NET_API_STATUS WINAPI NetWkstaTransportDel (_In_opt_ LPWSTR servername, _In_ LPWSTR transportname, _In_ DWORD ucond)
 
NET_API_STATUS WINAPI NetWkstaUserSetInfo (LPWSTR reserved, _In_ DWORD level, _In_ LPBYTE buf, _Out_ LPDWORD parm_err)
 

Function Documentation

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  len)

Definition at line 19 of file wksta_new.c.

20 {
22 }
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLenum GLsizei len
Definition: glext.h:6722
#define HEAP_ZERO_MEMORY
Definition: compat.h:123

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR ptr)

Definition at line 25 of file wksta_new.c.

26 {
28 }
static PVOID ptr
Definition: dispmode.c:27
#define GetProcessHeap()
Definition: compat.h:404
#define HeapFree(x, y, z)
Definition: compat.h:403

◆ NetAddAlternateComputerName()

NET_API_STATUS WINAPI NetAddAlternateComputerName ( _In_opt_ LPCWSTR  Server,
_In_ LPCWSTR  AlternateName,
_In_opt_ LPCWSTR  DomainAccount,
_In_opt_ LPCWSTR  DomainAccountPassword,
_In_ ULONG  Reserved 
)

Definition at line 207 of file wksta_new.c.

213 {
214  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
217 
218  TRACE("NetAddAlternateComputerName(%s %s %s %s 0x%lx)\n",
219  debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount),
220  debugstr_w(DomainAccountPassword), Reserved);
221 
222  /* FIXME */
223 
225  &BindingHandle);
226  if (status != NERR_Success)
227  {
228  ERR("NetpBind() failed (status 0x%lx)\n", status);
229  return status;
230  }
231 
233  {
235  (PWSTR)Server,
236  (PWSTR)AlternateName,
237  (PWSTR)DomainAccount,
238  EncryptedPassword,
239  Reserved);
240  }
242  {
244  }
245  RpcEndExcept;
246 
248 
249  return status;
250 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
unsigned long __stdcall NetrAddAlternateComputerName(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *AlternateName, wchar_t *DomainAccount, PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword, unsigned long Reserved)
Definition: rpcserver.c:490
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
static void Server(int port)
Definition: srltest.c:69
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetEnumerateComputerNames()

NET_API_STATUS WINAPI NetEnumerateComputerNames ( _In_opt_ LPCWSTR  Server,
_In_ NET_COMPUTER_NAME_TYPE  NameType,
_In_ ULONG  Reserved,
_Out_ PDWORD  EntryCount,
_Out_ LPWSTR **  ComputerNames 
)

Definition at line 255 of file wksta_new.c.

261 {
262  PNET_COMPUTER_NAME_ARRAY ComputerNameArray = NULL;
263  ULONG BufferSize, i;
264  PWSTR *NameBuffer = NULL, Ptr;
266 
267  TRACE("NetEnumerateComputerNames(%s %lu %lu %p %p)\n",
268  debugstr_w(Server), NameType, Reserved, EntryCount, ComputerNames);
269 
271  {
273  NameType,
274  Reserved,
275  &ComputerNameArray);
276  if (status == NERR_Success)
277  {
278  *EntryCount = ComputerNameArray->EntryCount;
279 
280  BufferSize = 0;
281  for (i = 0; i < ComputerNameArray->EntryCount; i++)
282  {
283  BufferSize += ComputerNameArray->ComputerNames[i].Length + sizeof(WCHAR) + sizeof(PWSTR);
284  }
285 
286  status = NetApiBufferAllocate(BufferSize, (PVOID*)&NameBuffer);
287  if (status == NERR_Success)
288  {
289  ZeroMemory(NameBuffer, BufferSize);
290 
291  Ptr = (PWSTR)((ULONG_PTR)NameBuffer + ComputerNameArray->EntryCount * sizeof(PWSTR));
292  for (i = 0; i < ComputerNameArray->EntryCount; i++)
293  {
294  NameBuffer[i] = Ptr;
295  CopyMemory(Ptr,
296  ComputerNameArray->ComputerNames[i].Buffer,
297  ComputerNameArray->ComputerNames[i].Length);
298  Ptr = (PWSTR)((ULONG_PTR)Ptr + ComputerNameArray->ComputerNames[i].Length + sizeof(WCHAR));
299  }
300 
301  *ComputerNames = NameBuffer;
302  }
303  }
304  }
306  {
308  }
309  RpcEndExcept;
310 
311  return status;
312 }
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
Definition: apibuf.c:28
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define ZeroMemory
Definition: winbase.h:1648
static void Server(int port)
Definition: srltest.c:69
#define NERR_Success
Definition: lmerr.h:5
uint32_t ULONG_PTR
Definition: typedefs.h:64
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned long EntryCount
Definition: wkssvc.idl:346
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CopyMemory
Definition: winbase.h:1646
#define BufferSize
Definition: classpnp.h:419
PUNICODE_STRING ComputerNames
Definition: wkssvc.idl:347
unsigned int ULONG
Definition: retypes.h:1
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 NameType
Definition: acpixf.h:654
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
unsigned long __stdcall NetrEnumerateComputerNames(WKSSVC_IMPERSONATE_HANDLE ServerName, NET_COMPUTER_NAME_TYPE NameType, unsigned long Reserved, PNET_COMPUTER_NAME_ARRAY *ComputerNames)
Definition: rpcserver.c:538
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetGetJoinableOUs()

NET_API_STATUS WINAPI NetGetJoinableOUs ( _In_opt_ LPCWSTR  lpServer,
_In_ LPCWSTR  lpDomain,
_In_opt_ LPCWSTR  lpAccount,
_In_opt_ LPCWSTR  lpPassword,
_Out_ DWORD OUCount,
_Out_ LPWSTR **  OUs 
)

Definition at line 348 of file wksta_new.c.

355 {
356  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
359 
360  TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n",
361  debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccount),
362  debugstr_w(lpPassword), OUCount, OUs);
363 
364  /* FIXME */
365 
366  status = NetpBind(lpServer,
367  &BindingHandle);
368  if (status != NERR_Success)
369  {
370  ERR("NetpBind() failed (status 0x%lx)\n", status);
371  return status;
372  }
373 
375  {
377  (PWSTR)lpServer,
378  (PWSTR)lpDomain,
379  (PWSTR)lpAccount,
380  EncryptedPassword,
381  OUCount,
382  OUs);
383  }
385  {
387  }
388  RpcEndExcept;
389 
391 
392  return status;
393 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
unsigned long __stdcall NetrGetJoinableOUs2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *DomainNameParam, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, unsigned long *OUCount, wchar_t ***OUs)
Definition: rpcserver.c:473
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetGetJoinInformation()

NET_API_STATUS WINAPI NetGetJoinInformation ( _In_ LPCWSTR  lpServer,
_Out_ LPWSTR lpNameBuffer,
_Out_ PNETSETUP_JOIN_STATUS  BufferType 
)

Definition at line 317 of file wksta_new.c.

321 {
323 
324  TRACE("NetGetJoinInformation(%s %p %p)\n",
325  debugstr_w(lpServer), lpNameBuffer, BufferType);
326 
327  if (lpNameBuffer == NULL || BufferType == NULL)
329 
331  {
333  lpNameBuffer,
334  BufferType);
335  }
337  {
339  }
340  RpcEndExcept;
341 
342  return status;
343 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define RpcEndExcept
Definition: rpc.h:128
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
static LPSTR lpNameBuffer
Definition: secur32.c:50
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrGetJoinInformation(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t **NameBuffer, PNETSETUP_JOIN_STATUS BufferType)
Definition: rpcserver.c:362
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

Referenced by AllSysInfo(), and GetComputerNames().

◆ NetJoinDomain()

NET_API_STATUS WINAPI NetJoinDomain ( _In_opt_ LPCWSTR  lpServer,
_In_ LPCWSTR  lpDomain,
_In_opt_ LPCWSTR  lpAccountOU,
_In_opt_ LPCWSTR  lpAccount,
_In_opt_ LPCWSTR  lpPassword,
_In_ DWORD  fJoinOptions 
)

Definition at line 398 of file wksta_new.c.

405 {
406  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
409 
410  FIXME("NetJoinDomain(%s %s %s %s 0x%lx)\n",
411  debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccountOU),
412  debugstr_w(lpAccount), debugstr_w(lpPassword), fJoinOptions);
413 
414  /* FIXME */
415 
416  status = NetpBind(lpServer,
417  &BindingHandle);
418  if (status != NERR_Success)
419  {
420  ERR("NetpBind() failed (status 0x%lx)\n", status);
421  return status;
422  }
423 
425  {
427  (PWSTR)lpServer,
428  (PWSTR)lpDomain,
429  (PWSTR)lpAccountOU,
430  (PWSTR)lpAccount,
431  EncryptedPassword,
432  fJoinOptions);
433  }
435  {
436  RPC_STATUS rpcStatus = RpcExceptionCode();
437  FIXME("Exception 0x%lx\n", rpcStatus);
438  status = I_RpcMapWin32Status(rpcStatus);
439  }
440  RpcEndExcept;
441 
443 
444  return status;
445 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
#define NERR_Success
Definition: lmerr.h:5
long RPC_STATUS
Definition: rpc.h:52
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
unsigned long __stdcall NetrJoinDomain2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *DomainNameParam, wchar_t *MachineAccountOU, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, unsigned long Options)
Definition: rpcserver.c:391
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetpBind()

NET_API_STATUS NetpBind ( LPCWSTR  pszServerName,
handle_t pBindingHandle 
)

Definition at line 142 of file wksta_new.c.

145 {
147  LPWSTR pszStringBinding;
149 
150  FIXME("NetpBind(%S)\n", pszServerName);
151 
152  *pBindingHandle = NULL;
153 
155  L"ncacn_np",
156  (LPWSTR)pszServerName,
157  L"\\pipe\\wkssvc",
158  NULL,
159  &pszStringBinding);
160  if (status)
161  {
162  FIXME("RpcStringBindingCompose returned 0x%x\n", status);
164  }
165 
166  /* Set the binding handle that will be used to bind to the server. */
167  status = RpcBindingFromStringBindingW(pszStringBinding,
168  &hBinding);
169  if (status)
170  {
171  FIXME("RpcBindingFromStringBinding returned 0x%x\n", status);
172  }
173 
174  status = RpcStringFreeW(&pszStringBinding);
175  if (status)
176  {
177  FIXME("RpcStringFree returned 0x%x\n", status);
178  }
179 
180  *pBindingHandle = hBinding;
181 
183 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:876
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:174
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
long RPC_STATUS
Definition: rpc.h:52
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
NET_API_STATUS WINAPI NetpNtStatusToApiStatus(_In_ NTSTATUS Status)
Definition: misc.c:289
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by NetAddAlternateComputerName(), NetGetJoinableOUs(), NetJoinDomain(), NetRemoveAlternateComputerName(), NetRenameMachineInDomain(), NetSetPrimaryComputerName(), NetUnjoinDomain(), and NetValidateName().

◆ NetpUnbind()

NET_API_STATUS NetpUnbind ( handle_t  BindingHandle)

Definition at line 187 of file wksta_new.c.

189 {
191 
192  FIXME("NetpUnbind(%p)\n", BindingHandle);
193 
195  if (status)
196  {
197  TRACE("RpcBindingFree returned 0x%x\n", status);
199  }
200 
201  return NERR_Success;
202 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
handle_t hBinding
Definition: ctx_c.c:54
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
#define NERR_Success
Definition: lmerr.h:5
long RPC_STATUS
Definition: rpc.h:52
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
NET_API_STATUS WINAPI NetpNtStatusToApiStatus(_In_ NTSTATUS Status)
Definition: misc.c:289
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by NetAddAlternateComputerName(), NetGetJoinableOUs(), NetJoinDomain(), NetRemoveAlternateComputerName(), NetRenameMachineInDomain(), NetSetPrimaryComputerName(), NetUnjoinDomain(), and NetValidateName().

◆ NetRemoveAlternateComputerName()

NET_API_STATUS WINAPI NetRemoveAlternateComputerName ( _In_opt_ LPCWSTR  Server,
_In_ LPCWSTR  AlternateName,
_In_opt_ LPCWSTR  DomainAccount,
_In_opt_ LPCWSTR  DomainAccountPassword,
_In_ ULONG  Reserved 
)

Definition at line 450 of file wksta_new.c.

456 {
457  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
460 
461  TRACE("NetRemoveAlternateComputerName(%s %s %s %s 0x%lx)\n",
462  debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount),
463  debugstr_w(DomainAccountPassword), Reserved);
464 
465  /* FIXME */
466 
468  &BindingHandle);
469  if (status != NERR_Success)
470  {
471  ERR("NetpBind() failed (status 0x%lx)\n", status);
472  return status;
473  }
474 
476  {
478  (PWSTR)Server,
479  (PWSTR)AlternateName,
480  (PWSTR)DomainAccount,
481  EncryptedPassword,
482  Reserved);
483  }
485  {
487  }
488  RpcEndExcept;
489 
491 
492  return status;
493 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
static void Server(int port)
Definition: srltest.c:69
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
unsigned long __stdcall NetrRemoveAlternateComputerName(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *AlternateName, wchar_t *DomainAccount, PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword, unsigned long Reserved)
Definition: rpcserver.c:506
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetRenameMachineInDomain()

NET_API_STATUS WINAPI NetRenameMachineInDomain ( _In_opt_ LPCWSTR  lpServer,
_In_opt_ LPCWSTR  lpNewMachineName,
_In_opt_ LPCWSTR  lpAccount,
_In_opt_ LPCWSTR  lpPassword,
_In_ DWORD  fRenameOptions 
)

Definition at line 498 of file wksta_new.c.

504 {
505  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
508 
509  TRACE("NetRenameMachineInDomain(%s %s %s %s 0x%lx)\n",
510  debugstr_w(lpServer), debugstr_w(lpNewMachineName), debugstr_w(lpAccount),
511  debugstr_w(lpPassword), fRenameOptions);
512 
513  /* FIXME */
514 
515  status = NetpBind(lpServer,
516  &BindingHandle);
517  if (status != NERR_Success)
518  {
519  ERR("NetpBind() failed (status 0x%lx)\n", status);
520  return status;
521  }
522 
524  {
526  (PWSTR)lpServer,
527  (PWSTR)lpNewMachineName,
528  (PWSTR)lpAccount,
529  EncryptedPassword,
530  fRenameOptions);
531  }
533  {
535  }
536  RpcEndExcept;
537 
539 
540  return status;
541 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
unsigned long __stdcall NetrRenameMachineInDomain2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *MachineName, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, unsigned long Options)
Definition: rpcserver.c:441
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetSetPrimaryComputerName()

NET_API_STATUS WINAPI NetSetPrimaryComputerName ( _In_opt_ LPCWSTR  Server,
_In_ LPCWSTR  PrimaryName,
_In_opt_ LPCWSTR  DomainAccount,
_In_opt_ LPCWSTR  DomainAccountPassword,
_In_ ULONG  Reserved 
)

Definition at line 546 of file wksta_new.c.

552 {
553  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
556 
557  TRACE("NetSetPrimaryComputerName(%s %s %s %s %lu)\n",
558  debugstr_w(Server), debugstr_w(PrimaryName), debugstr_w(DomainAccount),
559  debugstr_w(DomainAccountPassword), Reserved);
560 
561  /* FIXME */
562 
564  &BindingHandle);
565  if (status != NERR_Success)
566  {
567  ERR("NetpBind() failed (status 0x%lx)\n", status);
568  return status;
569  }
570 
572  {
574  (PWSTR)Server,
575  (PWSTR)PrimaryName,
576  (PWSTR)DomainAccount,
577  EncryptedPassword,
578  Reserved);
579  }
581  {
583  }
584  RpcEndExcept;
585 
587 
588  return status;
589 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
static void Server(int port)
Definition: srltest.c:69
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrSetPrimaryComputerName(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *PrimaryName, wchar_t *DomainAccount, PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword, unsigned long Reserved)
Definition: rpcserver.c:522
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetUnjoinDomain()

NET_API_STATUS WINAPI NetUnjoinDomain ( _In_opt_ LPCWSTR  lpServer,
_In_opt_ LPCWSTR  lpAccount,
_In_opt_ LPCWSTR  lpPassword,
_In_ DWORD  fUnjoinOptions 
)

Definition at line 594 of file wksta_new.c.

599 {
600  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
603 
604  TRACE("NetUnjoinDomain(%s %s %s %s 0x%lx)\n",
605  debugstr_w(lpServer), debugstr_w(lpAccount),
606  debugstr_w(lpPassword), fUnjoinOptions);
607 
608  /* FIXME */
609 
610  status = NetpBind(lpServer,
611  &BindingHandle);
612  if (status != NERR_Success)
613  {
614  ERR("NetpBind() failed (status 0x%lx)\n", status);
615  return status;
616  }
617 
619  {
621  (PWSTR)lpServer,
622  (PWSTR)lpAccount,
623  EncryptedPassword,
624  fUnjoinOptions);
625  }
627  {
629  }
630  RpcEndExcept;
631 
633 
634  return status;
635 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrUnjoinDomain2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, unsigned long Options)
Definition: rpcserver.c:426
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetUseAdd()

NET_API_STATUS WINAPI NetUseAdd ( _In_ LMSTR  UncServerName,
_In_ DWORD  Level,
_In_ LPBYTE  Buf,
_Out_ LPDWORD  ParmError 
)

Definition at line 640 of file wksta_new.c.

645 {
647 
648  TRACE("NetUseAdd(%s %d %p %p)\n", debugstr_w(UncServerName),
649  Level, Buf, ParmError);
650 
652  {
653  status = NetrUseAdd(UncServerName,
654  Level,
655  (LPUSE_INFO)Buf,
656  ParmError);
657  }
659  {
661  }
662  RpcEndExcept;
663 
664  return status;
665 }
#define RpcEndExcept
Definition: rpc.h:128
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
unsigned long __stdcall NetrUseAdd(WKSSVC_IMPERSONATE_HANDLE ServerName, unsigned long Level, LPUSE_INFO InfoStruct, unsigned long *ErrorParameter)
Definition: rpcserver.c:197
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetUseDel()

NET_API_STATUS WINAPI NetUseDel ( _In_ LMSTR  UncServerName,
_In_ LMSTR  UseName,
_In_ DWORD  ForceCond 
)

Definition at line 670 of file wksta_new.c.

674 {
676 
677  TRACE("NetUseDel(%s %s %d)\n", debugstr_w(UncServerName),
678  debugstr_w(UseName), ForceCond);
679 
681  {
682  status = NetrUseDel(UncServerName,
683  UseName,
684  ForceCond);
685  }
687  {
689  }
690  RpcEndExcept;
691 
692  return status;
693 }
#define RpcEndExcept
Definition: rpc.h:128
unsigned long __stdcall NetrUseDel(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t *UseName, unsigned long ForceLevel)
Definition: rpcserver.c:225
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetUseEnum()

NET_API_STATUS WINAPI NetUseEnum ( _In_ LMSTR  UncServerName,
_In_ DWORD  Level,
_Out_ LPBYTE BufPtr,
_In_ DWORD  PreferedMaximumSize,
_Out_ LPDWORD  EntriesRead,
_Out_ LPDWORD  TotalEntries,
_Inout_ LPDWORD  ResumeHandle 
)

Definition at line 698 of file wksta_new.c.

706 {
707  USE_ENUM_STRUCT UseEnumInfo;
708  USE_INFO_0_CONTAINER Container0;
709  USE_INFO_1_CONTAINER Container1;
710  USE_INFO_2_CONTAINER Container2;
712 
713  TRACE("NetUseEnum(%s, %d, %p, %d, %p, %p, %p)\n", debugstr_w(UncServerName),
714  Level, BufPtr, PreferedMaximumSize, EntriesRead, TotalEntries, ResumeHandle);
715 
716  UseEnumInfo.Level = Level;
717  switch (Level)
718  {
719  case 0:
720  UseEnumInfo.UseInfo.Level0 = &Container0;
721  Container0.EntriesRead = 0;
722  Container0.Buffer = NULL;
723  break;
724 
725  case 1:
726  UseEnumInfo.UseInfo.Level1 = &Container1;
727  Container1.EntriesRead = 0;
728  Container1.Buffer = NULL;
729  break;
730 
731  case 2:
732  UseEnumInfo.UseInfo.Level2 = &Container2;
733  Container2.EntriesRead = 0;
734  Container2.Buffer = NULL;
735  break;
736 
737  default:
739  }
740 
742  {
743  status = NetrUseEnum(UncServerName,
744  &UseEnumInfo,
745  PreferedMaximumSize,
746  TotalEntries,
747  ResumeHandle);
749  {
750  switch (Level)
751  {
752  case 0:
753  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level0->Buffer;
754  *EntriesRead = UseEnumInfo.UseInfo.Level0->EntriesRead;
755  break;
756 
757  case 1:
758  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level1->Buffer;
759  *EntriesRead = UseEnumInfo.UseInfo.Level1->EntriesRead;
760  break;
761 
762  case 2:
763  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level2->Buffer;
764  *EntriesRead = UseEnumInfo.UseInfo.Level2->EntriesRead;
765  break;
766  }
767  }
768  }
770  {
772  }
773  RpcEndExcept;
774 
775  return status;
776 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
union _USE_ENUM_STRUCT::_USE_ENUM_UNION UseInfo
#define RpcEndExcept
Definition: rpc.h:128
unsigned long EntriesRead
Definition: wkssvc.idl:254
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
#define NERR_Success
Definition: lmerr.h:5
LPUSE_INFO_0 Buffer
Definition: wkssvc.idl:255
unsigned char * LPBYTE
Definition: typedefs.h:53
#define debugstr_w
Definition: kernel32.h:32
LPUSE_INFO_1 Buffer
Definition: wkssvc.idl:261
#define RpcTryExcept
Definition: rpc.h:126
unsigned long EntriesRead
Definition: wkssvc.idl:266
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned long EntriesRead
Definition: wkssvc.idl:260
smooth NULL
Definition: ftsmooth.c:416
LPUSE_INFO_0_CONTAINER Level0
Definition: wkssvc.idl:275
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrUseEnum(WKSSVC_IDENTIFY_HANDLE ServerName, LPUSE_ENUM_STRUCT InfoStruct, unsigned long PreferredMaximumLength, unsigned long *TotalEntries, unsigned long *ResumeHandle)
Definition: rpcserver.c:238
LPUSE_INFO_2 Buffer
Definition: wkssvc.idl:267
#define ERROR_MORE_DATA
Definition: dderror.h:13
LPUSE_INFO_1_CONTAINER Level1
Definition: wkssvc.idl:276
LPUSE_INFO_2_CONTAINER Level2
Definition: wkssvc.idl:277
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetUseGetInfo()

NET_API_STATUS WINAPI NetUseGetInfo ( _In_ LMSTR  UncServerName,
_In_ LMSTR  UseName,
_In_ DWORD  Level,
_Out_ LPBYTE BufPtr 
)

Definition at line 781 of file wksta_new.c.

786 {
788 
789  TRACE("NetUseGetInfo(%s, %s, %d, %p)\n", debugstr_w(UncServerName),
790  debugstr_w(UseName), Level, BufPtr);
791 
792  *BufPtr = NULL;
793 
795  {
796  status = NetrUseGetInfo(UncServerName,
797  UseName,
798  Level,
799  (LPUSE_INFO)BufPtr);
800  }
802  {
804  }
805  RpcEndExcept;
806 
807  return status;
808 }
#define RpcEndExcept
Definition: rpc.h:128
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrUseGetInfo(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t *UseName, unsigned long Level, LPUSE_INFO InfoStruct)
Definition: rpcserver.c:211
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetValidateName()

NET_API_STATUS WINAPI NetValidateName ( _In_opt_ LPCWSTR  lpServer,
_In_ LPCWSTR  lpName,
_In_opt_ LPCWSTR  lpAccount,
_In_opt_ LPCWSTR  lpPassword,
_In_ NETSETUP_NAME_TYPE  NameType 
)

Definition at line 813 of file wksta_new.c.

819 {
820  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
823 
824  TRACE("NetValidateName(%s %s %s %s %u)\n",
825  debugstr_w(lpServer), debugstr_w(lpName), debugstr_w(lpAccount),
826  debugstr_w(lpPassword), NameType);
827 
828  /* FIXME */
829 
830  status = NetpBind(lpServer,
831  &BindingHandle);
832  if (status != NERR_Success)
833  {
834  ERR("NetpBind() failed (status 0x%lx)\n", status);
835  return status;
836  }
837 
839  {
841  (PWSTR)lpServer,
842  (PWSTR)lpName,
843  (PWSTR)lpAccount,
844  EncryptedPassword,
845  NameType);
846  }
848  {
850  }
851  RpcEndExcept;
852 
854 
855  return status;
856 }
#define RpcEndExcept
Definition: rpc.h:128
uint16_t * PWSTR
Definition: typedefs.h:55
_In_ LPCSTR lpName
Definition: winbase.h:2752
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
#define NERR_Success
Definition: lmerr.h:5
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NET_API_STATUS NetpUnbind(handle_t BindingHandle)
Definition: wksta_new.c:187
smooth NULL
Definition: ftsmooth.c:416
unsigned long __stdcall NetrValidateName2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *NameToValidate, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, NETSETUP_NAME_TYPE NameType)
Definition: rpcserver.c:457
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
NET_API_STATUS NetpBind(LPCWSTR pszServerName, handle_t *pBindingHandle)
Definition: wksta_new.c:142
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 NameType
Definition: acpixf.h:654
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetWkstaSetInfo()

NET_API_STATUS WINAPI NetWkstaSetInfo ( _In_ LPWSTR  servername,
_In_ DWORD  level,
_In_ LPBYTE  buffer,
_Out_ LPDWORD  parm_err 
)

Definition at line 896 of file wksta_new.c.

901 {
903 
904  TRACE("NetWkstaSetInfo(%s, %d, %p, %p)\n",
905  debugstr_w(servername), level, buffer, parm_err);
906 
908  {
909  status = NetrWkstaSetInfo(servername,
910  level,
912  parm_err);
913  }
915  {
917  }
918  RpcEndExcept;
919 
920  return status;
921 }
GLint level
Definition: gl.h:1546
#define RpcEndExcept
Definition: rpc.h:128
unsigned long __stdcall NetrWkstaSetInfo(WKSSVC_IDENTIFY_HANDLE ServerName, unsigned long Level, LPWKSTA_INFO WkstaInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:97
GLuint buffer
Definition: glext.h:5915
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetWkstaTransportAdd()

NET_API_STATUS WINAPI NetWkstaTransportAdd ( _In_opt_ LPWSTR  servername,
_In_ DWORD  level,
_In_ LPBYTE  buf,
_Out_ LPDWORD  parm_err 
)

Definition at line 926 of file wksta_new.c.

931 {
933 
934  TRACE("NetWkstaTransportAdd(%s, %d, %p, %p)\n", debugstr_w(servername),
935  level, buf, parm_err);
936 
938  {
939  status = NetrWkstaTransportAdd(servername,
940  level,
942  parm_err);
943  }
945  {
947  }
948  RpcEndExcept;
949 
950  return status;
951 }
GLint level
Definition: gl.h:1546
#define RpcEndExcept
Definition: rpc.h:128
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrWkstaTransportAdd(WKSSVC_IDENTIFY_HANDLE ServerName, unsigned long Level, LPWKSTA_TRANSPORT_INFO_0 TransportInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:170
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetWkstaTransportDel()

NET_API_STATUS WINAPI NetWkstaTransportDel ( _In_opt_ LPWSTR  servername,
_In_ LPWSTR  transportname,
_In_ DWORD  ucond 
)

Definition at line 956 of file wksta_new.c.

960 {
962 
963  TRACE("NetWkstaTransportDel(%s, %s, %d)\n", debugstr_w(servername),
964  debugstr_w(transportname), ucond);
965 
967  {
968  status = NetrWkstaTransportDel(servername,
969  transportname,
970  ucond);
971  }
973  {
975  }
976  RpcEndExcept;
977 
978  return status;
979 }
#define RpcEndExcept
Definition: rpc.h:128
unsigned long __stdcall NetrWkstaTransportDel(WKSSVC_IDENTIFY_HANDLE ServerName, wchar_t *TransportName, unsigned long ForceLevel)
Definition: rpcserver.c:184
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ NetWkstaUserSetInfo()

NET_API_STATUS WINAPI NetWkstaUserSetInfo ( LPWSTR  reserved,
_In_ DWORD  level,
_In_ LPBYTE  buf,
_Out_ LPDWORD  parm_err 
)

Definition at line 1149 of file wksta_new.c.

1154 {
1156 
1157  TRACE("NetWkstaSetInfo(%s, %d, %p, %p)\n",
1158  debugstr_w(reserved), level, buf, parm_err);
1159 
1160  if (reserved != NULL)
1161  return ERROR_INVALID_PARAMETER;
1162 
1163  RpcTryExcept
1164  {
1166  level,
1168  parm_err);
1169  }
1171  {
1173  }
1174  RpcEndExcept;
1175 
1176  return status;
1177 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
GLint level
Definition: gl.h:1546
#define RpcEndExcept
Definition: rpc.h:128
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define debugstr_w
Definition: kernel32.h:32
#define RpcTryExcept
Definition: rpc.h:126
r reserved
Definition: btrfs.c:2940
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long __stdcall NetrWkstaUserSetInfo(WKSSVC_IDENTIFY_HANDLE Unused, unsigned long Level, LPWKSTA_USER_INFO UserInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:141
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:738
Definition: ps.c:97

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netapi32  )

◆ WKSSVC_IDENTIFY_HANDLE_bind()

handle_t __RPC_USER WKSSVC_IDENTIFY_HANDLE_bind ( WKSSVC_IDENTIFY_HANDLE  pszSystemName)

Definition at line 32 of file wksta_new.c.

33 {
35  LPWSTR pszStringBinding;
37 
38  TRACE("WKSSVC_IDENTIFY_HANDLE_bind() called\n");
39 
41  L"ncacn_np",
42  pszSystemName,
43  L"\\pipe\\wkssvc",
44  NULL,
45  &pszStringBinding);
46  if (status)
47  {
48  TRACE("RpcStringBindingCompose returned 0x%x\n", status);
49  return NULL;
50  }
51 
52  /* Set the binding handle that will be used to bind to the server. */
53  status = RpcBindingFromStringBindingW(pszStringBinding,
54  &hBinding);
55  if (status)
56  {
57  TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
58  }
59 
60  status = RpcStringFreeW(&pszStringBinding);
61  if (status)
62  {
63 // TRACE("RpcStringFree returned 0x%x\n", status);
64  }
65 
66  return hBinding;
67 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:876
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:174
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR L[]
Definition: oid.c:1250
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ WKSSVC_IDENTIFY_HANDLE_unbind()

void __RPC_USER WKSSVC_IDENTIFY_HANDLE_unbind ( WKSSVC_IDENTIFY_HANDLE  pszSystemName,
handle_t  hBinding 
)

Definition at line 71 of file wksta_new.c.

73 {
75 
76  TRACE("WKSSVC_IDENTIFY_HANDLE_unbind() called\n");
77 
79  if (status)
80  {
81  TRACE("RpcBindingFree returned 0x%x\n", status);
82  }
83 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
handle_t hBinding
Definition: ctx_c.c:54
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ WKSSVC_IMPERSONATE_HANDLE_bind()

handle_t __RPC_USER WKSSVC_IMPERSONATE_HANDLE_bind ( WKSSVC_IMPERSONATE_HANDLE  pszSystemName)

Definition at line 87 of file wksta_new.c.

88 {
90  LPWSTR pszStringBinding;
92 
93  TRACE("WKSSVC_IMPERSONATE_HANDLE_bind() called\n");
94 
96  L"ncacn_np",
97  pszSystemName,
98  L"\\pipe\\wkssvc",
99  NULL,
100  &pszStringBinding);
101  if (status)
102  {
103  TRACE("RpcStringBindingCompose returned 0x%x\n", status);
104  return NULL;
105  }
106 
107  /* Set the binding handle that will be used to bind to the server. */
108  status = RpcBindingFromStringBindingW(pszStringBinding,
109  &hBinding);
110  if (status)
111  {
112  TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
113  }
114 
115  status = RpcStringFreeW(&pszStringBinding);
116  if (status)
117  {
118 // TRACE("RpcStringFree returned 0x%x\n", status);
119  }
120 
121  return hBinding;
122 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:876
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:174
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR L[]
Definition: oid.c:1250
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ WKSSVC_IMPERSONATE_HANDLE_unbind()

void __RPC_USER WKSSVC_IMPERSONATE_HANDLE_unbind ( WKSSVC_IMPERSONATE_HANDLE  pszSystemName,
handle_t  hBinding 
)

Definition at line 126 of file wksta_new.c.

128 {
130 
131  TRACE("WKSSVC_IMPERSONATE_HANDLE_unbind() called\n");
132 
134  if (status)
135  {
136  TRACE("RpcBindingFree returned 0x%x\n", status);
137  }
138 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
handle_t hBinding
Definition: ctx_c.c:54
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97