Export (0) Print
Expand All

IBitsTokenOptions::SetHelperToken method

Sets the helper token to impersonate the token of the COM client. Because an application sets the token through COM impersonation, the token is not persistent and is valid only for the lifetime of a session. When the BITS service receives a log-off notification, the BITS service discards any helper tokens that are associated with the transfer job.

Syntax


HRESULT SetHelperToken();

Parameters

This method has no parameters.

Return value

The following value might be returned:

Return code/valueDescription
CO_E_FAILEDTOIMPERSONATE
0x80010123

COM settings on the client do not allow impersonate-level access to the client token.

 

Remarks

The SetHelperToken method can only be called by administrators.

The impersonation level for the proxy blanket must be set to either RPC_C_IMP_LEVEL_IMPERSONATE or RPC_C_IMP_LEVEL_DELEGATE. For more information, see Security Blanket Negotiation.

The cloaking flag should be set to EOAC_DYNAMIC_CLOAKING, which enables the COM server to use the thread token as the client's identity. For more information, see Cloaking and EOLE_AUTHENTICATION_CAPABILITIES Enumeration.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Redistributable

Windows Management Framework on Windows Vista with SP1, Windows Vista with SP2, and Windows Server 2008 with SP2

Header

Bits4_0.h

IDL

Bits4_0.idl

IID

IID_IBitsTokenOptions is defined as 9a2584c3-f7d2-457a-9a5e-22b67bffc7d2

See also

IBitsTokenOptions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft