ReactOS  0.4.15-dev-5463-g138eb58
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 706 of file connectmanager.cpp.

707 {
708 #if USE_CUSTOM_CONMGR
709  return ShellObjectCreatorInit<CNetConnectionManager>(riid, ppv);
710 #else
711  return CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_ALL, riid, ppv);
712 #endif
713 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
EXTERN_C const CLSID CLSID_ConnectionManager
Definition: netcon.h:172
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define NULL
Definition: types.h:112

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

◆ GetAdapterIndexFromNetCfgInstanceId()

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

Definition at line 464 of file connectmanager.cpp.

465 {
466  WCHAR szBuffer[50];
467  IP_ADAPTER_INFO * pCurrentAdapter;
468 
469  pCurrentAdapter = pAdapterInfo;
470  while (pCurrentAdapter)
471  {
472  szBuffer[0] = L'\0';
473  if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0])))
474  {
475  szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
476  }
477  if (!_wcsicmp(szBuffer, szNetCfg))
478  {
479  *pIndex = pCurrentAdapter->Index;
480  return TRUE;
481  }
482  pCurrentAdapter = pCurrentAdapter->Next;
483  }
484  return FALSE;
485 }
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:109
char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]
Definition: iptypes.h:55
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
__wchar_t WCHAR
Definition: xmlstorage.h:180
_Out_ PULONG _Out_ PULONG pIndex
Definition: ndis.h:4564
#define MultiByteToWideChar
Definition: compat.h:110
_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().