summaryrefslogtreecommitdiffstats
path: root/private/ole32/dcomss/dcomss.h
blob: 230ed08c2b8c2a870ef91c2ed23a7f920990f580 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*++

Copyright (c) 1995 Microsoft Corporation

Module Name:

    dcomss.h

Abstract:

    Common services provided by core the orpcss service.

Author:

    Mario Goertzel    [MarioGo]

Revision History:

    MarioGo     06-14-95    Bits 'n pieces

--*/

#ifndef __DCOMSS_H
#define __DCOMSS_H

#ifdef __cplusplus
extern "C" {
#endif

#include <nt.h>
#include <ntdef.h>
#include <ntrtl.h>
#include <nturtl.h>
#include <windows.h>
#include <rpc.h>
#include <winsvc.h>

#if DBG && !defined(DEBUGRPC)
#define DEBUGRPC
#endif

// Endpoint related functions

RPC_STATUS InitializeEndpointManager(VOID);
USHORT     GetProtseqId(PWSTR Protseq);
USHORT     GetProtseqIdAnsi(PSTR Protseq);
PWSTR      GetProtseq(USHORT ProtseqId);
PWSTR      GetEndpoint(USHORT ProtseqId);
RPC_STATUS UseProtseqIfNecessary(USHORT id);
RPC_STATUS DelayedUseProtseq(USHORT id);
VOID       CompleteDelayedUseProtseqs();
BOOL       IsLocal(USHORT ProtseqId);
DWORD      RegisterAuthInfoIfNecessary();

// Must be given dedicated a thread after startup.

DWORD      ObjectExporterWorkerThread(PVOID);

// Update service state

VOID UpdateState(DWORD dwNewState);

// TRUE when NOT running as a service.
extern BOOL gfDebugMode;

extern BOOL gfRegisteredAuthInfo;

extern BOOL s_fEnableDCOM; // Set by StartObjectExporter.

// Each component subservice supplies a start function.  These
// functions should check gfDebugMode before doing a service
// manager releated stuff. (calling UpdateState() is ok.)

DWORD StartEndpointMapper(VOID);
DWORD StartObjectExporter(VOID);
DWORD InitializeSCM(VOID);
void  InitializeSCMAfterListen(VOID);

// Shared by wrapper\epts.c and olescm\clsdata.cxx.

typedef enum {
    STOPPED = 1,
    START,
    STARTED
    } PROTSEQ_STATE;

typedef struct {
    PROTSEQ_STATE state;
    PWSTR         pwstrProtseq;
    PWSTR         pwstrEndpoint;
    } PROTSEQ_INFO;

#ifdef __cplusplus
}
#endif

#endif