1 | { **************************************************************
|
---|
2 | Package: XWB - Kernel RPCBroker
|
---|
3 | Date Created: Sept 18, 1997 (Version 1.1)
|
---|
4 | Site Name: Oakland, OI Field Office, Dept of Veteran Affairs
|
---|
5 | Developers: Joel Ivey
|
---|
6 | Description: Type library for use with uSharedBroker1 in
|
---|
7 | building RPCSharedBrokerSessionMgr1.exe.
|
---|
8 | Current Release: Version 1.1 Patch 40 (January 7, 2005))
|
---|
9 | *************************************************************** }
|
---|
10 |
|
---|
11 | unit RPCSharedBrokerSessionMgr1_TLB_SRB;
|
---|
12 |
|
---|
13 | // ************************************************************************ //
|
---|
14 | // WARNING
|
---|
15 | // -------
|
---|
16 | // The types declared in this file were generated from data read from a
|
---|
17 | // Type Library. If this type library is explicitly or indirectly (via
|
---|
18 | // another type library referring to this type library) re-imported, or the
|
---|
19 | // 'Refresh' command of the Type Library Editor activated while editing the
|
---|
20 | // Type Library, the contents of this file will be regenerated and all
|
---|
21 | // manual modifications will be lost.
|
---|
22 | // ************************************************************************ //
|
---|
23 |
|
---|
24 | // PASTLWTR : $Revision: 1.88.1.0.1.0 $
|
---|
25 | // File generated on 1/24/2002 12:39:11 PM from Type Library described below.
|
---|
26 |
|
---|
27 | // ************************************************************************ //
|
---|
28 | // Type Lib: D:\Development\RPCSharedBroker\Exe1\RPCSharedBrokerSessionMgr1.tlb (1)
|
---|
29 | // IID\LCID: {1F7D1EB0-E54F-46F0-B485-2D56743EBB70}\0
|
---|
30 | // Helpfile:
|
---|
31 | // DepndLst:
|
---|
32 | // (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
|
---|
33 | // (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
|
---|
34 | // ************************************************************************ //
|
---|
35 | {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
|
---|
36 | interface
|
---|
37 |
|
---|
38 | uses Windows, ActiveX, Classes, Graphics, {OleServer,} OleCtrls, StdVCL;
|
---|
39 |
|
---|
40 | // *********************************************************************//
|
---|
41 | // GUIDS declared in the TypeLibrary. Following prefixes are used:
|
---|
42 | // Type Libraries : LIBID_xxxx
|
---|
43 | // CoClasses : CLASS_xxxx
|
---|
44 | // DISPInterfaces : DIID_xxxx
|
---|
45 | // Non-DISP interfaces: IID_xxxx
|
---|
46 | // *********************************************************************//
|
---|
47 | const
|
---|
48 | // TypeLibrary Major and minor versions
|
---|
49 | RPCSharedBrokerSessionMgr1MajorVersion = 1;
|
---|
50 | RPCSharedBrokerSessionMgr1MinorVersion = 0;
|
---|
51 |
|
---|
52 | LIBID_RPCSharedBrokerSessionMgr1: TGUID = '{1F7D1EB0-E54F-46F0-B485-2D56743EBB70}';
|
---|
53 |
|
---|
54 | IID_ISharedBroker: TGUID = '{E1D9A5E6-B7C6-40AD-AC34-6A3E12BDC328}';
|
---|
55 | DIID_ISharedBrokerEvents: TGUID = '{CBEA7167-4F9B-465A-B82E-4CEBDF933C35}';
|
---|
56 | CLASS_SharedBroker: TGUID = '{EB44A5CD-1871-429F-A5BC-19C71B722182}';
|
---|
57 |
|
---|
58 | // *********************************************************************//
|
---|
59 | // Declaration of Enumerations defined in Type Library
|
---|
60 | // *********************************************************************//
|
---|
61 | // Constants for enum ISharedBrokerErrorCode
|
---|
62 | type
|
---|
63 | ISharedBrokerErrorCode = TOleEnum;
|
---|
64 | const
|
---|
65 | GeneralFailure = $00000000;
|
---|
66 | Success = $00000001;
|
---|
67 | UniqueRpcIdDoesNotExist = $00000002;
|
---|
68 | UniqueClientIdDoesNotExist = $00000003;
|
---|
69 | RpcHistoryIndexOutOfRange = $00000004;
|
---|
70 | RpcHistoryNotEnabled = $00000005;
|
---|
71 | CouldNotSetContext = $00000006;
|
---|
72 | CouldNotConnect = $00000007;
|
---|
73 | ClientIndexOutOfRange = $00000008;
|
---|
74 | NilClientPointer = $00000009;
|
---|
75 | ConnectionIndexOutOfRange = $0000000A;
|
---|
76 |
|
---|
77 | // Constants for enum IRegistryRootEnum
|
---|
78 | type
|
---|
79 | IRegistryRootEnum = TOleEnum;
|
---|
80 | const
|
---|
81 | HKCR = $00000000;
|
---|
82 | HKCU = $00000001;
|
---|
83 | HKLM = $00000002;
|
---|
84 | HKU = $00000003;
|
---|
85 | HKCC = $00000004;
|
---|
86 | HKDD = $00000005;
|
---|
87 |
|
---|
88 | // Constants for enum ISharedBrokerConnection
|
---|
89 | type
|
---|
90 | ISharedBrokerConnection = TOleEnum;
|
---|
91 | const
|
---|
92 | Failed = $00000000;
|
---|
93 | New = $00000001;
|
---|
94 | Shared = $00000002;
|
---|
95 | Debug = $00000003;
|
---|
96 |
|
---|
97 | // Constants for enum ISharedBrokerClient
|
---|
98 | type
|
---|
99 | ISharedBrokerClient = TOleEnum;
|
---|
100 | const
|
---|
101 | BrokerClient = $00000000;
|
---|
102 | DebuggerClient = $00000001;
|
---|
103 |
|
---|
104 | // Constants for enum ISharedBrokerShowErrorMsgs
|
---|
105 | type
|
---|
106 | ISharedBrokerShowErrorMsgs = TOleEnum;
|
---|
107 | const
|
---|
108 | isemRaise = $00000000;
|
---|
109 | isemQuiet = $00000001;
|
---|
110 |
|
---|
111 | type
|
---|
112 |
|
---|
113 | // *********************************************************************//
|
---|
114 | // Forward declaration of types defined in TypeLibrary
|
---|
115 | // *********************************************************************//
|
---|
116 | ISharedBroker = interface;
|
---|
117 | ISharedBrokerDisp = dispinterface;
|
---|
118 | ISharedBrokerEvents = dispinterface;
|
---|
119 |
|
---|
120 | // *********************************************************************//
|
---|
121 | // Declaration of CoClasses defined in Type Library
|
---|
122 | // (NOTE: Here we map each CoClass to its Default Interface)
|
---|
123 | // *********************************************************************//
|
---|
124 | SharedBroker = ISharedBroker;
|
---|
125 |
|
---|
126 |
|
---|
127 | // *********************************************************************//
|
---|
128 | // Interface: ISharedBroker
|
---|
129 | // Flags: (4416) Dual OleAutomation Dispatchable
|
---|
130 | // GUID: {E1D9A5E6-B7C6-40AD-AC34-6A3E12BDC328}
|
---|
131 | // *********************************************************************//
|
---|
132 | ISharedBroker = interface(IDispatch)
|
---|
133 | ['{E1D9A5E6-B7C6-40AD-AC34-6A3E12BDC328}']
|
---|
134 | function BrokerConnect(const ClientName: WideString; ConnectionType: ISharedBrokerClient;
|
---|
135 | const ServerPort: WideString; WantDebug: WordBool;
|
---|
136 | AllowShared: WordBool; KernelLogin: WordBool;
|
---|
137 | ShowErrMsgs: ISharedBrokerShowErrorMsgs; RpcTimeLim: SYSINT;
|
---|
138 | var LoginStr: WideString; out UniqueClientIId: SYSINT;
|
---|
139 | out ErrorMsg: WideString): ISharedBrokerErrorCode; safecall;
|
---|
140 | function BrokerDisconnect: ISharedBrokerErrorCode; safecall;
|
---|
141 | function BrokerSetContext(const OptionName: WideString): ISharedBrokerErrorCode; safecall;
|
---|
142 | function BrokerCall(const RpcName: WideString; const RpcParams: WideString;
|
---|
143 | RpcTimeLimit: Integer; out RpcResults: WideString;
|
---|
144 | out UniqueRpcCallId: Integer): ISharedBrokerErrorCode; safecall;
|
---|
145 | function ReadRegDataDefault(Root: IRegistryRootEnum; const Key: WideString;
|
---|
146 | const Name: WideString; const Default: WideString;
|
---|
147 | out RegResult: WideString): ISharedBrokerErrorCode; safecall;
|
---|
148 | function Get_RpcVersion: WideString; safecall;
|
---|
149 | procedure Set_RpcVersion(const version: WideString); safecall;
|
---|
150 | function Get_RpcHistoryEnabled: WordBool; safecall;
|
---|
151 | procedure Set_RpcHistoryEnabled(enabled: WordBool); safecall;
|
---|
152 | function Get_PerClientRpcHistoryLimit: Integer; safecall;
|
---|
153 | procedure Set_PerClientRpcHistoryLimit(limit: Integer); safecall;
|
---|
154 | function GetRpcHistoryCountForClient(UniqueClientId: Integer; out rpcHistoryCount: Integer): ISharedBrokerErrorCode; safecall;
|
---|
155 | function GetClientIdAndNameFromIndex(clientIndex: Integer; out UniqueClientId: Integer;
|
---|
156 | out ClientName: WideString): ISharedBrokerErrorCode; safecall;
|
---|
157 | function LogoutConnectedClients(logoutTimeLimit: Integer): ISharedBrokerErrorCode; safecall;
|
---|
158 | function GetClientNameFromUniqueClientId(UniqueClientId: Integer; out ClientName: WideString): ISharedBrokerErrorCode; safecall;
|
---|
159 | function GetActiveBrokerConnectionIndexCount(out connectionIndexCount: Integer): ISharedBrokerErrorCode; safecall;
|
---|
160 | function GetActiveBrokerConnectionInfo(connectionIndex: Integer;
|
---|
161 | out connectedServerIp: WideString;
|
---|
162 | out connectedServerPort: Integer;
|
---|
163 | out lastContext: WideString): ISharedBrokerErrorCode; safecall;
|
---|
164 | function GetActiveBrokerConnectionIndexFromUniqueClientId(UniqueClientId: Integer;
|
---|
165 | out connectionIndex: Integer): ISharedBrokerErrorCode; safecall;
|
---|
166 | function GetRpcCallFromHistory(uniqueRpcId: Integer; out UniqueClientId: Integer;
|
---|
167 | out brokerContext: WideString; out RpcName: WideString;
|
---|
168 | out RpcParams: WideString; out rpcResult: WideString;
|
---|
169 | out rpcStartDateTime: Double; out rpcDuration: Integer): ISharedBrokerErrorCode; safecall;
|
---|
170 | function GetRpcCallFromHistoryIndex(UniqueClientId: Integer; rpcCallIndex: Integer;
|
---|
171 | out uniqueRpcId: Integer; out brokerContext: WideString;
|
---|
172 | out RpcName: WideString; out RpcParams: WideString;
|
---|
173 | out rpcResult: WideString; out rpcStartDateTime: Double;
|
---|
174 | out rpcDuration: Integer): ISharedBrokerErrorCode; safecall;
|
---|
175 | function GetRpcClientIdFromHistory(uniqueRpcId: Integer; out UniqueClientId: Integer;
|
---|
176 | out ClientName: WideString): ISharedBrokerErrorCode; safecall;
|
---|
177 | function GetConnectedClientCount(out connectedClientCount: Integer): ISharedBrokerErrorCode; safecall;
|
---|
178 | function Get_CurrentContext: WideString; safecall;
|
---|
179 | function Get_User: WideString; safecall;
|
---|
180 | function Get_Login: WideString; safecall;
|
---|
181 | procedure Set_Login(const Value: WideString); safecall;
|
---|
182 | function Get_RpcbError: WideString; safecall;
|
---|
183 | function Get_Socket: Integer; safecall;
|
---|
184 | function Get_KernelLogin: WordBool; safecall;
|
---|
185 | procedure Set_KernelLogin(Value: WordBool); safecall;
|
---|
186 | function Get_ShowErrorMsgs: ISharedBrokerShowErrorMsgs; safecall;
|
---|
187 | procedure Set_ShowErrorMsgs(Value: ISharedBrokerShowErrorMsgs); safecall;
|
---|
188 | property RpcVersion: WideString read Get_RpcVersion write Set_RpcVersion;
|
---|
189 | property RpcHistoryEnabled: WordBool read Get_RpcHistoryEnabled write Set_RpcHistoryEnabled;
|
---|
190 | property PerClientRpcHistoryLimit: Integer read Get_PerClientRpcHistoryLimit write Set_PerClientRpcHistoryLimit;
|
---|
191 | property CurrentContext: WideString read Get_CurrentContext;
|
---|
192 | property User: WideString read Get_User;
|
---|
193 | property Login: WideString read Get_Login write Set_Login;
|
---|
194 | property RpcbError: WideString read Get_RpcbError;
|
---|
195 | property Socket: Integer read Get_Socket;
|
---|
196 | property KernelLogin: WordBool read Get_KernelLogin write Set_KernelLogin;
|
---|
197 | property ShowErrorMsgs: ISharedBrokerShowErrorMsgs read Get_ShowErrorMsgs write Set_ShowErrorMsgs;
|
---|
198 | end;
|
---|
199 |
|
---|
200 | // *********************************************************************//
|
---|
201 | // DispIntf: ISharedBrokerDisp
|
---|
202 | // Flags: (4416) Dual OleAutomation Dispatchable
|
---|
203 | // GUID: {E1D9A5E6-B7C6-40AD-AC34-6A3E12BDC328}
|
---|
204 | // *********************************************************************//
|
---|
205 | ISharedBrokerDisp = dispinterface
|
---|
206 | ['{E1D9A5E6-B7C6-40AD-AC34-6A3E12BDC328}']
|
---|
207 | function BrokerConnect(const ClientName: WideString; ConnectionType: ISharedBrokerClient;
|
---|
208 | const ServerPort: WideString; WantDebug: WordBool;
|
---|
209 | AllowShared: WordBool; KernelLogin: WordBool;
|
---|
210 | ShowErrMsgs: ISharedBrokerShowErrorMsgs; RpcTimeLim: SYSINT;
|
---|
211 | var LoginStr: WideString; out UniqueClientIId: SYSINT;
|
---|
212 | out ErrorMsg: WideString): ISharedBrokerErrorCode; dispid 1;
|
---|
213 | function BrokerDisconnect: ISharedBrokerErrorCode; dispid 2;
|
---|
214 | function BrokerSetContext(const OptionName: WideString): ISharedBrokerErrorCode; dispid 3;
|
---|
215 | function BrokerCall(const RpcName: WideString; const RpcParams: WideString;
|
---|
216 | RpcTimeLimit: Integer; out RpcResults: WideString;
|
---|
217 | out UniqueRpcCallId: Integer): ISharedBrokerErrorCode; dispid 4;
|
---|
218 | function ReadRegDataDefault(Root: IRegistryRootEnum; const Key: WideString;
|
---|
219 | const Name: WideString; const Default: WideString;
|
---|
220 | out RegResult: WideString): ISharedBrokerErrorCode; dispid 5;
|
---|
221 | property RpcVersion: WideString dispid 7;
|
---|
222 | property RpcHistoryEnabled: WordBool dispid 6;
|
---|
223 | property PerClientRpcHistoryLimit: Integer dispid 8;
|
---|
224 | function GetRpcHistoryCountForClient(UniqueClientId: Integer; out rpcHistoryCount: Integer): ISharedBrokerErrorCode; dispid 10;
|
---|
225 | function GetClientIdAndNameFromIndex(clientIndex: Integer; out UniqueClientId: Integer;
|
---|
226 | out ClientName: WideString): ISharedBrokerErrorCode; dispid 11;
|
---|
227 | function LogoutConnectedClients(logoutTimeLimit: Integer): ISharedBrokerErrorCode; dispid 12;
|
---|
228 | function GetClientNameFromUniqueClientId(UniqueClientId: Integer; out ClientName: WideString): ISharedBrokerErrorCode; dispid 13;
|
---|
229 | function GetActiveBrokerConnectionIndexCount(out connectionIndexCount: Integer): ISharedBrokerErrorCode; dispid 14;
|
---|
230 | function GetActiveBrokerConnectionInfo(connectionIndex: Integer;
|
---|
231 | out connectedServerIp: WideString;
|
---|
232 | out connectedServerPort: Integer;
|
---|
233 | out lastContext: WideString): ISharedBrokerErrorCode; dispid 15;
|
---|
234 | function GetActiveBrokerConnectionIndexFromUniqueClientId(UniqueClientId: Integer;
|
---|
235 | out connectionIndex: Integer): ISharedBrokerErrorCode; dispid 16;
|
---|
236 | function GetRpcCallFromHistory(uniqueRpcId: Integer; out UniqueClientId: Integer;
|
---|
237 | out brokerContext: WideString; out RpcName: WideString;
|
---|
238 | out RpcParams: WideString; out rpcResult: WideString;
|
---|
239 | out rpcStartDateTime: Double; out rpcDuration: Integer): ISharedBrokerErrorCode; dispid 17;
|
---|
240 | function GetRpcCallFromHistoryIndex(UniqueClientId: Integer; rpcCallIndex: Integer;
|
---|
241 | out uniqueRpcId: Integer; out brokerContext: WideString;
|
---|
242 | out RpcName: WideString; out RpcParams: WideString;
|
---|
243 | out rpcResult: WideString; out rpcStartDateTime: Double;
|
---|
244 | out rpcDuration: Integer): ISharedBrokerErrorCode; dispid 18;
|
---|
245 | function GetRpcClientIdFromHistory(uniqueRpcId: Integer; out UniqueClientId: Integer;
|
---|
246 | out ClientName: WideString): ISharedBrokerErrorCode; dispid 19;
|
---|
247 | function GetConnectedClientCount(out connectedClientCount: Integer): ISharedBrokerErrorCode; dispid 20;
|
---|
248 | property CurrentContext: WideString readonly dispid 9;
|
---|
249 | property User: WideString readonly dispid 22;
|
---|
250 | property Login: WideString dispid 23;
|
---|
251 | property RpcbError: WideString readonly dispid 24;
|
---|
252 | property Socket: Integer readonly dispid 25;
|
---|
253 | property KernelLogin: WordBool dispid 26;
|
---|
254 | property ShowErrorMsgs: ISharedBrokerShowErrorMsgs dispid 27;
|
---|
255 | end;
|
---|
256 |
|
---|
257 | // *********************************************************************//
|
---|
258 | // DispIntf: ISharedBrokerEvents
|
---|
259 | // Flags: (4096) Dispatchable
|
---|
260 | // GUID: {CBEA7167-4F9B-465A-B82E-4CEBDF933C35}
|
---|
261 | // *********************************************************************//
|
---|
262 | ISharedBrokerEvents = dispinterface
|
---|
263 | ['{CBEA7167-4F9B-465A-B82E-4CEBDF933C35}']
|
---|
264 | procedure OnLogout; dispid 1;
|
---|
265 | procedure OnRpcCallRecorded(uniqueRpcId: SYSINT); dispid 2;
|
---|
266 | procedure OnClientConnect(UniqueClientId: SYSINT; Connection: ISharedBrokerConnection); dispid 3;
|
---|
267 | procedure OnClientDisconnect(UniqueClientId: SYSINT); dispid 4;
|
---|
268 | procedure OnContextChanged(connectionIndex: SYSINT; const NewContext: WideString); dispid 5;
|
---|
269 | procedure OnRPCBFailure(const ErrorText: WideString); dispid 6;
|
---|
270 | procedure OnLoginError(const ErrorText: WideString); dispid 7;
|
---|
271 | procedure OnConnectionDropped(ConnectionIndex: SYSINT; const ErrorText: WideString); dispid 8;
|
---|
272 | end;
|
---|
273 |
|
---|
274 | // *********************************************************************//
|
---|
275 | // The Class CoSharedBroker provides a Create and CreateRemote method to
|
---|
276 | // create instances of the default interface ISharedBroker exposed by
|
---|
277 | // the CoClass SharedBroker. The functions are intended to be used by
|
---|
278 | // clients wishing to automate the CoClass objects exposed by the
|
---|
279 | // server of this typelibrary.
|
---|
280 | // *********************************************************************//
|
---|
281 | CoSharedBroker = class
|
---|
282 | class function Create: ISharedBroker;
|
---|
283 | class function CreateRemote(const MachineName: string): ISharedBroker;
|
---|
284 | end;
|
---|
285 |
|
---|
286 | implementation
|
---|
287 |
|
---|
288 | uses ComObj;
|
---|
289 |
|
---|
290 | class function CoSharedBroker.Create: ISharedBroker;
|
---|
291 | begin
|
---|
292 | Result := CreateComObject(CLASS_SharedBroker) as ISharedBroker;
|
---|
293 | end;
|
---|
294 |
|
---|
295 | class function CoSharedBroker.CreateRemote(const MachineName: string): ISharedBroker;
|
---|
296 | begin
|
---|
297 | Result := CreateRemoteComObject(MachineName, CLASS_SharedBroker) as ISharedBroker;
|
---|
298 | end;
|
---|
299 |
|
---|
300 | end.
|
---|