ReactOS 0.4.16-dev-125-g798ea90
netshell.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Shell
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: ReactOS Networking Configuration
5 * COPYRIGHT: Copyright 2008 Johannes Anderwald (johannes.anderwald@reactos.org)
6 */
7
8#include "precomp.h"
9
11
13
15{
16public:
17};
18
19BEGIN_OBJECT_MAP(ObjectMap)
22 OBJECT_ENTRY(CLSID_LanConnectionUi, CNetConnectionPropertyUi)
23 OBJECT_ENTRY(CLSID_ConnectionTray, CLanStatus)
25
27
30{
31 PROPSHEETPAGEW ppage;
32
33 memset(&ppage, 0x0, sizeof(PROPSHEETPAGEW));
34 ppage.dwSize = sizeof(PROPSHEETPAGEW);
35 ppage.dwFlags = PSP_DEFAULT;
36 ppage.pszTemplate = resname;
37 ppage.pfnDlgProc = dlgproc;
38 ppage.lParam = lParam;
40 if (szTitle)
41 {
42 ppage.dwFlags |= PSP_USETITLE;
43 ppage.pszTitle = szTitle;
44 }
45 return CreatePropertySheetPageW(&ppage);
46}
47
48extern "C"
49{
50
51BOOL
53DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
54{
55 switch (fdwReason)
56 {
58 netshell_hInstance = hinstDLL;
61 break;
62 default:
63 break;
64 }
65
66 return TRUE;
67}
68
72{
73 return S_FALSE;
74}
75
78{
79 HRESULT hr;
80
83 return hr;
84
87 return hr;
88
89 return S_OK;
90}
91
94{
95 HRESULT hr;
96
99 return hr;
100
103 return hr;
104
105 return S_OK;
106}
107
108STDAPI
110 REFCLSID rclsid,
111 REFIID riid,
112 LPVOID *ppv)
113{
114 return gModule.DllGetClassObject(rclsid, riid, ppv);
115}
116
117VOID
118WINAPI
120{
121 CoTaskMemFree(pProps->pszwName);
123 CoTaskMemFree(pProps);
124}
125
126BOOL
127WINAPI
129{
130 if (!pszwName)
131 return FALSE;
132
133 BOOL nonSpace = FALSE;
134 while (*pszwName)
135 {
136 switch(*(pszwName++))
137 {
138 case L'\\':
139 case L'/':
140 case L':':
141 case L'*':
142 case L'\t':
143 case L'?':
144 case L'<':
145 case L'>':
146 case L'|':
147 case L'\"':
148 return FALSE;
149 case L' ':
150 break;
151 default:
152 nonSpace = TRUE;
153 break;
154 }
155 }
156 return nonSpace;
157}
158
159} // extern "C"
DWORD LPVOID fImpLoad
Definition: misc.cpp:142
#define STDAPI
Definition: basetyps.h:41
HRESULT WINAPI UpdateRegistryFromResource(LPCTSTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries=NULL)
Definition: atlbase.h:489
HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: atlbase.h:1037
HRESULT DllUnregisterServer(BOOL bUnRegTypeLib=TRUE)
Definition: atlbase.h:1047
HRESULT Init(_ATL_OBJMAP_ENTRY *p, HINSTANCE, const GUID *plibid)
Definition: atlbase.h:886
HRESULT DllRegisterServer(BOOL bRegTypeLib=TRUE)
Definition: atlbase.h:1042
LPARAM lParam
Definition: combotst.c:139
#define DLGPROC
Definition: maze.c:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDR_NETSHELL
Definition: resource.h:127
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
Definition: propsheet.c:3086
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define END_OBJECT_MAP()
Definition: atlcom.h:691
#define OBJECT_ENTRY(clsid, class)
Definition: atlcom.h:693
#define BEGIN_OBJECT_MAP(x)
Definition: atlcom.h:689
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
#define _In_
Definition: ms_sal.h:308
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
EXTERN_C const CLSID CLSID_ConnectionManager
Definition: netcon.h:172
HPROPSHEETPAGE InitializePropertySheetPage(LPWSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
Definition: netshell.cpp:29
STDAPI DllRegisterServer(void)
Definition: netshell.cpp:77
HINSTANCE netshell_hInstance
Definition: netshell.cpp:12
STDAPI DllUnregisterServer(void)
Definition: netshell.cpp:93
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
Definition: netshell.cpp:53
BOOL WINAPI NcIsValidConnectionName(_In_ PCWSTR pszwName)
Definition: netshell.cpp:128
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: netshell.cpp:109
HMODULE g_hModule
Definition: netshell.cpp:10
CNetshellModule gModule
Definition: netshell.cpp:26
VOID WINAPI NcFreeNetconProperties(NETCON_PROPERTIES *pProps)
Definition: netshell.cpp:119
HRESULT WINAPI DllCanUnloadNow(void)
Definition: netshell.cpp:71
#define L(x)
Definition: ntvdm.h:50
#define PSP_USETITLE
Definition: prsht.h:26
#define PSP_DEFAULT
Definition: prsht.h:22
struct _PROPSHEETPAGEW PROPSHEETPAGEW
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
#define CLSID_ConnectionFolder
DLGPROC pfnDlgProc
Definition: prsht.h:226
DWORD dwSize
Definition: prsht.h:214
DWORD dwFlags
Definition: prsht.h:215
LPARAM lParam
Definition: prsht.h:227
LPCWSTR pszTemplate
Definition: prsht.h:218
LPCWSTR pszTitle
Definition: prsht.h:225
HINSTANCE hInstance
Definition: prsht.h:216
LPWSTR pszwDeviceName
Definition: netcon.h:85
const uint16_t * PCWSTR
Definition: typedefs.h:57
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
WCHAR * LPWSTR
Definition: xmlstorage.h:184