Location: Symbol Reference > Classes > TJwServerAccessControl Class > TJwServerAccessControl Methods > TJwServerAccessControl.Load Method
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwServerAccessControl.Load Method
Pascal
function Load(const stm: IStream): HRESULT; stdcall;
Parameters 
Description 
const stm: IStream 
Receives an IStream interface. The security descriptor is read from the current position in the stream. 

This method can return several, among others, these error codes:

Value 
Description 
S_OK 
Successfully completed. Parameter cbSize contains the size. 
E_NOTIMPL 
The function is disabled due to setting property SupportIPersistStream to false. 
E_UNEXPECTED 
An exception occured that is not an EOleSysError exception. 
MakeResult(1, FacilityCode, ERROR_INVALID_BLOCK_LENGTH) 
The stored size value in the stream is not between sizeof(TSecurityDescriptor) and MAX_SECURITY_DESCRIPTOR_SIZE ($200FF). 
MakeResult(1, FacilityCode, ERROR_WRITE_FAULT) 
The stream data could not be copied to internal memory. This is because a stream function failed usually due to out of memory. 
MakeResult(1, FacilityCode, ERROR_INVALID_SECURITY_DESCR) 
The memory read from stream is not a valid security descriptor. 
others 
There can be other errors coming from a EOleSysError. The value is the same as the value of the member ErrorCode of EOleSysError.
Also see IPersistStream.Load and IPersistStream.Store for more possible error values. 

This method behaves differently in a debug or release build. In a debug build an exception is returned to the caller. This can be useful in a debugging session.

Loads a security descriptor from a stream.

This method can load different types of security descriptor streams depending on the property value PersistStreamType.

Values of type TJwPersistStreamType 
Description 
pstPlain 
Loads a security descriptor in the following format:
  1. size (Cardinal)
  2. security descriptor in self relative format (layout of struture PSecurityDescriptor)
 
pstJwscl 
Loads a security descriptor using the method LoadFromStream
pstIAccessControl 
Loads a security descriptor using the Load method of the MS IAccessControl implementation. 

This method may not be compatible to the implementation of MS IAccessControl.

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!