Source code of Windows XP (NT5)
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.
|
|
#include "lm.h"
#pragma pack(1)
typedef struct _IDNETRESOURCE // idn
{ WORD cb; BYTE bFlags; // Display type in low nibble
BYTE uType; BYTE uUsage; // Usage in low nibble, More Flags in high nibble
CHAR szNetResName[1]; // char szProvider[*] - If NET_HASPROVIDER bit is set
// char szComment[*] - If NET_HASCOMMENT bit is set.
// WCHAR szNetResNameWide[*] - If NET_UNICODE bit it set.
// WCHAR szProviderWide[*] - If NET_UNICODE and NET_HASPROVIDER
// WCHAR szCommentWide[*] - If NET_UNICODE and NET_HASCOMMENT
} IDNETRESOURCE, *LPIDNETRESOURCE; typedef const IDNETRESOURCE *LPCIDNETRESOURCE; #pragma pack()
//===========================================================================
// CNetwork: Some private macro - but probably needed in .cpp file.
//===========================================================================
#define NET_DISPLAYNAMEOFFSET ((UINT)((LPIDNETRESOURCE)0)->szNetResName)
#define NET_GetFlags(pidnRel) ((pidnRel)->bFlags)
#define NET_GetDisplayType(pidnRel) ((pidnRel)->bFlags & 0x0f)
#define NET_GetType(pidnRel) ((pidnRel)->uType)
#define NET_GetUsage(pidnRel) ((pidnRel)->uUsage & 0x0f)
#define NET_IsReg(pidnRel) ((pidnRel)->bFlags == SHID_NET_REGITEM)
#define NET_IsJunction(pidnRel) ((pidnRel)->bFlags & SHID_JUNCTION)
#define NET_IsRootReg(pidnRel) ((pidnRel)->bFlags == SHID_NET_ROOTREGITEM)
#define NET_IsFake(pidnRel) ((pidnRel)->szNetResName[0] == '\0')
// Define some Flags that are on high nibble of uUsage byte
#define NET_HASPROVIDER 0x80 // Has own copy of provider
#define NET_HASCOMMENT 0x40 // Has comment field in pidl
#define NET_REMOTEFLD 0x20 // Is remote folder
#define NET_UNICODE 0x10 // Has unicode names
#define NET_FHasComment(pidnRel) ((pidnRel)->uUsage & NET_HASCOMMENT)
#define NET_FHasProvider(pidnRel) ((pidnRel)->uUsage & NET_HASPROVIDER)
#define NET_IsRemoteFld(pidnRel) ((pidnRel)->uUsage & NET_REMOTEFLD)
#define NET_IsUnicode(pidnRel) ((pidnRel)->uUsage & NET_UNICODE)
STDAPI_(BOOL) NET_IsRemoteRegItem(LPCITEMIDLIST pidl, REFCLSID rclsid, LPCITEMIDLIST* ppidlRemainder);
// These are exported form netviewx.c they are wrappers around the same WNet
// APIs, but play with the parameters to make it easier to call. They accept
// full paths rather than just drive letters.
STDAPI_(DWORD) SHWNetDisconnectDialog1 (LPDISCDLGSTRUCT lpConnDlgStruct); STDAPI_(DWORD) SHWNetGetConnection (LPCTSTR lpLocalName, LPTSTR lpRemoteName, LPDWORD lpnLength); STDAPI SHGetDomainWorkgroupIDList(LPITEMIDLIST *ppidl); STDAPI_(void) SHCacheComputerDescription(LPCTSTR pszMachineName, LPCTSTR pszDescription);
typedef struct { LPCTSTR lpName; WORD wNetType; } NETPROVIDERS;
EXTERN_C const NETPROVIDERS c_rgProviderMap[]; EXTERN_C const int c_cProviders;
STDAPI_(LPTSTR) NET_CopyResName(LPCIDNETRESOURCE pidn, LPTSTR pszBuff, UINT cchBuff); STDAPI_(LPTSTR) NET_CopyComment(LPCIDNETRESOURCE pidn, LPTSTR pszBuff, UINT cchBuff); STDAPI_(LPTSTR) NET_CopyProviderName(LPCIDNETRESOURCE pidn, LPTSTR pszBuff, UINT cchBuff);
// netcrawl.cpp
STDAPI_(void) RefreshNetCrawler();
|