|
JWSCL Documentation
|
class procedure Initialize(SecurityData: PJwSecurityInitializationData; var AuthenticationList: TJwAuthenticationInfoList; AuthenticationLevel: TJwComAuthenticationLevel; ImpersonationLevel: TJwComImpersonationLevel; Capabilities: TJwComAuthenticationCapabilities; const AutoDestroy: Boolean; const IgnoreProcess: Boolean = false); virtual; overload;
Initialize is the main class procedure to initialize the process wide security settings for a client and server process using CoInitializeSecurity.
Use this call only for a COM Server that is also a COM client.
If you intend to use this function (effectively CoInitializeSecurity) in a service provided by VCL (TService) you need to call it in a different way:
var
SaveInitProc: Pointer = nil;
procedure InitComServer;
begin
//In a service, add code to CoInitializeSecurity here
if SaveInitProc <> nil then TProcedure(SaveInitProc);
end;
initialization
SaveInitProc := InitProc;
InitProc := @InitComServer;
In this way the call to CoInitializeSecurity is made before VCL inits COM.
For more information see http://blog.delphi-jedi.net/2009/12/16/windows-2003-server-requires-startservicectrldispatcher/
|
Exceptions |
Description |
|
This exception will be raised if :
| |
|
This exception will be raised if a security descriptor is supplied which does not allow SYSTEM full access. COM cannot work then. | |
|
This exception will be raised if IgnoreProcess is true and the current process' name can be found in global variable JwKnownComHostProcesses. | |
|
CoInitialize was not called or CoInitializeSecurity was already called. You need to call CoInitialize first or call CoUnitialize, CoInitialize and then again this method. | |
|
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc. |
|
What do you think about this topic? Send feedback!
|