作者:陆麟
转载请征得作者同意.
2000.6.11
typedef struct tagPASSWORD_CACHE_ENTRY {
WORD cbEntry; // size of this entry, in bytes
WORD cbResource; // size of resource name, in bytes
WORD cbPassword; // size of password, in bytes
BYTE iEntry; // entry index
BYTE nType; // type of entry
BYTE abResource[1]; // start of resource name
// password immediately follows resource name
} PASSWORD_CACHE_ENTRY;
typedef BOOL (__stdcall *CACHECALLBACK)(PASSWORD_CACHE_ENTRY *pce);
typedef WORD (__stdcall *PWNetEnumCachedPasswords)(
LPSTR pbPrefix, //Indicate the resource name the
enumerated password function is for.
DWORD cbPrefix, //strlen of pbPrefix
DWORD nType, // resource type, 0xff for all type
CACHECALLBACK pfnCallback, //Callback when a PASSWORD_CACHE_ENTRY
had been built.
DWORD UNKNOWN /*Parameter for NP usage??? Usually
set to NULL*/ );