13#define NETWORK_SETUP_MAGIC 0x50515253
43 INetCfg *pNetCfg =
NULL;
44 INetCfgLock *pNetCfgLock =
NULL;
45 INetCfgComponent *pTcpipComponent =
NULL;
46 INetCfgComponent *pNicComponent =
NULL;
47 IEnumNetCfgComponent *pEnumNicComponents =
NULL;
52 TRACE(
"InstallTypicalNetworkSettings()\n");
57 ERR(
"CoInitialize failed\n");
68 ERR(
"CoCreateInstance failed\n");
74 (
PVOID*)&pNetCfgLock);
77 ERR(
"QueryInterface failed\n");
81 hr = pNetCfgLock->AcquireWriteLock(5000,
86 ERR(
"AcquireWriteLock failed\n");
93 hr = pNetCfg->Initialize(
NULL);
96 ERR(
"Initialize failed\n");
103 hr = pNetCfg->FindComponent(
L"ms_tcpip",
107 FIXME(
"Found the TCP/IP driver!\n");
111 ERR(
"Initialize failed\n");
115 hr = pNetCfg->EnumComponents(&GUID_DEVCLASS_NET,
116 &pEnumNicComponents);
119 ERR(
"EnumComponents failed\n");
125 hr = pEnumNicComponents->Next(1,
130 TRACE(
"EnumNicComponents done!\n");
134 hr = pNicComponent->GetDisplayName(&pszNicName);
137 FIXME(
"NIC name: %S\n", pszNicName);
143 pNicComponent->Release();
144 pNicComponent =
NULL;
149 if (pNicComponent !=
NULL)
150 pNicComponent->Release();
152 if (pEnumNicComponents !=
NULL)
153 pEnumNicComponents->Release();
155 if (pTcpipComponent !=
NULL)
156 pTcpipComponent->Release();
159 pNetCfg->Uninitialize();
162 pNetCfgLock->ReleaseWriteLock();
164 if (pNetCfgLock !=
NULL)
165 pNetCfgLock->Release();
172 TRACE(
"InstallTypicalNetworkSettings() done!\n");
193 if ((pNetworkSetupData !=
NULL) &&
203 pSetupData = pNetworkSetupData->pSetupData;
239 pNetworkSetupData->bTypicalNetworkSetup =
FALSE;
244 pNetworkSetupData->bTypicalNetworkSetup =
TRUE;
281 if ((pNetworkSetupData !=
NULL) &&
291 pSetupData = pNetworkSetupData->pSetupData;
345 WCHAR DomainName[51];
347 WCHAR ErrorName[256];
352 if ((pNetworkSetupData !=
NULL) &&
362 pSetupData = pNetworkSetupData->pSetupData;
367 wcscpy(DomainName,
L"WORKGROUP");
384 if (pNetworkSetupData !=
NULL)
419 wcscpy(ErrorName,
L"Setup cannot continue until you\nenter the name of your domain/workgroup.");
436 if (pNetworkSetupData->bTypicalNetworkSetup ==
TRUE)
462 DWORD dwPageCount = 3;
465 if (pPageCount ==
NULL)
470 *pPageCount = dwPageCount;
474 if (*pPageCount < dwPageCount)
480 if (pNetworkSetupData ==
NULL)
490 psp.lParam = (
LPARAM)pNetworkSetupData;
492 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
500 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
508 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
515 *pPageCount = dwPageCount;
#define IDS_NETWORKCOMPONENTTITLE
#define IDD_NETWORKCOMPONENTPAGE
#define IDS_REACTOS_SETUP
#define IDS_NETWORKSETTINGSTITLE
#define IDD_NETWORKDOMAINPAGE
#define IDD_NETWORKSETTINGSPAGE
#define IDC_NETWORK_CUSTOM
#define IDS_NETWORKSETTINGSSUBTITLE
#define IDC_NETWORK_TYPICAL
#define IDS_NETWORKDOMAINTITLE
#define IDC_SELECT_WORKGROUP
#define IDS_NETWORKDOMAINSUBTITLE
#define IDS_WZD_DOMAIN_NAME
#define IDC_NETWORK_DEVICE
#define IDS_NETWORKCOMPONENTSUBTITLE
static const WCHAR Title[]
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
BOOL WINAPI IsBadReadPtr(IN LPCVOID lp, IN UINT_PTR ucb)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
struct _PSP * HPROPSHEETPAGE
EXTERN_C const IID IID_INetCfgLock
EXTERN_C const GUID CLSID_CNetCfg
EXTERN_C const IID IID_INetCfg
HINSTANCE netshell_hInstance
#define CreatePropertySheetPage
#define PropSheet_SetWizButtons(d, f)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
struct _NETWORKSETUPDATA * PNETWORKSETUPDATA
static INT_PTR CALLBACK NetworkSettingsPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
DWORD WINAPI NetSetupRequestWizardPages(PDWORD pPageCount, HPROPSHEETPAGE *pPages, PSETUPDATA pSetupData)
static HRESULT InstallTypicalNetworkSettings(VOID)
struct _NETWORKSETUPDATA NETWORKSETUPDATA
static INT_PTR CALLBACK NetworkDomainPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK NetworkComponentPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define NETWORK_SETUP_MAGIC
static VOID SetBoldText(HWND hwndDlg, INT control, PSETUPDATA pSetupData)
BOOL bTypicalNetworkSetup
UINT uPostNetworkWizardPage
UINT uFirstNetworkWizardPage
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
#define ERROR_BUFFER_OVERFLOW
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
struct tagNMHDR * LPNMHDR
HWND WINAPI GetParent(_In_ HWND)
#define SendDlgItemMessage