Interface Ole32Enhanced

All Superinterfaces:
com.sun.jna.AltCallingConvention, com.sun.jna.Library, com.sun.jna.platform.win32.Ole32, com.sun.jna.win32.StdCall, com.sun.jna.win32.StdCallLibrary

public interface Ole32Enhanced extends com.sun.jna.platform.win32.Ole32
Enhanced version of the Ole32 interface, with a proper CoSetProxyBlanket() method that manages to set authentication properly, including for a remote system.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler

    Nested classes/interfaces inherited from interface com.sun.jna.win32.StdCallLibrary

    com.sun.jna.win32.StdCallLibrary.StdCallCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Ole32Enhanced
     
    static final int
    Default authentication settings (automatic)
    static final int
    Default authorization settings (automatic)

    Fields inherited from interface com.sun.jna.Library

    OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER

    Fields inherited from interface com.sun.jna.platform.win32.Ole32

    COINIT_APARTMENTTHREADED, COINIT_DISABLE_OLE1DDE, COINIT_MULTITHREADED, COINIT_SPEED_OVER_MEMORY, EOAC_NONE, RPC_C_AUTHN_LEVEL_CALL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, RPC_C_IMP_LEVEL_IMPERSONATE

    Fields inherited from interface com.sun.jna.win32.StdCallLibrary

    FUNCTION_MAPPER, STDCALL_CONVENTION
  • Method Summary

    Modifier and Type
    Method
    Description
    com.sun.jna.platform.win32.WinNT.HRESULT
    CoSetProxyBlanket(com.sun.jna.Pointer pProxy, int dwAuthnSvc, int dwAuthzSvc, com.sun.jna.platform.win32.WTypes.LPOLESTR pServerPrincName, int dwAuthnLevel, int dwImpLevel, CoAuthIdentity authInfo, int dwCapabilities)
    Sets the authentication information that will be used to make calls on the specified proxy.

    Methods inherited from interface com.sun.jna.platform.win32.Ole32

    CLSIDFromProgID, CLSIDFromString, CoCreateGuid, CoCreateInstance, CoGetMalloc, CoInitialize, CoInitializeEx, CoInitializeSecurity, CoIsHandlerConnected, CoSetProxyBlanket, CoTaskMemAlloc, CoTaskMemFree, CoTaskMemRealloc, CoUninitialize, CreateBindCtx, GetRunningObjectTable, IIDFromString, OleFlushClipboard, OleInitialize, OleRun, OleUninitialize, StringFromGUID2
  • Field Details

    • INSTANCE

      static final Ole32Enhanced INSTANCE
    • RPC_C_AUTHN_DEFAULT

      static final int RPC_C_AUTHN_DEFAULT
      Default authentication settings (automatic)
      See Also:
    • RPC_C_AUTHZ_DEFAULT

      static final int RPC_C_AUTHZ_DEFAULT
      Default authorization settings (automatic)
      See Also:
  • Method Details

    • CoSetProxyBlanket

      com.sun.jna.platform.win32.WinNT.HRESULT CoSetProxyBlanket(com.sun.jna.Pointer pProxy, int dwAuthnSvc, int dwAuthzSvc, com.sun.jna.platform.win32.WTypes.LPOLESTR pServerPrincName, int dwAuthnLevel, int dwImpLevel, CoAuthIdentity authInfo, int dwCapabilities)
      Sets the authentication information that will be used to make calls on the specified proxy. This is a helper function for IClientSecurity::SetBlanket.
      Parameters:
      pProxy - [in] The proxy to be set.
      dwAuthnSvc - [in] The authentication service to be used. For a list of possible values, see Authentication Service Constants. Use RPC_C_AUTHN_NONE if no authentication is required. If RPC_C_AUTHN_DEFAULT is specified, DCOM will pick an authentication service following its normal security blanket negotiation algorithm.
      dwAuthzSvc - [in] The authorization service to be used. For a list of possible values, see Authorization Constants. If RPC_C_AUTHZ_DEFAULT is specified, DCOM will pick an authorization service following its normal security blanket negotiation algorithm. RPC_C_AUTHZ_NONE should be used as the authorization service if NTLMSSP, Kerberos, or Schannel is used as the authentication service.
      pServerPrincName - [in, optional] The server principal name to be used with the authentication service. If COLE_DEFAULT_PRINCIPAL is specified, DCOM will pick a principal name using its security blanket negotiation algorithm. If Kerberos is used as the authentication service, this value must not be NULL. It must be the correct principal name of the server or the call will fail. If Schannel is used as the authentication service, this value must be one of the msstd or fullsic forms described in Principal Names, or NULL if you do not want mutual authentication. Generally, specifying NULL will not reset the server principal name on the proxy; rather, the previous setting will be retained. You must be careful when using NULL as pServerPrincName when selecting a different authentication service for the proxy, because there is no guarantee that the previously set principal name would be valid for the newly selected authentication service.
      dwAuthnLevel - [in] The authentication level to be used. For a list of possible values, see Authentication Level Constants. If RPC_C_AUTHN_LEVEL_DEFAULT is specified, DCOM will pick an authentication level following its normal security blanket negotiation algorithm. If this value is none, the authentication service must also be none.
      dwImpLevel - [in] The impersonation level to be used. For a list of possible values, see Impersonation Level Constants. If RPC_C_IMP_LEVEL_DEFAULT is specified, DCOM will pick an impersonation level following its normal security blanket negotiation algorithm. If NTLMSSP is the authentication service, this value must be RPC_C_IMP_LEVEL_IMPERSONATE or RPC_C_IMP_LEVEL_IDENTIFY. NTLMSSP also supports delegate-level impersonation (RPC_C_IMP_LEVEL_DELEGATE) on the same computer. If Schannel is the authentication service, this parameter must be RPC_C_IMP_LEVEL_IMPERSONATE.
      authInfo - [in, optional] COAUTHIDENTITY structure to be used for impersonation on a remote system through this proxy.
      dwCapabilities - [in] The capabilities of this proxy. For a list of possible values, see the EOLE_AUTHENTICATION_CAPABILITIES enumeration. The only flags that can be set through this function are EOAC_MUTUAL_AUTH, EOAC_STATIC_CLOAKING, EOAC_DYNAMIC_CLOAKING, EOAC_ANY_AUTHORITY (this flag is deprecated), EOAC_MAKE_FULLSIC, and EOAC_DEFAULT. Either EOAC_STATIC_CLOAKING or EOAC_DYNAMIC_CLOAKING can be set if pAuthInfo is not set and Schannel is not the authentication service. (See Cloaking for more information.) If any capability flags other than those mentioned here are set, CoSetProxyBlanket will fail.
      Returns:
      This function can return the following values. S_OK The function was successful. E_INVALIDARG One or more arguments is invalid.