ReactOS  0.4.14-dev-98-gb0d4763
wksta_new.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: NetAPI DLL
4  * FILE: reactos/dll/win32/netapi32/wksta_new.c
5  * PURPOSE: Workstation service interface code
6  *
7  * PROGRAMMERS: Eric Kohl
8  */
9 
10 /* INCLUDES ******************************************************************/
11 
12 #include "netapi32.h"
13 #include "wkssvc_c.h"
14 
16 
17 /* FUNCTIONS *****************************************************************/
18 
20 {
22 }
23 
24 
26 {
28 }
29 
30 
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 }
68 
69 
70 void __RPC_USER
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 }
84 
85 
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 }
123 
124 
125 void __RPC_USER
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 }
139 
140 
142 WINAPI
145  _In_ LPCWSTR AlternateName,
146  _In_opt_ LPCWSTR DomainAccount,
147  _In_opt_ LPCWSTR DomainAccountPassword,
149 {
150  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
153 
154  TRACE("NetAddAlternateComputerName(%s %s %s %s 0x%lx)\n",
155  debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount),
156  debugstr_w(DomainAccountPassword), Reserved);
157 
158  /* FIXME */
160  EncryptedPassword = NULL;
161 
163  {
165  (PWSTR)Server,
166  (PWSTR)AlternateName,
167  (PWSTR)DomainAccount,
168  EncryptedPassword,
169  Reserved);
170  }
172  {
174  }
175  RpcEndExcept;
176 
177  return status;
178 }
179 
180 
182 WINAPI
187  _Out_ PDWORD EntryCount,
188  _Out_ LPWSTR **ComputerNames)
189 {
190  PNET_COMPUTER_NAME_ARRAY ComputerNameArray = NULL;
191  ULONG BufferSize, i;
192  PWSTR *NameBuffer = NULL, Ptr;
194 
195  TRACE("NetEnumerateComputerNames(%s %lu %lu %p %p)\n",
196  debugstr_w(Server), NameType, Reserved, EntryCount, ComputerNames);
197 
199  {
201  NameType,
202  Reserved,
203  &ComputerNameArray);
204  if (status == NERR_Success)
205  {
206  *EntryCount = ComputerNameArray->EntryCount;
207 
208  BufferSize = 0;
209  for (i = 0; i < ComputerNameArray->EntryCount; i++)
210  {
211  BufferSize += ComputerNameArray->ComputerNames[i].Length + sizeof(WCHAR) + sizeof(PWSTR);
212  }
213 
214  status = NetApiBufferAllocate(BufferSize, (PVOID*)&NameBuffer);
215  if (status == NERR_Success)
216  {
217  ZeroMemory(NameBuffer, BufferSize);
218 
219  Ptr = (PWSTR)((ULONG_PTR)NameBuffer + ComputerNameArray->EntryCount * sizeof(PWSTR));
220  for (i = 0; i < ComputerNameArray->EntryCount; i++)
221  {
222  NameBuffer[i] = Ptr;
223  CopyMemory(Ptr,
224  ComputerNameArray->ComputerNames[i].Buffer,
225  ComputerNameArray->ComputerNames[i].Length);
226  Ptr = (PWSTR)((ULONG_PTR)Ptr + ComputerNameArray->ComputerNames[i].Length + sizeof(WCHAR));
227  }
228 
229  *ComputerNames = NameBuffer;
230  }
231  }
232  }
234  {
236  }
237  RpcEndExcept;
238 
239  return status;
240 }
241 
242 
243 #if 0
245 WINAPI
247  _In_ LPCWSTR lpServer,
249  _Out_ PNETSETUP_JOIN_STATUS BufferType)
250 {
252 
253  TRACE("NetGetJoinInformation(%s %p %p)\n",
254  debugstr_w(lpServer), lpNameBuffer, BufferType);
255 
256  if (lpNameBuffer == NULL || BufferType == NULL)
258 
260  {
262  lpNameBuffer,
263  BufferType);
264  }
266  {
268  }
269  RpcEndExcept;
270 
271  return status;
272 }
273 #endif
274 
275 
277 WINAPI
279  _In_ LPCWSTR lpServer,
280  _In_ LPCWSTR lpDomain,
281  _In_ LPCWSTR lpAccount,
282  _In_ LPCWSTR lpPassword,
283  _Out_ DWORD *OUCount,
284  _Out_ LPWSTR **OUs)
285 {
286  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
289 
290  TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n",
291  debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccount),
292  debugstr_w(lpPassword), OUCount, OUs);
293 
294  /* FIXME */
296  EncryptedPassword = NULL;
297 
299  {
301  (PWSTR)lpServer,
302  (PWSTR)lpDomain,
303  (PWSTR)lpAccount,
304  EncryptedPassword,
305  OUCount,
306  OUs);
307  }
309  {
311  }
312  RpcEndExcept;
313 
314  return status;
315 }
316 
317 
319 WINAPI
321  _In_ LPCWSTR lpServer,
322  _In_ LPCWSTR lpDomain,
323  _In_ LPCWSTR lpAccountOU,
324  _In_ LPCWSTR lpAccount,
325  _In_ LPCWSTR lpPassword,
326  _In_ DWORD fJoinOptions)
327 {
328  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
331 
332  TRACE("NetJoinDomain(%s %s %s %s 0x%lx)\n",
333  debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccountOU),
334  debugstr_w(lpAccount), debugstr_w(lpPassword), fJoinOptions);
335 
336  /* FIXME */
338  EncryptedPassword = NULL;
339 
341  {
343  (PWSTR)lpServer,
344  (PWSTR)lpDomain,
345  (PWSTR)lpAccountOU,
346  (PWSTR)lpAccount,
347  EncryptedPassword,
348  fJoinOptions);
349  }
351  {
353  }
354  RpcEndExcept;
355 
356  return status;
357 }
358 
359 
361 WINAPI
364  _In_ LPCWSTR AlternateName,
365  _In_opt_ LPCWSTR DomainAccount,
366  _In_opt_ LPCWSTR DomainAccountPassword,
368 {
369  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
372 
373  TRACE("NetRemoveAlternateComputerName(%s %s %s %s 0x%lx)\n",
374  debugstr_w(Server), debugstr_w(AlternateName), debugstr_w(DomainAccount),
375  debugstr_w(DomainAccountPassword), Reserved);
376 
377  /* FIXME */
379  EncryptedPassword = NULL;
380 
382  {
384  (PWSTR)Server,
385  (PWSTR)AlternateName,
386  (PWSTR)DomainAccount,
387  EncryptedPassword,
388  Reserved);
389  }
391  {
393  }
394  RpcEndExcept;
395 
396  return status;
397 }
398 
399 
401 WINAPI
403  _In_ LPCWSTR lpServer,
404  _In_ LPCWSTR lpNewMachineName,
405  _In_ LPCWSTR lpAccount,
406  _In_ LPCWSTR lpPassword,
407  _In_ DWORD fRenameOptions)
408 {
409  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
412 
413  TRACE("NetRenameMachineInDomain(%s %s %s %s 0x%lx)\n",
414  debugstr_w(lpServer), debugstr_w(lpNewMachineName), debugstr_w(lpAccount),
415  debugstr_w(lpPassword), fRenameOptions);
416 
417  /* FIXME */
419  EncryptedPassword = NULL;
420 
422  {
424  (PWSTR)lpServer,
425  (PWSTR)lpNewMachineName,
426  (PWSTR)lpAccount,
427  EncryptedPassword,
428  fRenameOptions);
429  }
431  {
433  }
434  RpcEndExcept;
435 
436  return status;
437 }
438 
439 
441 WINAPI
444  _In_ LPCWSTR PrimaryName,
445  _In_opt_ LPCWSTR DomainAccount,
446  _In_opt_ LPCWSTR DomainAccountPassword,
448 {
449  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
452 
453  TRACE("NetSetPrimaryComputerName(%s %s %s %s %lu)\n",
454  debugstr_w(Server), debugstr_w(PrimaryName), debugstr_w(DomainAccount),
455  debugstr_w(DomainAccountPassword), Reserved);
456 
457  /* FIXME */
459  EncryptedPassword = NULL;
460 
462  {
464  (PWSTR)Server,
465  (PWSTR)PrimaryName,
466  (PWSTR)DomainAccount,
467  EncryptedPassword,
468  Reserved);
469  }
471  {
473  }
474  RpcEndExcept;
475 
476  return status;
477 }
478 
479 
481 WINAPI
483  _In_ LPCWSTR lpServer,
484  _In_ LPCWSTR lpAccount,
485  _In_ LPCWSTR lpPassword,
486  _In_ DWORD fUnjoinOptions)
487 {
488  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
491 
492  TRACE("NetUnjoinDomain(%s %s %s %s 0x%lx)\n",
493  debugstr_w(lpServer), debugstr_w(lpAccount),
494  debugstr_w(lpPassword), fUnjoinOptions);
495 
496  /* FIXME */
498  EncryptedPassword = NULL;
499 
501  {
503  (PWSTR)lpServer,
504  (PWSTR)lpAccount,
505  EncryptedPassword,
506  fUnjoinOptions);
507  }
509  {
511  }
512  RpcEndExcept;
513 
514  return status;
515 }
516 
517 
519 WINAPI
521  _In_ LMSTR UncServerName,
522  _In_ DWORD Level,
523  _In_ LPBYTE Buf,
524  _Out_ LPDWORD ParmError)
525 {
527 
528  TRACE("NetUseAdd(%s %d %p %p)\n", debugstr_w(UncServerName),
529  Level, Buf, ParmError);
530 
532  {
533  status = NetrUseAdd(UncServerName,
534  Level,
535  (LPUSE_INFO)Buf,
536  ParmError);
537  }
539  {
541  }
542  RpcEndExcept;
543 
544  return status;
545 }
546 
547 
549 WINAPI
551  _In_ LMSTR UncServerName,
552  _In_ LMSTR UseName,
553  _In_ DWORD ForceCond)
554 {
556 
557  TRACE("NetUseDel(%s %s %d)\n", debugstr_w(UncServerName),
558  debugstr_w(UseName), ForceCond);
559 
561  {
562  status = NetrUseDel(UncServerName,
563  UseName,
564  ForceCond);
565  }
567  {
569  }
570  RpcEndExcept;
571 
572  return status;
573 }
574 
575 
577 WINAPI
579  _In_ LMSTR UncServerName,
580  _In_ DWORD Level,
581  _Out_ LPBYTE *BufPtr,
582  _In_ DWORD PreferedMaximumSize,
583  _Out_ LPDWORD EntriesRead,
584  _Out_ LPDWORD TotalEntries,
585  _Inout_ LPDWORD ResumeHandle)
586 {
587  USE_ENUM_STRUCT UseEnumInfo;
588  USE_INFO_0_CONTAINER Container0;
589  USE_INFO_1_CONTAINER Container1;
590  USE_INFO_2_CONTAINER Container2;
592 
593  TRACE("NetUseEnum(%s, %d, %p, %d, %p, %p, %p)\n", debugstr_w(UncServerName),
594  Level, BufPtr, PreferedMaximumSize, EntriesRead, TotalEntries, ResumeHandle);
595 
596  UseEnumInfo.Level = Level;
597  switch (Level)
598  {
599  case 0:
600  UseEnumInfo.UseInfo.Level0 = &Container0;
601  Container0.EntriesRead = 0;
602  Container0.Buffer = NULL;
603  break;
604 
605  case 1:
606  UseEnumInfo.UseInfo.Level1 = &Container1;
607  Container1.EntriesRead = 0;
608  Container1.Buffer = NULL;
609  break;
610 
611  case 2:
612  UseEnumInfo.UseInfo.Level2 = &Container2;
613  Container2.EntriesRead = 0;
614  Container2.Buffer = NULL;
615  break;
616 
617  default:
619  }
620 
622  {
623  status = NetrUseEnum(UncServerName,
624  &UseEnumInfo,
625  PreferedMaximumSize,
626  TotalEntries,
627  ResumeHandle);
629  {
630  switch (Level)
631  {
632  case 0:
633  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level0->Buffer;
634  *EntriesRead = UseEnumInfo.UseInfo.Level0->EntriesRead;
635  break;
636 
637  case 1:
638  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level1->Buffer;
639  *EntriesRead = UseEnumInfo.UseInfo.Level1->EntriesRead;
640  break;
641 
642  case 2:
643  *BufPtr = (LPBYTE)UseEnumInfo.UseInfo.Level2->Buffer;
644  *EntriesRead = UseEnumInfo.UseInfo.Level2->EntriesRead;
645  break;
646  }
647  }
648  }
650  {
652  }
653  RpcEndExcept;
654 
655  return status;
656 }
657 
658 
660 WINAPI
662  _In_ LMSTR UncServerName,
663  _In_ LMSTR UseName,
664  _In_ DWORD Level,
665  _Out_ LPBYTE *BufPtr)
666 {
668 
669  TRACE("NetUseGetInfo(%s, %s, %d, %p)\n", debugstr_w(UncServerName),
670  debugstr_w(UseName), Level, BufPtr);
671 
672  *BufPtr = NULL;
673 
675  {
676  status = NetrUseGetInfo(UncServerName,
677  UseName,
678  Level,
679  (LPUSE_INFO)BufPtr);
680  }
682  {
684  }
685  RpcEndExcept;
686 
687  return status;
688 }
689 
690 
692 WINAPI
694  _In_ LPCWSTR lpServer,
696  _In_ LPCWSTR lpAccount,
697  _In_ LPCWSTR lpPassword,
699 {
700  PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
703 
704  TRACE("NetValidateName(%s %s %s %s %u)\n",
705  debugstr_w(lpServer), debugstr_w(lpName), debugstr_w(lpAccount),
706  debugstr_w(lpPassword), NameType);
707 
708  /* FIXME */
710  EncryptedPassword = NULL;
711 
713  {
715  (PWSTR)lpServer,
716  (PWSTR)lpName,
717  (PWSTR)lpAccount,
718  EncryptedPassword,
719  NameType);
720  }
722  {
724  }
725  RpcEndExcept;
726 
727  return status;
728 }
729 
730 
731 #if 0
733 WINAPI
735  _In_ LPWSTR servername,
736  _In_ DWORD level,
738 {
740 
741  TRACE("NetWkstaGetInfo(%s, %d, %p)\n",
742  debugstr_w(servername), level, bufptr);
743 
744  if (bufptr == NULL)
746 
747  *bufptr = NULL;
748 
750  {
751  status = NetrWkstaGetInfo(servername,
752  level,
754  }
756  {
758  }
759  RpcEndExcept;
760 
761  return status;
762 }
763 #endif
764 
765 
767 WINAPI
769  _In_ LPWSTR servername,
770  _In_ DWORD level,
772  _Out_ LPDWORD parm_err)
773 {
775 
776  TRACE("NetWkstaSetInfo(%s, %d, %p, %p)\n",
777  debugstr_w(servername), level, buffer, parm_err);
778 
780  {
781  status = NetrWkstaSetInfo(servername,
782  level,
784  parm_err);
785  }
787  {
789  }
790  RpcEndExcept;
791 
792  return status;
793 }
794 
795 
797 WINAPI
799  _In_opt_ LPWSTR servername,
800  _In_ DWORD level,
801  _In_ LPBYTE buf,
802  _Out_ LPDWORD parm_err)
803 {
805 
806  TRACE("NetWkstaTransportAdd(%s, %d, %p, %p)\n", debugstr_w(servername),
807  level, buf, parm_err);
808 
810  {
811  status = NetrWkstaTransportAdd(servername,
812  level,
814  parm_err);
815  }
817  {
819  }
820  RpcEndExcept;
821 
822  return status;
823 }
824 
825 
827 WINAPI
829  _In_opt_ LPWSTR servername,
830  _In_ LPWSTR transportname,
831  _In_ DWORD ucond)
832 {
834 
835  TRACE("NetWkstaTransportDel(%s, %s, %d)\n", debugstr_w(servername),
836  debugstr_w(transportname), ucond);
837 
839  {
840  status = NetrWkstaTransportDel(servername,
841  transportname,
842  ucond);
843  }
845  {
847  }
848  RpcEndExcept;
849 
850  return status;
851 }
852 
853 
854 #if 0
856 WINAPI
858  _In_opt_ LPWSTR servername,
859  _In_ DWORD level,
862  _Out_ LPDWORD entriesread,
863  _Out_ LPDWORD totalentries,
864  _Inout_ LPDWORD resumehandle)
865 {
866  WKSTA_TRANSPORT_ENUM_STRUCT TransportEnumInfo;
869 
870  TRACE("NetWkstaTransportEnum(%s, %d, %p, %d, %p, %p, %p)\n", debugstr_w(servername),
871  level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle);
872 
873  TransportEnumInfo.Level = level;
874  switch (level)
875  {
876  case 0:
877  TransportEnumInfo.WkstaTransportInfo.Level0 = &Container0;
878  Container0.EntriesRead = 0;
879  Container0.Buffer = NULL;
880  break;
881 
882  default:
884  }
885 
887  {
888  status = NetrWkstaTransportEnum(servername,
889  &TransportEnumInfo,
890  prefmaxlen,
891  totalentries,
892  resumehandle);
894  {
895  switch (level)
896  {
897  case 0:
898  *bufptr = (LPBYTE)TransportEnumInfo.WkstaTransportInfo.Level0->Buffer;
899  *entriesread = TransportEnumInfo.WkstaTransportInfo.Level0->EntriesRead;
900  break;
901  }
902  }
903  }
905  {
907  }
908  RpcEndExcept;
909 
910  return status;
911 }
912 
913 
915 WINAPI
917  _In_ LPWSTR servername,
918  _In_ DWORD level,
921  _Out_ LPDWORD entriesread,
922  _Out_ LPDWORD totalentries,
923  _Inout_ LPDWORD resumehandle)
924 {
925  WKSTA_USER_ENUM_STRUCT UserEnumInfo;
926  WKSTA_USER_INFO_0_CONTAINER Container0;
927  WKSTA_USER_INFO_1_CONTAINER Container1;
929 
930  TRACE("NetWkstaUserEnum(%s, %d, %p, %d, %p, %p, %p)\n", debugstr_w(servername),
931  level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle);
932 
933  UserEnumInfo.Level = level;
934  switch (level)
935  {
936  case 0:
937  UserEnumInfo.WkstaUserInfo.Level0 = &Container0;
938  Container0.EntriesRead = 0;
939  Container0.Buffer = NULL;
940  break;
941 
942  case 1:
943  UserEnumInfo.WkstaUserInfo.Level1 = &Container1;
944  Container1.EntriesRead = 0;
945  Container1.Buffer = NULL;
946  break;
947 
948  default:
950  }
951 
953  {
954  status = NetrWkstaUserEnum(servername,
955  &UserEnumInfo,
956  prefmaxlen,
957  totalentries,
958  resumehandle);
960  {
961  switch (level)
962  {
963  case 0:
964  *bufptr = (LPBYTE)UserEnumInfo.WkstaUserInfo.Level0->Buffer;
965  *entriesread = UserEnumInfo.WkstaUserInfo.Level0->EntriesRead;
966  break;
967 
968  case 1:
969  *bufptr = (LPBYTE)UserEnumInfo.WkstaUserInfo.Level1->Buffer;
970  *entriesread = UserEnumInfo.WkstaUserInfo.Level1->EntriesRead;
971  break;
972  }
973  }
974  }
976  {
978  }
979  RpcEndExcept;
980 
981  return status;
982 }
983 
984 
986 WINAPI
989  _In_ DWORD level,
990  _Out_ PBYTE *bufptr)
991 {
993 
994  TRACE("NetWkstaUserGetInfo(%s, %d, %p)\n",
996 
997  if (reserved != NULL)
999 
1000  *bufptr = NULL;
1001 
1002  RpcTryExcept
1003  {
1005  level,
1007  }
1009  {
1011  }
1012  RpcEndExcept;
1013 
1014  return status;
1015 }
1016 #endif
1017 
1018 
1020 WINAPI
1022  LPWSTR reserved,
1023  _In_ DWORD level,
1024  _In_ LPBYTE buf,
1025  _Out_ LPDWORD parm_err)
1026 {
1028 
1029  TRACE("NetWkstaSetInfo(%s, %d, %p, %p)\n",
1030  debugstr_w(reserved), level, buf, parm_err);
1031 
1032  if (reserved != NULL)
1033  return ERROR_INVALID_PARAMETER;
1034 
1035  RpcTryExcept
1036  {
1038  level,
1040  parm_err);
1041  }
1043  {
1045  }
1046  RpcEndExcept;
1047 
1048  return status;
1049 }
1050 
1051 /* EOF */
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
Definition: apibuf.c:28
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:877
LPWKSTA_TRANSPORT_INFO_0 Buffer
Definition: wkssvc.idl:306
union _USE_ENUM_STRUCT::_USE_ENUM_UNION UseInfo
GLint level
Definition: gl.h:1546
unsigned long EntriesRead
Definition: wkssvc.idl:288
#define RpcEndExcept
Definition: rpc.h:128
WCHAR * LMSTR
Definition: ms-dtyp.idl:119
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
LPWKSTA_USER_INFO_1_CONTAINER Level1
Definition: wkssvc.idl:298
NET_API_STATUS WINAPI NetJoinDomain(_In_ LPCWSTR lpServer, _In_ LPCWSTR lpDomain, _In_ LPCWSTR lpAccountOU, _In_ LPCWSTR lpAccount, _In_ LPCWSTR lpPassword, _In_ DWORD fJoinOptions)
Definition: wksta_new.c:320
unsigned long __stdcall NetrWkstaSetInfo(WKSSVC_IDENTIFY_HANDLE ServerName, unsigned long Level, LPWKSTA_INFO WkstaInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:97
static unsigned int bufptr
Definition: tncon.cpp:77
unsigned long __stdcall NetrWkstaUserGetInfo(WKSSVC_IDENTIFY_HANDLE Unused, unsigned long Level, LPWKSTA_USER_INFO UserInfo)
Definition: rpcserver.c:126
enum _NET_COMPUTER_NAME_TYPE NET_COMPUTER_NAME_TYPE
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
NET_API_STATUS WINAPI NetUseGetInfo(_In_ LMSTR UncServerName, _In_ LMSTR UseName, _In_ DWORD Level, _Out_ LPBYTE *BufPtr)
Definition: wksta_new.c:661
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:177
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint16_t * PWSTR
Definition: typedefs.h:54
unsigned long EntriesRead
Definition: wkssvc.idl:252
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:470
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
_In_ LPCSTR lpName
Definition: winbase.h:2736
NET_API_STATUS WINAPI NetRenameMachineInDomain(_In_ LPCWSTR lpServer, _In_ LPCWSTR lpNewMachineName, _In_ LPCWSTR lpAccount, _In_ LPCWSTR lpPassword, _In_ DWORD fRenameOptions)
Definition: wksta_new.c:402
#define ZeroMemory
Definition: winbase.h:1642
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
GLuint buffer
Definition: glext.h:5915
void __RPC_FAR *__RPC_USER midl_user_allocate(SIZE_T len)
Definition: wksta_new.c:19
wchar_t * WKSSVC_IMPERSONATE_HANDLE
Definition: wkssvc.idl:8
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
unsigned long __stdcall NetrWkstaGetInfo(WKSSVC_IDENTIFY_HANDLE ServerName, unsigned long Level, LPWKSTA_INFO WkstaInfo)
Definition: rpcserver.c:83
NET_API_STATUS WINAPI NetWkstaTransportAdd(_In_opt_ LPWSTR servername, _In_ DWORD level, _In_ LPBYTE buf, _Out_ LPDWORD parm_err)
Definition: wksta_new.c:798
NET_API_STATUS NET_API_FUNCTION NetGetJoinInformation(LPCWSTR Server, LPWSTR *Name, PNETSETUP_JOIN_STATUS type)
Definition: wksta.c:559
static void Server(int port)
Definition: srltest.c:69
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: wksta_new.c:25
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: wksta_new.c:183
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:511
unsigned long __stdcall NetrWkstaTransportEnum(WKSSVC_IDENTIFY_HANDLE ServerName, LPWKSTA_TRANSPORT_ENUM_STRUCT TransportInfo, unsigned long PreferredMaximumLength, unsigned long *TotalEntries, unsigned long *ResumeHandle)
Definition: rpcserver.c:155
#define _In_opt_
Definition: no_sal2.h:213
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:453
unsigned long __stdcall NetrUseAdd(WKSSVC_IMPERSONATE_HANDLE ServerName, unsigned long Level, LPUSE_INFO InfoStruct, unsigned long *ErrorParameter)
Definition: rpcserver.c:197
#define NERR_Success
Definition: lmerr.h:5
uint32_t ULONG_PTR
Definition: typedefs.h:63
unsigned long __stdcall NetrWkstaTransportDel(WKSSVC_IDENTIFY_HANDLE ServerName, wchar_t *TransportName, unsigned long ForceLevel)
Definition: rpcserver.c:184
LPUSE_INFO_0 Buffer
Definition: wkssvc.idl:253
long RPC_STATUS
Definition: rpc.h:52
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 char * LPBYTE
Definition: typedefs.h:52
unsigned long __stdcall NetrUseDel(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t *UseName, unsigned long ForceLevel)
Definition: rpcserver.c:225
NET_API_STATUS WINAPI NetAddAlternateComputerName(_In_opt_ LPCWSTR Server, _In_ LPCWSTR AlternateName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
Definition: wksta_new.c:143
unsigned long EntryCount
Definition: wkssvc.idl:344
#define debugstr_w
Definition: kernel32.h:32
LPUSE_INFO_1 Buffer
Definition: wkssvc.idl:259
void __RPC_USER WKSSVC_IMPERSONATE_HANDLE_unbind(WKSSVC_IMPERSONATE_HANDLE pszSystemName, handle_t hBinding)
Definition: wksta_new.c:126
static PVOID ptr
Definition: dispmode.c:27
#define RpcTryExcept
Definition: rpc.h:126
r reserved
Definition: btrfs.c:2893
unsigned long Level
Definition: wkssvc.idl:294
unsigned long EntriesRead
Definition: wkssvc.idl:264
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned long EntriesRead
Definition: wkssvc.idl:258
smooth NULL
Definition: ftsmooth.c:416
LPUSE_INFO_0_CONTAINER Level0
Definition: wkssvc.idl:273
void __RPC_USER WKSSVC_IDENTIFY_HANDLE_unbind(WKSSVC_IDENTIFY_HANDLE pszSystemName, handle_t hBinding)
Definition: wksta_new.c:71
#define _Out_
Definition: no_sal2.h:323
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
NET_API_STATUS WINAPI NetGetJoinableOUs(_In_ LPCWSTR lpServer, _In_ LPCWSTR lpDomain, _In_ LPCWSTR lpAccount, _In_ LPCWSTR lpPassword, _Out_ DWORD *OUCount, _Out_ LPWSTR **OUs)
Definition: wksta_new.c:278
NET_API_STATUS WINAPI NetRemoveAlternateComputerName(_In_opt_ LPCWSTR Server, _In_ LPCWSTR AlternateName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
Definition: wksta_new.c:362
#define __RPC_FAR
Definition: rpc.h:56
enum _NETSETUP_NAME_TYPE NETSETUP_NAME_TYPE
#define __RPC_USER
Definition: rpc.h:65
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:437
static LPSTR lpNameBuffer
Definition: secur32.c:50
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level, PBYTE *bufptr)
Definition: wksta.c:279
NET_API_STATUS WINAPI NetWkstaUserEnum(LMSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resumehandle)
Definition: wksta.c:426
unsigned long EntriesRead
Definition: wkssvc.idl:282
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
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
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
union _WKSTA_USER_ENUM_STRUCT::_WKSTA_USER_ENUM_UNION WkstaUserInfo
unsigned long __stdcall NetrUnjoinDomain2(handle_t RpcBindingHandle, wchar_t *ServerName, wchar_t *AccountName, PJOINPR_ENCRYPTED_USER_PASSWORD Password, unsigned long Options)
Definition: rpcserver.c:406
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long __stdcall NetrGetJoinInformation(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t **NameBuffer, PNETSETUP_JOIN_STATUS BufferType)
Definition: rpcserver.c:362
unsigned long __stdcall NetrWkstaTransportAdd(WKSSVC_IDENTIFY_HANDLE ServerName, unsigned long Level, LPWKSTA_TRANSPORT_INFO_0 TransportInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:170
LPWKSTA_USER_INFO_0_CONTAINER Level0
Definition: wkssvc.idl:297
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:502
#define WINAPI
Definition: msvc.h:8
#define CopyMemory
Definition: winbase.h:1640
#define BufferSize
Definition: classpnp.h:419
unsigned long DWORD
Definition: ntddk_ex.h:95
#define _Inout_
Definition: no_sal2.h:244
handle_t __RPC_USER WKSSVC_IDENTIFY_HANDLE_bind(WKSSVC_IDENTIFY_HANDLE pszSystemName)
Definition: wksta_new.c:32
unsigned long __stdcall NetrUseGetInfo(WKSSVC_IMPERSONATE_HANDLE ServerName, wchar_t *UseName, unsigned long Level, LPUSE_INFO InfoStruct)
Definition: rpcserver.c:211
unsigned long __stdcall NetrWkstaUserEnum(WKSSVC_IDENTIFY_HANDLE ServerName, LPWKSTA_USER_ENUM_STRUCT UserInfo, unsigned long PreferredMaximumLength, unsigned long *TotalEntries, unsigned long *ResumeHandle)
Definition: rpcserver.c:111
union _WKSTA_TRANSPORT_ENUM_STRUCT::_WKSTA_TRANSPORT_ENUM_UNION WkstaTransportInfo
NET_API_STATUS WINAPI NetWkstaUserSetInfo(LPWSTR reserved, _In_ DWORD level, _In_ LPBYTE buf, _Out_ LPDWORD parm_err)
Definition: wksta_new.c:1021
static const WCHAR L[]
Definition: oid.c:1250
PUNICODE_STRING ComputerNames
Definition: wkssvc.idl:345
NET_API_STATUS WINAPI NetWkstaSetInfo(_In_ LPWSTR servername, _In_ DWORD level, _In_ LPBYTE buffer, _Out_ LPDWORD parm_err)
Definition: wksta_new.c:768
NET_API_STATUS WINAPI NetWkstaGetInfo(LMSTR servername, DWORD level, LPBYTE *bufptr)
Definition: wksta.c:472
NET_API_STATUS WINAPI NetValidateName(_In_ LPCWSTR lpServer, _In_ LPCWSTR lpName, _In_ LPCWSTR lpAccount, _In_ LPCWSTR lpPassword, _In_ NETSETUP_NAME_TYPE NameType)
Definition: wksta_new.c:693
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:389
GLenum GLsizei len
Definition: glext.h:6722
LPWKSTA_USER_INFO_0 Buffer
Definition: wkssvc.idl:283
LPUSE_INFO_2 Buffer
Definition: wkssvc.idl:265
unsigned long __stdcall NetrWkstaUserSetInfo(WKSSVC_IDENTIFY_HANDLE Unused, unsigned long Level, LPWKSTA_USER_INFO UserInfo, unsigned long *ErrorParameter)
Definition: rpcserver.c:141
#define ERROR_MORE_DATA
Definition: dderror.h:13
LPUSE_INFO_1_CONTAINER Level1
Definition: wkssvc.idl:274
#define _In_
Definition: no_sal2.h:204
NET_API_STATUS WINAPI NetUseAdd(_In_ LMSTR UncServerName, _In_ DWORD Level, _In_ LPBYTE Buf, _Out_ LPDWORD ParmError)
Definition: wksta_new.c:520
ULONG_PTR SIZE_T
Definition: typedefs.h:78
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: wksta_new.c:578
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:486
enum tagNETSETUP_JOIN_STATUS * PNETSETUP_JOIN_STATUS
handle_t __RPC_USER WKSSVC_IMPERSONATE_HANDLE_bind(WKSSVC_IMPERSONATE_HANDLE pszSystemName)
Definition: wksta_new.c:87
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:421
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DWORD * PDWORD
Definition: pedump.c:68
NET_API_STATUS WINAPI NetWkstaTransportEnum(LMSTR ServerName, DWORD level, PBYTE *pbuf, DWORD prefmaxlen, LPDWORD read_entries, PDWORD total_entries, PDWORD hresume)
Definition: wksta.c:221
uint32_t * LPDWORD
Definition: typedefs.h:57
WINE_DEFAULT_DEBUG_CHANNEL(netapi32)
unsigned int ULONG
Definition: retypes.h:1
LPUSE_INFO_2_CONTAINER Level2
Definition: wkssvc.idl:275
NET_API_STATUS WINAPI NetUseDel(_In_ LMSTR UncServerName, _In_ LMSTR UseName, _In_ DWORD ForceCond)
Definition: wksta_new.c:550
NET_API_STATUS WINAPI NetWkstaTransportDel(_In_opt_ LPWSTR servername, _In_ LPWSTR transportname, _In_ DWORD ucond)
Definition: wksta_new.c:828
NET_API_STATUS WINAPI NetSetPrimaryComputerName(_In_opt_ LPCWSTR Server, _In_ LPCWSTR PrimaryName, _In_opt_ LPCWSTR DomainAccount, _In_opt_ LPCWSTR DomainAccountPassword, _In_ ULONG Reserved)
Definition: wksta_new.c:442
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:648
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWKSTA_TRANSPORT_INFO_0_CONTAINER Level0
Definition: wkssvc.idl:314
NET_API_STATUS WINAPI NetUnjoinDomain(_In_ LPCWSTR lpServer, _In_ LPCWSTR lpAccount, _In_ LPCWSTR lpPassword, _In_ DWORD fUnjoinOptions)
Definition: wksta_new.c:482
static SERVICE_STATUS status
Definition: service.c:31
BYTE * PBYTE
Definition: pedump.c:66
#define HeapFree(x, y, z)
Definition: compat.h:394
LPWKSTA_USER_INFO_1 Buffer
Definition: wkssvc.idl:289
wchar_t * WKSSVC_IDENTIFY_HANDLE
Definition: wkssvc.idl:7
#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:518
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741
Definition: ps.c:97