Location: Symbol Reference > Files > JwsclExceptions.pas
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
JwsclExceptions.pas

Project JEDI Windows Security Code Library (JWSCL) 

Contains exceptions that are used by the units of the JWSCL

  • Install JCL and compile this unit with compiler directive SM_JCLDEBUG and TD32 Debug Info.
  • The GUIDs of each JWSCL exception are unique and won't be changed. If you add a new exception also add a new and unique GUID to it. They will be parsed to create JwsclExceptionMappings.inc that contains the JwExceptionMapping array. It will be used to de-/serialize exceptions to and from streams.
 

Warning: Only use Delphi 7 syntax!

1.

Christian Wimmer

 
Name 
Description 
 
 
 
 
 
EJwsclAccessTypeException is raised if the desired access mask is not included in the token access mask! 
 
 
 
 
 
 
 
EJwsclAdjustPrivilegeException is raised if the privileges of a token could not be changed 
 
 
 
 
 
ECloseDesktopException is raised if there was an error during closing a desktop. Possible cases are :
  1. Desktop handle is not valid
  2. not enough rights
 
 
 
 
 
 
ECreateDesktopException is raised if there was an error during creating a new desktop. Possible cases are :
  1. Desktop already exists
  2. Not enough rights
 
 
 
 
 
 
 
 
 
 
 
 
 
 
EDesktopException is the general exception that is raised if an error occurred during desktop manipulation. 
 
 
 
EJwsclDuplicateListEntryException is raised if a SID was already added to a list 
 
EJwsclDuplicateTokenException is raised if a call to DuplicateTokenEx failed 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
EHashMismatch is raised in case of unequal hash data 
 
EJwsclIndexOutOfBoundsException is raised if an given index is not within the bounds of a list 
 
 
 
EJwsclInitWellKnownException is raised if JwInitWellKnownSIDs was not called. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
EJwsclInvalidIndexPrivilegeException is raised if the given index is out of bounds of the privileges list 
 
 
 
EJwsclInvalidKnownSIDException is raised if TJwSecurityId.CreateWellKnownSid fails 
 
 
 
 
 
 
 
EJwsclInvalidOwnerException is raised if the given owner is invalid say nil. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
EJwsclInvalidSIDException is raised if a SID has an invalid structure 
 
EJwsclDuplicateListEntryException is raised if a SID was already added to a list 
 
 
 
EJwsclInvalidTokenHandle is raised if the handle of the token is invalid 
 
 
 
 
 
 
 
 
 
 
 
EJwsclNILParameterException is raised if a given parameter is nil which is invalid. 
 
EJwsclNilPointer A given parameter or variable is nil but must not be nil. 
 
 
 
EJwsclNotEnoughMemory is raised if a allocation function could not allocate a buffer in memory because of not enough memory 
 
EJwsclNoThreadTokenAvailable is raised if the requested impersonated token could not be retrieved 
 
EJwsclNotImplementedException is raised if the called method is not implemented yet. 
 
EOpenDesktopException is raised if there was an error during opening a desktop. Possible cases are :
  1. Desktop does not exists
 
 
EJwsclOpenProcessTokenException is raised if the process token could not be opened 
 
EJwsclOpenThreadTokenException is raised if the thread token could not be opened 
 
 
 
 
 
 
 
EJwsclPrivilegeCheckException is raised if a given privilege was not found in the list of privileges of the token 
 
EJwsclPrivilegeException is raised if an errors occurs that includes a problem with a privilege 
 
EJwsclPrivilegeNotFoundException is raised if a given privilege was not found 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
EJwsclSecurityException is the main exception class that is used if an error occurs in any Security Library unit. 
 
 
 
 
 
 
 
 
 
 
 
 
 
EJwsclSharedTokenException is raised regarding a token handle that is shared. 
 
 
 
 
 
 
 
 
 
 
 
 
 
Terminal Server Connection Exception 
 
general exception for terminal server methods 
 
 
 
 
 
general exception for terminal session methods 
 
 
 
EJwsclTokenImpersonationException is raised if the token could not be converted to an impersonated token. 
 
EJwsclTokenInformationException is raised if token information could not be retrieved. 
 
EJwsclTokenPrimaryException is raised if the requested primary token could not be retrieved. For more information see LastError
 
EJwsclUnimplemented The called function isn't implemented yet. 
 
 
 
EJwsclUnsupportedException This exception is raised if an exception could not be interpreted as an JWSCL exception. 
 
2B2288BC-7905-46F2-0019-A0183067E63D] EJwsclUnsupportedWindowsVersionException is raised if the called function is not supported under the running windows version 
 
EJwsclVistaFeaturesDisabled is raised if the JWSCL library was compiled with the compiler directive VISTA deactivated. To use vista features you must activate the directive in file includesJwscl.inc and make sure that you also compiled JwaWindows with at least WINVISTA or WIN2008 to enable Vista features. 
 
EJwsclWinCallFailedException is raised if a call to a windows API function failed. For more information see the LastError property 
 
 
 
 
 
 
 
Name 
Description 
 
This is record TJwExceptionConstructorType. 
 
Name 
Description 
 
This is function JwCreateException. 
 
This is function JwMapException. 
 
This is function JwMapException. 
 
Raises EJwsclWinCallFailedException with the given parameters. 
 
JwRaiseOnClassTypeMisMatch raises an exception EJwsclClassTypeMismatch if parameter Instance is not of type ExpectedClass. This function is like Assert but it will not be removed in a release build.
 
 
JwRaiseOnNilMemoryBlock raises an exception EJwsclNilPointer if parameter P is nil; otherwise nothing happens. This function is like Assert but it will not be removed in a release build.
 
 
JwRaiseOnNilParameter raises an exception EJwsclNILParameterException if parameter P is nil; otherwise nothing happens. This function is like Assert but it will not be removed in a release build.
 
 
Name 
Description 
 
This is record TJwExceptionMapping. 
Name 
Description 
EJwsclExceptionClass is the class of EJwsclSecurityException 
 
2B2288BC-7905-46F2-0134-A0183067E63D 
TJwOnFormatExceptionMessage is used by JwOnFormatExceptionMessage.
 
Name 
Description 
JwOnFormatExceptionMessage is called every time a JWSCL exception is raised and the message should be formatted. 
License

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ 

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 

Alternatively, the contents of this file may be used under the terms of the GNU Lesser General Public License (the "LGPL License"), in which case the provisions of the LGPL License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the LGPL License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the LGPL License. 

For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html 

The Original Code is JwsclExceptions.pas. 

The Initial Developer of the Original Code is Christian Wimmer. Portions created by Christian Wimmer are Copyright (C) Christian Wimmer. All rights reserved.

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!