mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.2 KiB
71 lines
1.2 KiB
typedef struct _nwc_context {
|
|
LIST_ENTRY List ;
|
|
ULONG RefCount ;
|
|
DWORD Flags ;
|
|
LPWSTR pszBinderyName;
|
|
CCredentials *pCredentials;
|
|
NWCONN_HANDLE hConn;
|
|
BOOL fLoggedIn;
|
|
} NWC_CONTEXT, *PNWC_CONTEXT;
|
|
|
|
//typedef HANDLE NWC_CONTEXT_HANDLE, *PNWC_CONTEXT_HANDLE;
|
|
|
|
#define ENTER_BIND_CRITSECT() EnterCriticalSection(&BindCacheCritSect)
|
|
#define LEAVE_BIND_CRITSECT() LeaveCriticalSection(&BindCacheCritSect)
|
|
|
|
#define NWC_CACHE_INVALID (0x00000001)
|
|
|
|
HRESULT
|
|
BindCacheAllocEntry(
|
|
NWC_CONTEXT **ppCacheEntry
|
|
) ;
|
|
|
|
HRESULT
|
|
BindCacheFreeEntry(
|
|
NWC_CONTEXT *pCacheEntry
|
|
) ;
|
|
|
|
VOID
|
|
BindCacheInvalidateEntry(
|
|
NWC_CONTEXT *pCacheEntry
|
|
) ;
|
|
|
|
PNWC_CONTEXT
|
|
BindCacheLookupByConn(
|
|
NWCONN_HANDLE hConn
|
|
);
|
|
|
|
PNWC_CONTEXT
|
|
BindCacheLookup(
|
|
LPWSTR pszBinderyName,
|
|
CCredentials& Credentials
|
|
) ;
|
|
|
|
PNWC_CONTEXT
|
|
BindCacheLookupByConn(
|
|
NWCONN_HANDLE hConn
|
|
) ;
|
|
|
|
HRESULT
|
|
BindCacheAdd(
|
|
LPWSTR pszBinderyName,
|
|
CCredentials& Credentials,
|
|
BOOL fLoggedIn,
|
|
NWC_CONTEXT *pCacheEntry
|
|
) ;
|
|
|
|
DWORD
|
|
BindCacheDeref(
|
|
NWC_CONTEXT *pCacheEntry
|
|
) ;
|
|
|
|
VOID
|
|
BindCacheInit(
|
|
VOID
|
|
);
|
|
|
|
VOID
|
|
BindCacheCleanup(
|
|
VOID
|
|
);
|
|
|