ReactOS  0.4.14-dev-57-g333b8f1
connectmanager.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagINetConnectionItem
 
class  CNetConnectionManager
 
class  CNetConnection
 

Typedefs

typedef struct tagINetConnectionItem INetConnectionItem
 
typedef struct tagINetConnectionItemPINetConnectionItem
 

Functions

BOOL GetAdapterIndexFromNetCfgInstanceId (PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetCfg, PDWORD pIndex)
 
HRESULT WINAPI CNetConnectionManager_CreateInstance (REFIID riid, LPVOID *ppv)
 

Typedef Documentation

◆ INetConnectionItem

◆ PINetConnectionItem

Function Documentation

◆ CNetConnectionManager_CreateInstance()

HRESULT WINAPI CNetConnectionManager_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 696 of file connectmanager.cpp.

697 {
698 #if USE_CUSTOM_CONMGR
699  return ShellObjectCreatorInit<CNetConnectionManager>(riid, ppv);
700 #else
701  return CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_ALL, riid, ppv);
702 #endif
703 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
EXTERN_C const CLSID CLSID_ConnectionManager
Definition: netcon.h:172
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234

Referenced by ILGetConnection(), CEnumIDList::Initialize(), and CLanStatus::InitializeNetTaskbarNotifications().

◆ GetAdapterIndexFromNetCfgInstanceId()

BOOL GetAdapterIndexFromNetCfgInstanceId ( PIP_ADAPTER_INFO  pAdapterInfo,
LPWSTR  szNetCfg,
PDWORD  pIndex 
)

Definition at line 454 of file connectmanager.cpp.

455 {
456  WCHAR szBuffer[50];
457  IP_ADAPTER_INFO * pCurrentAdapter;
458 
459  pCurrentAdapter = pAdapterInfo;
460  while (pCurrentAdapter)
461  {
462  szBuffer[0] = L'\0';
463  if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0])))
464  {
465  szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
466  }
467  if (!_wcsicmp(szBuffer, szNetCfg))
468  {
469  *pIndex = pCurrentAdapter->Index;
470  return TRUE;
471  }
472  pCurrentAdapter = pCurrentAdapter->Next;
473  }
474  return FALSE;
475 }
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:99
char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]
Definition: iptypes.h:55
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR L[]
Definition: oid.c:1250
_Out_ PULONG _Out_ PULONG pIndex
Definition: ndis.h:4564
#define MultiByteToWideChar
Definition: compat.h:100
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
struct _IP_ADAPTER_INFO * Next
Definition: iptypes.h:53

Referenced by CNetConnectionManager::EnumerateINetConnections(), and InitializePropertyDialog().