ReactOS 0.4.15-dev-7953-g1f49173
rpcserver.c File Reference
#include "precomp.h"
#include "ndk/kefuncs.h"
#include "ndk/rtlfuncs.h"
#include "winerror.h"
#include "lmerr.h"
Include dependency graph for rpcserver.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (srvsvc)
 
DWORD WINAPI RpcThreadRoutine (LPVOID lpParameter)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T len)
 
void __RPC_USER midl_user_free (void __RPC_FAR *ptr)
 
void __RPC_USER SHARE_DEL_HANDLE_rundown (SHARE_DEL_HANDLE hClientHandle)
 
void __stdcall Opnum0NotUsedOnWire (void)
 
void __stdcall Opnum1NotUsedOnWire (void)
 
void __stdcall Opnum2NotUsedOnWire (void)
 
void __stdcall Opnum3NotUsedOnWire (void)
 
void __stdcall Opnum4NotUsedOnWire (void)
 
void __stdcall Opnum5NotUsedOnWire (void)
 
void __stdcall Opnum6NotUsedOnWire (void)
 
void __stdcall Opnum7NotUsedOnWire (void)
 
NET_API_STATUS __stdcall NetrConnectionEnum (SRVSVC_HANDLE ServerName, WCHAR *Qualifier, LPCONNECT_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrFileEnum (SRVSVC_HANDLE ServerName, WCHAR *BasePath, WCHAR *UserName, PFILE_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrFileGetInfo (SRVSVC_HANDLE ServerName, DWORD FileId, DWORD Level, LPFILE_INFO InfoStruct)
 
NET_API_STATUS __stdcall NetrFileClose (SRVSVC_HANDLE ServerName, DWORD FileId)
 
NET_API_STATUS __stdcall NetrSessionEnum (SRVSVC_HANDLE ServerName, WCHAR *ClientName, WCHAR *UserName, PSESSION_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrSessionDel (SRVSVC_HANDLE ServerName, WCHAR *ClientName, WCHAR *UserName)
 
NET_API_STATUS __stdcall NetrShareAdd (SRVSVC_HANDLE ServerName, DWORD Level, LPSHARE_INFO InfoStruct, DWORD *ParmErr)
 
NET_API_STATUS __stdcall NetrShareEnum (SRVSVC_HANDLE ServerName, LPSHARE_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrShareGetInfo (SRVSVC_HANDLE ServerName, WCHAR *NetName, DWORD Level, LPSHARE_INFO InfoStruct)
 
NET_API_STATUS __stdcall NetrShareSetInfo (SRVSVC_HANDLE ServerName, WCHAR *NetName, DWORD Level, LPSHARE_INFO ShareInfo, DWORD *ParmErr)
 
NET_API_STATUS __stdcall NetrShareDel (SRVSVC_HANDLE ServerName, WCHAR *NetName, DWORD Reserved)
 
NET_API_STATUS __stdcall NetrShareDelSticky (SRVSVC_HANDLE ServerName, WCHAR *NetName, DWORD Reserved)
 
NET_API_STATUS __stdcall NetrShareCheck (SRVSVC_HANDLE ServerName, WCHAR *Device, DWORD *Type)
 
NET_API_STATUS __stdcall NetrServerGetInfo (SRVSVC_HANDLE ServerName, DWORD Level, LPSERVER_INFO *InfoStruct)
 
NET_API_STATUS __stdcall NetrServerSetInfo (SRVSVC_HANDLE ServerName, DWORD Level, LPSERVER_INFO ServerInfo, DWORD *ParmErr)
 
NET_API_STATUS __stdcall NetrServerDiskEnum (SRVSVC_HANDLE ServerName, DWORD Level, DISK_ENUM_CONTAINER *DiskInfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrServerStatisticsGet (SRVSVC_HANDLE ServerName, WCHAR *Service, DWORD Level, DWORD Options, LPSTAT_SERVER_0 *InfoStruct)
 
NET_API_STATUS __stdcall NetrServerTransportAdd (SRVSVC_HANDLE ServerName, DWORD Level, LPSERVER_TRANSPORT_INFO_0 Buffer)
 
NET_API_STATUS __stdcall NetrServerTransportEnum (SRVSVC_HANDLE ServerName, LPSERVER_XPORT_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrServerTransportDel (SRVSVC_HANDLE ServerName, DWORD Level, LPSERVER_TRANSPORT_INFO_0 Buffer)
 
NET_API_STATUS __stdcall NetrRemoteTOD (SRVSVC_HANDLE ServerName, LPTIME_OF_DAY_INFO *BufferPtr)
 
NET_API_STATUS __stdcall NetrServerSetServiceBits (SRVSVC_HANDLE ServerName, WCHAR *Transport, DWORD ServiceBits, DWORD UpdateImmediately)
 
NET_API_STATUS __stdcall NetprPathType (SRVSVC_HANDLE ServerName, WCHAR *PathName, DWORD *PathType, DWORD Flags)
 
NET_API_STATUS __stdcall NetprPathCanonicalize (SRVSVC_HANDLE ServerName, WCHAR *PathName, unsigned char *Outbuf, DWORD OutbufLen, WCHAR *Prefix, DWORD *PathType, DWORD Flags)
 
long __stdcall NetprPathCompare (SRVSVC_HANDLE ServerName, WCHAR *PathName1, WCHAR *PathName2, DWORD PathType, DWORD Flags)
 
NET_API_STATUS __stdcall NetprNameValidate (SRVSVC_HANDLE ServerName, WCHAR *Name, DWORD NameType, DWORD Flags)
 
NET_API_STATUS __stdcall NetprNameCanonicalize (SRVSVC_HANDLE ServerName, WCHAR *Name, WCHAR *Outbuf, DWORD OutbufLen, DWORD NameType, DWORD Flags)
 
long __stdcall NetprNameCompare (SRVSVC_HANDLE ServerName, WCHAR *Name1, WCHAR *Name2, DWORD NameType, DWORD Flags)
 
NET_API_STATUS __stdcall NetrShareEnumSticky (SRVSVC_HANDLE ServerName, LPSHARE_ENUM_STRUCT InfoStruct, DWORD PreferedMaximumLength, DWORD *TotalEntries, DWORD *ResumeHandle)
 
NET_API_STATUS __stdcall NetrShareDelStart (SRVSVC_HANDLE ServerName, WCHAR *NetName, DWORD Reserved, PSHARE_DEL_HANDLE ContextHandle)
 
NET_API_STATUS __stdcall NetrShareDelCommit (PSHARE_DEL_HANDLE ContextHandle)
 
DWORD __stdcall NetrpGetFileSecurity (SRVSVC_HANDLE ServerName, WCHAR *ShareName, WCHAR *lpFileName, SECURITY_INFORMATION RequestedInformation, PADT_SECURITY_DESCRIPTOR *SecurityDescriptor)
 
DWORD __stdcall NetrpSetFileSecurity (SRVSVC_HANDLE ServerName, WCHAR *ShareName, WCHAR *lpFileName, SECURITY_INFORMATION SecurityInformation, PADT_SECURITY_DESCRIPTOR SecurityDescriptor)
 
NET_API_STATUS __stdcall NetrServerTransportAddEx (SRVSVC_HANDLE ServerName, DWORD Level, LPTRANSPORT_INFO Buffer)
 
NET_API_STATUS __stdcall NetrServerSetServiceBitsEx (SRVSVC_HANDLE ServerName, WCHAR *EmulatedServer, WCHAR *Transport, DWORD ServiceBitsOfInterest, DWORD ServiceBits, DWORD UpdateImmediately)
 
NET_API_STATUS __stdcall NetrDfsGetVersion (SRVSVC_HANDLE ServerName, DWORD *Version)
 
NET_API_STATUS __stdcall NetrDfsCreateLocalPartition (SRVSVC_HANDLE ServerName, WCHAR *ShareName, GUID *EntryUid, WCHAR *EntryPrefix, WCHAR *ShortName, LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo, int Force)
 
NET_API_STATUS __stdcall NetrDfsDeleteLocalPartition (SRVSVC_HANDLE ServerName, GUID *Uid, WCHAR *Prefix)
 
NET_API_STATUS __stdcall NetrDfsSetLocalVolumeState (SRVSVC_HANDLE ServerName, GUID *Uid, WCHAR *Prefix, unsigned long State)
 
NET_API_STATUS __stdcall NetrDfsSetServerInfo (void)
 
NET_API_STATUS __stdcall NetrDfsCreateExitPoint (SRVSVC_HANDLE ServerName, GUID *Uid, WCHAR *Prefix, unsigned long Type, DWORD ShortPrefixLen, WCHAR *ShortPrefix)
 
NET_API_STATUS __stdcall NetrDfsDeleteExitPoint (SRVSVC_HANDLE ServerName, GUID *Uid, WCHAR *Prefix, unsigned long Type)
 
NET_API_STATUS __stdcall NetrDfsModifyPrefix (SRVSVC_HANDLE ServerName, GUID *Uid, WCHAR *Prefix)
 
NET_API_STATUS __stdcall NetrDfsFixLocalVolume (SRVSVC_HANDLE ServerName, WCHAR *VolumeName, unsigned long EntryType, unsigned long ServiceType, WCHAR *StgId, GUID *EntryUid, WCHAR *EntryPrefix, LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo, unsigned long CreateDisposition)
 
NET_API_STATUS __stdcall NetrDfsManagerReportSiteInfo (SRVSVC_HANDLE ServerName, LPDFS_SITELIST_INFO *ppSiteInfo)
 
NET_API_STATUS __stdcall NetrServerTransportDelEx (SRVSVC_HANDLE ServerName, DWORD Level, LPTRANSPORT_INFO Buffer)
 

Function Documentation

◆ midl_user_allocate()

void __RPC_FAR *__RPC_USER midl_user_allocate ( SIZE_T  len)

Definition at line 71 of file rpcserver.c.

72{
74}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
GLenum GLsizei len
Definition: glext.h:6722

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR ptr)

Definition at line 77 of file rpcserver.c.

78{
80}
#define HeapFree(x, y, z)
Definition: compat.h:735
static PVOID ptr
Definition: dispmode.c:27

◆ NetprNameCanonicalize()

NET_API_STATUS __stdcall NetprNameCanonicalize ( SRVSVC_HANDLE  ServerName,
WCHAR Name,
WCHAR Outbuf,
DWORD  OutbufLen,
DWORD  NameType,
DWORD  Flags 
)

Definition at line 697 of file rpcserver.c.

704{
707}
#define UNIMPLEMENTED
Definition: debug.h:115
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

Referenced by implicit_handle().

◆ NetprNameCompare()

long __stdcall NetprNameCompare ( SRVSVC_HANDLE  ServerName,
WCHAR Name1,
WCHAR Name2,
DWORD  NameType,
DWORD  Flags 
)

Definition at line 713 of file rpcserver.c.

719{
722}

Referenced by implicit_handle().

◆ NetprNameValidate()

NET_API_STATUS __stdcall NetprNameValidate ( SRVSVC_HANDLE  ServerName,
WCHAR Name,
DWORD  NameType,
DWORD  Flags 
)

Definition at line 683 of file rpcserver.c.

688{
691}

Referenced by implicit_handle().

◆ NetprPathCanonicalize()

NET_API_STATUS __stdcall NetprPathCanonicalize ( SRVSVC_HANDLE  ServerName,
WCHAR PathName,
unsigned char Outbuf,
DWORD  OutbufLen,
WCHAR Prefix,
DWORD PathType,
DWORD  Flags 
)

Definition at line 651 of file rpcserver.c.

659{
662}

Referenced by implicit_handle().

◆ NetprPathCompare()

long __stdcall NetprPathCompare ( SRVSVC_HANDLE  ServerName,
WCHAR PathName1,
WCHAR PathName2,
DWORD  PathType,
DWORD  Flags 
)

Definition at line 668 of file rpcserver.c.

674{
677}

Referenced by implicit_handle().

◆ NetprPathType()

NET_API_STATUS __stdcall NetprPathType ( SRVSVC_HANDLE  ServerName,
WCHAR PathName,
DWORD PathType,
DWORD  Flags 
)

Definition at line 637 of file rpcserver.c.

642{
645}

Referenced by implicit_handle().

◆ NetrConnectionEnum()

NET_API_STATUS __stdcall NetrConnectionEnum ( SRVSVC_HANDLE  ServerName,
WCHAR Qualifier,
LPCONNECT_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 162 of file rpcserver.c.

169{
171 return 0;
172}

Referenced by implicit_handle(), and NetConnectionEnum().

◆ NetrDfsCreateExitPoint()

NET_API_STATUS __stdcall NetrDfsCreateExitPoint ( SRVSVC_HANDLE  ServerName,
GUID Uid,
WCHAR Prefix,
unsigned long  Type,
DWORD  ShortPrefixLen,
WCHAR ShortPrefix 
)

Definition at line 893 of file rpcserver.c.

900{
903}

Referenced by implicit_handle().

◆ NetrDfsCreateLocalPartition()

NET_API_STATUS __stdcall NetrDfsCreateLocalPartition ( SRVSVC_HANDLE  ServerName,
WCHAR ShareName,
GUID EntryUid,
WCHAR EntryPrefix,
WCHAR ShortName,
LPNET_DFS_ENTRY_ID_CONTAINER  RelationInfo,
int  Force 
)

Definition at line 839 of file rpcserver.c.

847{
850}

Referenced by implicit_handle().

◆ NetrDfsDeleteExitPoint()

NET_API_STATUS __stdcall NetrDfsDeleteExitPoint ( SRVSVC_HANDLE  ServerName,
GUID Uid,
WCHAR Prefix,
unsigned long  Type 
)

Definition at line 909 of file rpcserver.c.

914{
917}

Referenced by implicit_handle().

◆ NetrDfsDeleteLocalPartition()

NET_API_STATUS __stdcall NetrDfsDeleteLocalPartition ( SRVSVC_HANDLE  ServerName,
GUID Uid,
WCHAR Prefix 
)

Definition at line 856 of file rpcserver.c.

860{
863}

Referenced by implicit_handle().

◆ NetrDfsFixLocalVolume()

NET_API_STATUS __stdcall NetrDfsFixLocalVolume ( SRVSVC_HANDLE  ServerName,
WCHAR VolumeName,
unsigned long  EntryType,
unsigned long  ServiceType,
WCHAR StgId,
GUID EntryUid,
WCHAR EntryPrefix,
LPNET_DFS_ENTRY_ID_CONTAINER  RelationInfo,
unsigned long  CreateDisposition 
)

Definition at line 936 of file rpcserver.c.

946{
949}

Referenced by implicit_handle().

◆ NetrDfsGetVersion()

NET_API_STATUS __stdcall NetrDfsGetVersion ( SRVSVC_HANDLE  ServerName,
DWORD Version 
)

Definition at line 827 of file rpcserver.c.

830{
833}

Referenced by implicit_handle().

◆ NetrDfsManagerReportSiteInfo()

NET_API_STATUS __stdcall NetrDfsManagerReportSiteInfo ( SRVSVC_HANDLE  ServerName,
LPDFS_SITELIST_INFO ppSiteInfo 
)

Definition at line 955 of file rpcserver.c.

958{
961}

Referenced by implicit_handle().

◆ NetrDfsModifyPrefix()

NET_API_STATUS __stdcall NetrDfsModifyPrefix ( SRVSVC_HANDLE  ServerName,
GUID Uid,
WCHAR Prefix 
)

Definition at line 923 of file rpcserver.c.

927{
930}

Referenced by implicit_handle().

◆ NetrDfsSetLocalVolumeState()

NET_API_STATUS __stdcall NetrDfsSetLocalVolumeState ( SRVSVC_HANDLE  ServerName,
GUID Uid,
WCHAR Prefix,
unsigned long  State 
)

Definition at line 869 of file rpcserver.c.

874{
877}

Referenced by implicit_handle().

◆ NetrDfsSetServerInfo()

NET_API_STATUS __stdcall NetrDfsSetServerInfo ( void  )

Definition at line 883 of file rpcserver.c.

884{
887}

Referenced by implicit_handle().

◆ NetrFileClose()

NET_API_STATUS __stdcall NetrFileClose ( SRVSVC_HANDLE  ServerName,
DWORD  FileId 
)

Definition at line 209 of file rpcserver.c.

212{
214 return 0;
215}

Referenced by implicit_handle(), and NetFileClose().

◆ NetrFileEnum()

NET_API_STATUS __stdcall NetrFileEnum ( SRVSVC_HANDLE  ServerName,
WCHAR BasePath,
WCHAR UserName,
PFILE_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 178 of file rpcserver.c.

186{
188 return 0;
189}

Referenced by implicit_handle(), and NetFileEnum().

◆ NetrFileGetInfo()

NET_API_STATUS __stdcall NetrFileGetInfo ( SRVSVC_HANDLE  ServerName,
DWORD  FileId,
DWORD  Level,
LPFILE_INFO  InfoStruct 
)

Definition at line 195 of file rpcserver.c.

200{
202 return 0;
203}

Referenced by implicit_handle(), and NetFileGetInfo().

◆ NetrpGetFileSecurity()

DWORD __stdcall NetrpGetFileSecurity ( SRVSVC_HANDLE  ServerName,
WCHAR ShareName,
WCHAR lpFileName,
SECURITY_INFORMATION  RequestedInformation,
PADT_SECURITY_DESCRIPTOR SecurityDescriptor 
)

Definition at line 768 of file rpcserver.c.

774{
777}

Referenced by implicit_handle().

◆ NetrpSetFileSecurity()

DWORD __stdcall NetrpSetFileSecurity ( SRVSVC_HANDLE  ServerName,
WCHAR ShareName,
WCHAR lpFileName,
SECURITY_INFORMATION  SecurityInformation,
PADT_SECURITY_DESCRIPTOR  SecurityDescriptor 
)

Definition at line 783 of file rpcserver.c.

789{
792}

Referenced by implicit_handle().

◆ NetrRemoteTOD()

NET_API_STATUS __stdcall NetrRemoteTOD ( SRVSVC_HANDLE  ServerName,
LPTIME_OF_DAY_INFO BufferPtr 
)

Definition at line 548 of file rpcserver.c.

551{
552 SYSTEMTIME SystemTime;
554 TIME_ZONE_INFORMATION TimeZoneInfo;
555 DWORD TimeZoneId;
556 LPTIME_OF_DAY_INFO lpTod;
557
558 TRACE("NetrRemoteTOD(%p %p)\n", ServerName, BufferPtr);
559
560 *BufferPtr = midl_user_allocate(sizeof(TIME_OF_DAY_INFO));
561 if (*BufferPtr == NULL)
563
564 lpTod = *BufferPtr;
565
566 /* Set the seconds since 1970 */
569 &lpTod->tod_elapsedt);
570
571 /* Set the tick count */
572 lpTod->tod_msecs = GetTickCount();
573
574 /* Set the timezone */
575 TimeZoneId = GetTimeZoneInformation(&TimeZoneInfo);
576
577 switch (TimeZoneId)
578 {
580 lpTod->tod_timezone = TimeZoneInfo.Bias;
581 break;
582
584 lpTod->tod_timezone = TimeZoneInfo.Bias + TimeZoneInfo.StandardBias;
585 break;
586
588 lpTod->tod_timezone = TimeZoneInfo.Bias + TimeZoneInfo.DaylightBias;
589 break;
590
591 default:
592 lpTod->tod_timezone = 0;
593 }
594
595 /* Set the ??? */
596 lpTod->tod_tinterval = 310;
597
598 /* Set the date and time */
599 GetSystemTime(&SystemTime);
600 lpTod->tod_hours = SystemTime.wHour;
601 lpTod->tod_mins = SystemTime.wMinute;
602 lpTod->tod_secs = SystemTime.wSecond;
603 lpTod->tod_hunds = SystemTime.wMilliseconds / 10;
604 lpTod->tod_day = SystemTime.wDay;
605 lpTod->tod_month = SystemTime.wMonth;
606 lpTod->tod_year = SystemTime.wYear;
607 lpTod->tod_weekday = SystemTime.wDayOfWeek;
608
609 return NERR_Success;
610}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:327
DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
Definition: timezone.c:262
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
#define NERR_Success
Definition: lmerr.h:5
static PLARGE_INTEGER Time
Definition: time.c:105
#define TIME_ZONE_ID_UNKNOWN
Definition: rtltypes.h:252
#define TIME_ZONE_ID_STANDARD
Definition: rtltypes.h:253
#define TIME_ZONE_ID_DAYLIGHT
Definition: rtltypes.h:254
NTSTATUS NTAPI NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
Definition: time.c:483
#define midl_user_allocate
Definition: rpc.h:44
#define TRACE(s)
Definition: solgame.cpp:4
WORD wYear
Definition: winbase.h:905
WORD wMilliseconds
Definition: winbase.h:912
WORD wMonth
Definition: winbase.h:906
WORD wHour
Definition: winbase.h:909
WORD wSecond
Definition: winbase.h:911
WORD wMinute
Definition: winbase.h:910
WORD wDay
Definition: winbase.h:908
WORD wDayOfWeek
Definition: winbase.h:907
DWORD tod_tinterval
Definition: lmremutl.h:30
DWORD tod_elapsedt
Definition: lmremutl.h:23
DWORD tod_weekday
Definition: lmremutl.h:34

Referenced by implicit_handle(), and NetRemoteTOD().

◆ NetrServerDiskEnum()

NET_API_STATUS __stdcall NetrServerDiskEnum ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
DISK_ENUM_CONTAINER DiskInfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 456 of file rpcserver.c.

463{
466}

Referenced by implicit_handle(), and NetServerDiskEnum().

◆ NetrServerGetInfo()

NET_API_STATUS __stdcall NetrServerGetInfo ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPSERVER_INFO InfoStruct 
)

Definition at line 348 of file rpcserver.c.

352{
353 WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
354 DWORD dwComputerNameLength, dwSize;
355 PSERVER_INFO pServerInfo = NULL;
357
358 TRACE("NetrServerGetInfo(%p %lu %p)\n",
359 ServerName, Level, InfoStruct);
360
361 dwComputerNameLength = MAX_COMPUTERNAME_LENGTH + 1;
362 GetComputerNameW(szComputerName, &dwComputerNameLength);
363 dwComputerNameLength++; /* include NULL terminator */
364
367
368 switch (Level)
369 {
370 case 100:
371 dwSize = sizeof(SERVER_INFO_100) +
372 dwComputerNameLength * sizeof(WCHAR);
373 pServerInfo = midl_user_allocate(dwSize);
374 if (pServerInfo == NULL)
376
378 pServerInfo->ServerInfo100.sv100_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_100));
379 wcscpy(pServerInfo->ServerInfo100.sv100_name, szComputerName);
380
381 *InfoStruct = pServerInfo;
382 break;
383
384 case 101:
385 dwSize = sizeof(SERVER_INFO_101) +
386 dwComputerNameLength * sizeof(WCHAR);
387 pServerInfo = midl_user_allocate(dwSize);
388 if (pServerInfo == NULL)
390
392 pServerInfo->ServerInfo101.sv101_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_101));
393 wcscpy(pServerInfo->ServerInfo101.sv101_name, szComputerName);
394
398 pServerInfo->ServerInfo101.sv101_comment = NULL; /* FIXME */
399
400 *InfoStruct = pServerInfo;
401 break;
402
403 case 102:
404 dwSize = sizeof(SERVER_INFO_102) +
405 dwComputerNameLength * sizeof(WCHAR);
406 pServerInfo = midl_user_allocate(dwSize);
407 if (pServerInfo == NULL)
409
411 pServerInfo->ServerInfo102.sv102_name = (LPWSTR)((ULONG_PTR)pServerInfo + sizeof(SERVER_INFO_102));
412 wcscpy(pServerInfo->ServerInfo102.sv102_name, szComputerName);
413
417 pServerInfo->ServerInfo102.sv102_comment = NULL; /* FIXME */
418
419 pServerInfo->ServerInfo102.sv102_users = 0; /* FIXME */
420 pServerInfo->ServerInfo102.sv102_disc = 0; /* FIXME */
421 pServerInfo->ServerInfo102.sv102_hidden = SV_VISIBLE; /* FIXME */
422 pServerInfo->ServerInfo102.sv102_announce = 0; /* FIXME */
423 pServerInfo->ServerInfo102.sv102_anndelta = 0; /* FIXME */
424 pServerInfo->ServerInfo102.sv102_licenses = 0; /* FIXME */
425 pServerInfo->ServerInfo102.sv102_userpath = NULL; /* FIXME */
426
427 *InfoStruct = pServerInfo;
428 break;
429
430 default:
431 FIXME("level %d unimplemented\n", Level);
432 return ERROR_INVALID_LEVEL;
433 }
434
435 return NERR_Success;
436}
DWORD dwServiceBits
Definition: srvsvc.c:40
OSVERSIONINFOW VersionInfo
Definition: wkssvc.c:40
#define FIXME(fmt,...)
Definition: debug.h:111
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
Definition: compname.c:446
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
#define PLATFORM_ID_NT
Definition: lmcons.h:60
#define SV_TYPE_NT
Definition: lmserver.h:440
struct _SERVER_INFO_101 SERVER_INFO_101
#define SV_VISIBLE
Definition: lmserver.h:459
struct _SERVER_INFO_102 SERVER_INFO_102
struct _SERVER_INFO_100 SERVER_INFO_100
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ULONG dwMinorVersion
Definition: rtltypes.h:248
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:246
ULONG dwMajorVersion
Definition: rtltypes.h:247
DWORD sv100_platform_id
Definition: lmserver.h:12
LPWSTR sv100_name
Definition: lmserver.h:13
DWORD sv101_version_minor
Definition: lmserver.h:20
LPWSTR sv101_name
Definition: lmserver.h:18
LPWSTR sv101_comment
Definition: lmserver.h:22
DWORD sv101_version_major
Definition: lmserver.h:19
DWORD sv101_platform_id
Definition: lmserver.h:17
DWORD sv101_type
Definition: lmserver.h:21
LPWSTR sv102_name
Definition: lmserver.h:27
LPWSTR sv102_comment
Definition: lmserver.h:31
DWORD sv102_platform_id
Definition: lmserver.h:26
DWORD sv102_version_major
Definition: lmserver.h:28
DWORD sv102_anndelta
Definition: lmserver.h:36
DWORD sv102_licenses
Definition: lmserver.h:37
DWORD sv102_version_minor
Definition: lmserver.h:29
DWORD sv102_type
Definition: lmserver.h:30
DWORD sv102_users
Definition: lmserver.h:32
BOOL sv102_hidden
Definition: lmserver.h:34
DWORD sv102_announce
Definition: lmserver.h:35
LPWSTR sv102_userpath
Definition: lmserver.h:38
uint32_t ULONG_PTR
Definition: typedefs.h:65
SERVER_INFO_101 ServerInfo101
Definition: srvsvc.idl:796
SERVER_INFO_102 ServerInfo102
Definition: srvsvc.idl:797
SERVER_INFO_100 ServerInfo100
Definition: srvsvc.idl:795
#define MAX_COMPUTERNAME_LENGTH
Definition: winbase.h:243
#define ERROR_INVALID_LEVEL
Definition: winerror.h:196
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by implicit_handle(), and NetServerGetInfo().

◆ NetrServerSetInfo()

NET_API_STATUS __stdcall NetrServerSetInfo ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPSERVER_INFO  ServerInfo,
DWORD ParmErr 
)

Definition at line 442 of file rpcserver.c.

447{
450}

Referenced by implicit_handle(), and NetServerSetInfo().

◆ NetrServerSetServiceBits()

NET_API_STATUS __stdcall NetrServerSetServiceBits ( SRVSVC_HANDLE  ServerName,
WCHAR Transport,
DWORD  ServiceBits,
DWORD  UpdateImmediately 
)

Definition at line 616 of file rpcserver.c.

621{
622 FIXME("NetrServerSetServiceBits(%p %s %lx %lu)\n",
623 ServerName, debugstr_w(Transport), ServiceBits, UpdateImmediately);
624
625 /* FIXME: Support Transport */
626 /* FIXME: Support UpdateImmdiately */
627
628 dwServiceBits = ServiceBits;
629
630 return NERR_Success;
631}
#define debugstr_w
Definition: kernel32.h:32

Referenced by I_NetServerSetServiceBits(), and implicit_handle().

◆ NetrServerSetServiceBitsEx()

NET_API_STATUS __stdcall NetrServerSetServiceBitsEx ( SRVSVC_HANDLE  ServerName,
WCHAR EmulatedServer,
WCHAR Transport,
DWORD  ServiceBitsOfInterest,
DWORD  ServiceBits,
DWORD  UpdateImmediately 
)

Definition at line 811 of file rpcserver.c.

818{
821}

Referenced by implicit_handle().

◆ NetrServerStatisticsGet()

NET_API_STATUS __stdcall NetrServerStatisticsGet ( SRVSVC_HANDLE  ServerName,
WCHAR Service,
DWORD  Level,
DWORD  Options,
LPSTAT_SERVER_0 InfoStruct 
)

Definition at line 472 of file rpcserver.c.

478{
479 PSTAT_SERVER_0 pStatBuffer;
480
481 TRACE("NetrServerStatisticsGet(%p %p %lu 0x%lx %p)\n",
482 ServerName, Service, Level, Options, InfoStruct);
483
484 if (Level != 0)
485 return ERROR_INVALID_LEVEL;
486
487 if (Options != 0)
489
490 pStatBuffer = midl_user_allocate(sizeof(STAT_SERVER_0));
491 if (pStatBuffer == NULL)
493
494 ZeroMemory(pStatBuffer, sizeof(STAT_SERVER_0));
495
496 // FIXME: Return the actual statistcs data!
497
498 *InfoStruct = pStatBuffer;
499
500 return NERR_Success;
501}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
@ Service
Definition: ntsecapi.h:292
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
#define ZeroMemory
Definition: winbase.h:1712

Referenced by implicit_handle(), and NetStatisticsGet().

◆ NetrServerTransportAdd()

NET_API_STATUS __stdcall NetrServerTransportAdd ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPSERVER_TRANSPORT_INFO_0  Buffer 
)

Definition at line 507 of file rpcserver.c.

511{
514}

Referenced by implicit_handle(), and NetServerTransportAdd().

◆ NetrServerTransportAddEx()

NET_API_STATUS __stdcall NetrServerTransportAddEx ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPTRANSPORT_INFO  Buffer 
)

Definition at line 798 of file rpcserver.c.

802{
805}

Referenced by implicit_handle(), and NetServerTransportAddEx().

◆ NetrServerTransportDel()

NET_API_STATUS __stdcall NetrServerTransportDel ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPSERVER_TRANSPORT_INFO_0  Buffer 
)

Definition at line 535 of file rpcserver.c.

539{
542}

Referenced by implicit_handle(), and NetServerTransportDel().

◆ NetrServerTransportDelEx()

NET_API_STATUS __stdcall NetrServerTransportDelEx ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPTRANSPORT_INFO  Buffer 
)

Definition at line 967 of file rpcserver.c.

971{
974}

Referenced by implicit_handle().

◆ NetrServerTransportEnum()

NET_API_STATUS __stdcall NetrServerTransportEnum ( SRVSVC_HANDLE  ServerName,
LPSERVER_XPORT_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 520 of file rpcserver.c.

526{
529}

Referenced by implicit_handle(), and NetServerTransportEnum().

◆ NetrSessionDel()

NET_API_STATUS __stdcall NetrSessionDel ( SRVSVC_HANDLE  ServerName,
WCHAR ClientName,
WCHAR UserName 
)

Definition at line 238 of file rpcserver.c.

242{
245}

Referenced by implicit_handle(), and NetSessionDel().

◆ NetrSessionEnum()

NET_API_STATUS __stdcall NetrSessionEnum ( SRVSVC_HANDLE  ServerName,
WCHAR ClientName,
WCHAR UserName,
PSESSION_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 221 of file rpcserver.c.

229{
231 return 0;
232}

Referenced by implicit_handle(), NetSessionEnum(), and NetSessionGetInfo().

◆ NetrShareAdd()

NET_API_STATUS __stdcall NetrShareAdd ( SRVSVC_HANDLE  ServerName,
DWORD  Level,
LPSHARE_INFO  InfoStruct,
DWORD ParmErr 
)

Definition at line 251 of file rpcserver.c.

256{
259}

Referenced by implicit_handle(), and NetShareAdd().

◆ NetrShareCheck()

NET_API_STATUS __stdcall NetrShareCheck ( SRVSVC_HANDLE  ServerName,
WCHAR Device,
DWORD Type 
)

Definition at line 335 of file rpcserver.c.

339{
342}

Referenced by implicit_handle(), and NetShareCheck().

◆ NetrShareDel()

NET_API_STATUS __stdcall NetrShareDel ( SRVSVC_HANDLE  ServerName,
WCHAR NetName,
DWORD  Reserved 
)

Definition at line 309 of file rpcserver.c.

313{
316}

Referenced by implicit_handle(), and NetShareDel().

◆ NetrShareDelCommit()

NET_API_STATUS __stdcall NetrShareDelCommit ( PSHARE_DEL_HANDLE  ContextHandle)

Definition at line 757 of file rpcserver.c.

759{
762}

Referenced by implicit_handle().

◆ NetrShareDelStart()

NET_API_STATUS __stdcall NetrShareDelStart ( SRVSVC_HANDLE  ServerName,
WCHAR NetName,
DWORD  Reserved,
PSHARE_DEL_HANDLE  ContextHandle 
)

Definition at line 743 of file rpcserver.c.

748{
751}

Referenced by implicit_handle().

◆ NetrShareDelSticky()

NET_API_STATUS __stdcall NetrShareDelSticky ( SRVSVC_HANDLE  ServerName,
WCHAR NetName,
DWORD  Reserved 
)

Definition at line 322 of file rpcserver.c.

326{
329}

Referenced by implicit_handle(), and NetShareDelSticky().

◆ NetrShareEnum()

NET_API_STATUS __stdcall NetrShareEnum ( SRVSVC_HANDLE  ServerName,
LPSHARE_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 265 of file rpcserver.c.

271{
274}

Referenced by implicit_handle(), NetShareEnum(), and NetShareEnumSticky().

◆ NetrShareEnumSticky()

NET_API_STATUS __stdcall NetrShareEnumSticky ( SRVSVC_HANDLE  ServerName,
LPSHARE_ENUM_STRUCT  InfoStruct,
DWORD  PreferedMaximumLength,
DWORD TotalEntries,
DWORD ResumeHandle 
)

Definition at line 728 of file rpcserver.c.

734{
737}

Referenced by implicit_handle().

◆ NetrShareGetInfo()

NET_API_STATUS __stdcall NetrShareGetInfo ( SRVSVC_HANDLE  ServerName,
WCHAR NetName,
DWORD  Level,
LPSHARE_INFO  InfoStruct 
)

Definition at line 280 of file rpcserver.c.

285{
288}

Referenced by implicit_handle(), and NetShareGetInfo().

◆ NetrShareSetInfo()

NET_API_STATUS __stdcall NetrShareSetInfo ( SRVSVC_HANDLE  ServerName,
WCHAR NetName,
DWORD  Level,
LPSHARE_INFO  ShareInfo,
DWORD ParmErr 
)

Definition at line 294 of file rpcserver.c.

300{
303}

Referenced by implicit_handle(), and NetShareSetInfo().

◆ Opnum0NotUsedOnWire()

void __stdcall Opnum0NotUsedOnWire ( void  )

Definition at line 91 of file rpcserver.c.

92{
94}

Referenced by implicit_handle().

◆ Opnum1NotUsedOnWire()

void __stdcall Opnum1NotUsedOnWire ( void  )

Definition at line 100 of file rpcserver.c.

101{
103}

Referenced by implicit_handle().

◆ Opnum2NotUsedOnWire()

void __stdcall Opnum2NotUsedOnWire ( void  )

Definition at line 109 of file rpcserver.c.

110{
112}

Referenced by implicit_handle().

◆ Opnum3NotUsedOnWire()

void __stdcall Opnum3NotUsedOnWire ( void  )

Definition at line 118 of file rpcserver.c.

119{
121}

Referenced by implicit_handle().

◆ Opnum4NotUsedOnWire()

void __stdcall Opnum4NotUsedOnWire ( void  )

Definition at line 127 of file rpcserver.c.

128{
130}

Referenced by implicit_handle().

◆ Opnum5NotUsedOnWire()

void __stdcall Opnum5NotUsedOnWire ( void  )

Definition at line 135 of file rpcserver.c.

136{
138}

Referenced by implicit_handle().

◆ Opnum6NotUsedOnWire()

void __stdcall Opnum6NotUsedOnWire ( void  )

Definition at line 144 of file rpcserver.c.

145{
147}

Referenced by implicit_handle().

◆ Opnum7NotUsedOnWire()

void __stdcall Opnum7NotUsedOnWire ( void  )

Definition at line 153 of file rpcserver.c.

154{
156}

Referenced by implicit_handle().

◆ RpcThreadRoutine()

DWORD WINAPI RpcThreadRoutine ( LPVOID  lpParameter)

Definition at line 42 of file rpcserver.c.

44{
46
47 Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\srvsvc", NULL);
48 if (Status != RPC_S_OK)
49 {
50 ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
51 return 0;
52 }
53
54 Status = RpcServerRegisterIf(srvsvc_v3_0_s_ifspec, NULL, NULL);
55 if (Status != RPC_S_OK)
56 {
57 ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
58 return 0;
59 }
60
62 if (Status != RPC_S_OK)
63 {
64 ERR("RpcServerListen() failed (Status %lx)\n", Status);
65 }
66
67 return 0;
68}
#define ERR(fmt,...)
Definition: debug.h:110
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:25
#define L(x)
Definition: ntvdm.h:50
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1520
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1116
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:927
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
Definition: rpcdce.h:122
#define RPC_S_OK
Definition: rpcnterr.h:22
long RPC_STATUS
Definition: rpc.h:52

◆ SHARE_DEL_HANDLE_rundown()

void __RPC_USER SHARE_DEL_HANDLE_rundown ( SHARE_DEL_HANDLE  hClientHandle)

Definition at line 83 of file rpcserver.c.

84{
85}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( srvsvc  )