ReactOS 0.4.16-dev-188-g678aa63
precomp.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winerror.h>
#include <winreg.h>
#include <winsvc.h>
#include <lmcons.h>
#include <lmerr.h>
#include <lmjoin.h>
#include <lmserver.h>
#include <ntsecapi.h>
#include <ndk/rtlfuncs.h>
#include <wkssvc_s.h>
#include <wine/debug.h>
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define WKSTA_KEEPCONN_PARMNUM   13
 
#define WKSTA_MAXCMDS_PARMNUM   15
 
#define WKSTA_SESSTIMEOUT_PARMNUM   18
 
#define WKSTA_DORMANTFILELIMIT_PARMNUM   46
 

Functions

NET_API_STATUS NetpJoinWorkgroup (_In_ LPCWSTR WorkgroupName)
 
NET_API_STATUS NetpGetJoinInformation (LPWSTR *NameBuffer, PNETSETUP_JOIN_STATUS BufferType)
 
VOID InitWorkstationInfo (VOID)
 
DWORD WINAPI RpcThreadRoutine (LPVOID lpParameter)
 

Variables

OSVERSIONINFOW VersionInfo
 
HANDLE LsaHandle
 
ULONG LsaAuthenticationPackage
 
WKSTA_INFO_502 WkstaInfo502
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 5 of file precomp.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 6 of file precomp.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 4 of file precomp.h.

◆ WKSTA_DORMANTFILELIMIT_PARMNUM

#define WKSTA_DORMANTFILELIMIT_PARMNUM   46

Definition at line 28 of file precomp.h.

◆ WKSTA_KEEPCONN_PARMNUM

#define WKSTA_KEEPCONN_PARMNUM   13

Definition at line 25 of file precomp.h.

◆ WKSTA_MAXCMDS_PARMNUM

#define WKSTA_MAXCMDS_PARMNUM   15

Definition at line 26 of file precomp.h.

◆ WKSTA_SESSTIMEOUT_PARMNUM

#define WKSTA_SESSTIMEOUT_PARMNUM   18

Definition at line 27 of file precomp.h.

Function Documentation

◆ InitWorkstationInfo()

VOID InitWorkstationInfo ( VOID  )

Definition at line 23 of file info.c.

24{
60}
WKSTA_INFO_502 WkstaInfo502
Definition: info.c:17
DWORD wki502_dormant_file_limit
Definition: lmwksta.h:148
DWORD wki502_illegal_datagram_event_reset_frequency
Definition: lmwksta.h:153
BOOL wki502_use_opportunistic_locking
Definition: lmwksta.h:155
DWORD wki502_pipe_increment
Definition: lmwksta.h:145
DWORD wki502_char_wait
Definition: lmwksta.h:134
BOOL wki502_use_raw_write
Definition: lmwksta.h:162
DWORD wki502_lock_maximum
Definition: lmwksta.h:144
DWORD wki502_cache_file_timeout
Definition: lmwksta.h:147
DWORD wki502_keep_conn
Definition: lmwksta.h:137
DWORD wki502_num_mailslot_buffers
Definition: lmwksta.h:150
BOOL wki502_force_core_create_mode
Definition: lmwksta.h:167
BOOL wki502_buf_named_pipes
Definition: lmwksta.h:158
BOOL wki502_utilize_nt_caching
Definition: lmwksta.h:160
BOOL wki502_use_close_behind
Definition: lmwksta.h:157
BOOL wki502_use_encryption
Definition: lmwksta.h:164
DWORD wki502_read_ahead_throughput
Definition: lmwksta.h:149
DWORD wki502_num_srv_announce_buffers
Definition: lmwksta.h:151
BOOL wki502_buf_read_only_files
Definition: lmwksta.h:166
DWORD wki502_siz_char_buf
Definition: lmwksta.h:140
BOOL wki502_use_unlock_behind
Definition: lmwksta.h:156
DWORD wki502_collection_time
Definition: lmwksta.h:135
BOOL wki502_use_512_byte_max_transfer
Definition: lmwksta.h:168
DWORD wki502_sess_timeout
Definition: lmwksta.h:139
BOOL wki502_log_election_packets
Definition: lmwksta.h:154
DWORD wki502_max_illegal_datagram_events
Definition: lmwksta.h:152
DWORD wki502_maximum_collection_count
Definition: lmwksta.h:136
BOOL wki502_use_raw_read
Definition: lmwksta.h:161
DWORD wki502_lock_increment
Definition: lmwksta.h:143
BOOL wki502_use_write_raw_data
Definition: lmwksta.h:163
BOOL wki502_buf_files_deny_write
Definition: lmwksta.h:165
DWORD wki502_max_cmds
Definition: lmwksta.h:138
DWORD wki502_pipe_maximum
Definition: lmwksta.h:146
DWORD wki502_lock_quota
Definition: lmwksta.h:142
DWORD wki502_max_threads
Definition: lmwksta.h:141
BOOL wki502_use_lock_read_unlock
Definition: lmwksta.h:159

Referenced by ServiceInit().

◆ NetpGetJoinInformation()

NET_API_STATUS NetpGetJoinInformation ( LPWSTR NameBuffer,
PNETSETUP_JOIN_STATUS  BufferType 
)

Definition at line 71 of file domain.c.

74{
76 PPOLICY_PRIMARY_DOMAIN_INFO PrimaryDomainInfo = NULL;
77 LSA_HANDLE PolicyHandle = NULL;
79
80 *BufferType = NetSetupUnknownStatus;
81 *NameBuffer = NULL;
82
85
89 &PolicyHandle);
90 if (!LSA_SUCCESS(Status))
92
93 Status = LsaQueryInformationPolicy(PolicyHandle,
95 (PVOID*)&PrimaryDomainInfo);
97 {
98 TRACE("Sid: %p\n", PrimaryDomainInfo->Sid);
99 TRACE("Name: %S\n", PrimaryDomainInfo->Name.Buffer);
100
101 if (PrimaryDomainInfo->Name.Length > 0)
102 {
103 if (PrimaryDomainInfo->Sid != NULL)
104 *BufferType = NetSetupDomainName;
105 else
106 *BufferType = NetSetupWorkgroupName;
107
108 *NameBuffer = midl_user_allocate(PrimaryDomainInfo->Name.Length + sizeof(WCHAR));
109 if (*NameBuffer)
110 wcscpy(*NameBuffer, PrimaryDomainInfo->Name.Buffer);
111 }
112 else
113 {
114 *BufferType = NetSetupUnjoined;
115 }
116
117 if (PrimaryDomainInfo->Sid)
118 LsaFreeMemory(PrimaryDomainInfo->Sid);
119
120 LsaFreeMemory(PrimaryDomainInfo);
121 }
122
123 LsaClose(PolicyHandle);
124
126}
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
Definition: lsa.c:1183
ULONG WINAPI LsaNtStatusToWinError(IN NTSTATUS Status)
Definition: lsa.c:1131
NTSTATUS WINAPI LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
Definition: lsa.c:1473
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
Definition: lsa.c:701
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
Definition: lsa.c:194
Status
Definition: gdiplustypes.h:25
@ NetSetupDomainName
Definition: lmjoin.h:13
@ NetSetupWorkgroupName
Definition: lmjoin.h:12
@ NetSetupUnjoined
Definition: lmjoin.h:11
@ NetSetupUnknownStatus
Definition: lmjoin.h:10
@ PolicyPrimaryDomainInformation
Definition: ntsecapi.h:245
struct _LSA_OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES
#define POLICY_VIEW_LOCAL_INFORMATION
Definition: ntsecapi.h:61
#define LSA_SUCCESS(x)
Definition: ntsecapi.h:23
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define midl_user_allocate
Definition: rpc.h:44
#define TRACE(s)
Definition: solgame.cpp:4
LSA_UNICODE_STRING Name
Definition: ntsecapi.h:570
#define ZeroMemory
Definition: winbase.h:1712
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by NetrGetJoinInformation().

◆ NetpJoinWorkgroup()

NET_API_STATUS NetpJoinWorkgroup ( _In_ LPCWSTR  WorkgroupName)

Definition at line 52 of file domain.c.

54{
56
57 FIXME("NetpJoinWorkgroup(%S)\n", lpWorkgroupName);
58
59 status = NetpSetPrimaryDomain(lpWorkgroupName);
60 if (status != NERR_Success)
61 {
62 ERR("NetpSetPrimaryDomain failed (Status %lu)\n", status);
63 return status;
64 }
65
66 return NERR_Success;
67}
static NET_API_STATUS NetpSetPrimaryDomain(_In_ LPCWSTR lpWorkgroupName)
Definition: domain.c:19
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define NERR_Success
Definition: lmerr.h:5
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
Definition: ps.c:97

Referenced by NetrJoinDomain2().

◆ RpcThreadRoutine()

DWORD WINAPI RpcThreadRoutine ( LPVOID  lpParameter)

Definition at line 20 of file rpcserver.c.

22{
24
25 Status = RpcServerUseProtseqEpW(L"ncacn_np", 20, L"\\pipe\\browser", NULL);
26 if (Status != RPC_S_OK)
27 {
28 ERR("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
29 return 0;
30 }
31
32 Status = RpcServerRegisterIf(browser_v0_0_s_ifspec, NULL, NULL);
33 if (Status != RPC_S_OK)
34 {
35 ERR("RpcServerRegisterIf() failed (Status %lx)\n", Status);
36 return 0;
37 }
38
40 if (Status != RPC_S_OK)
41 {
42 ERR("RpcServerListen() failed (Status %lx)\n", Status);
43 }
44
45 return 0;
46}
#define FALSE
Definition: types.h:117
#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

Variable Documentation

◆ LsaAuthenticationPackage

ULONG LsaAuthenticationPackage
extern

Definition at line 42 of file wkssvc.c.

Referenced by ServiceInit().

◆ LsaHandle

◆ VersionInfo

◆ WkstaInfo502

WKSTA_INFO_502 WkstaInfo502
extern

Definition at line 17 of file info.c.

Referenced by InitWorkstationInfo(), NetrWkstaGetInfo(), and NetrWkstaSetInfo().