mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 00:54:40 +00:00
mark several helper functions as static
svn path=/trunk/; revision=19120
This commit is contained in:
parent
33268a81ff
commit
6f8816065e
2 changed files with 41 additions and 27 deletions
|
@ -66,14 +66,14 @@
|
||||||
|
|
||||||
typedef void (ENUMREGKEYCALLBACK)(void *pCookie,HKEY hBaseKey,TCHAR *pszSubKey);
|
typedef void (ENUMREGKEYCALLBACK)(void *pCookie,HKEY hBaseKey,TCHAR *pszSubKey);
|
||||||
|
|
||||||
LONG CALLBACK DisplayApplet(VOID);
|
static LONG CALLBACK DisplayApplet(VOID);
|
||||||
INT_PTR CALLBACK NetworkPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
static INT_PTR CALLBACK NetworkPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
void DisplayTCPIPProperties(HWND hParent,IP_ADAPTER_INFO *pInfo);
|
void DisplayTCPIPProperties(HWND hParent,IP_ADAPTER_INFO *pInfo);
|
||||||
|
|
||||||
HINSTANCE hApplet = 0;
|
HINSTANCE hApplet = 0;
|
||||||
|
|
||||||
/* Applets */
|
/* Applets */
|
||||||
APPLET Applets[] =
|
static APPLET Applets[] =
|
||||||
{
|
{
|
||||||
{IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, DisplayApplet}
|
{IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, DisplayApplet}
|
||||||
};
|
};
|
||||||
|
@ -81,7 +81,8 @@ APPLET Applets[] =
|
||||||
|
|
||||||
|
|
||||||
/* useful utilities */
|
/* useful utilities */
|
||||||
VOID EnumRegKeys(ENUMREGKEYCALLBACK *pCallback,PVOID pCookie,HKEY hBaseKey,TCHAR *tpszRegPath)
|
static VOID
|
||||||
|
EnumRegKeys(ENUMREGKEYCALLBACK *pCallback,PVOID pCookie,HKEY hBaseKey,TCHAR *tpszRegPath)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
INT i;
|
INT i;
|
||||||
|
@ -119,7 +120,8 @@ VOID EnumRegKeys(ENUMREGKEYCALLBACK *pCallback,PVOID pCookie,HKEY hBaseKey,TCHAR
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc,LPARAM lParam)
|
void
|
||||||
|
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc,LPARAM lParam)
|
||||||
{
|
{
|
||||||
ZeroMemory(psp, sizeof(PROPSHEETPAGE));
|
ZeroMemory(psp, sizeof(PROPSHEETPAGE));
|
||||||
psp->dwSize = sizeof(PROPSHEETPAGE);
|
psp->dwSize = sizeof(PROPSHEETPAGE);
|
||||||
|
@ -132,7 +134,8 @@ void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc,LPARAM lP
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOL FindNICClassKeyForCfgInstance(TCHAR *tpszCfgInst,TCHAR *tpszSubKeyOut)
|
static BOOL
|
||||||
|
FindNICClassKeyForCfgInstance(TCHAR *tpszCfgInst,TCHAR *tpszSubKeyOut)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
TCHAR tpszSubKey[MAX_PATH];
|
TCHAR tpszSubKey[MAX_PATH];
|
||||||
|
@ -161,7 +164,8 @@ BOOL FindNICClassKeyForCfgInstance(TCHAR *tpszCfgInst,TCHAR *tpszSubKeyOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NICPropertyProtocolCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
static void
|
||||||
|
NICPropertyProtocolCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
{
|
{
|
||||||
HWND hwndDlg;
|
HWND hwndDlg;
|
||||||
DWORD dwCharacteristics;
|
DWORD dwCharacteristics;
|
||||||
|
@ -233,7 +237,7 @@ void NICPropertyProtocolCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
||||||
|
@ -370,7 +374,8 @@ NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DisplayNICProperties(HWND hParent,TCHAR *tpszCfgInstanceID)
|
static void
|
||||||
|
DisplayNICProperties(HWND hParent,TCHAR *tpszCfgInstanceID)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp[1];
|
PROPSHEETPAGE psp[1];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh;
|
||||||
|
@ -411,7 +416,7 @@ void DisplayNICProperties(HWND hParent,TCHAR *tpszCfgInstanceID)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
NICStatusPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
NICStatusPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
|
@ -439,7 +444,8 @@ NICStatusPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DisplayNICStatus(HWND hParent,TCHAR *tpszCfgInstanceID)
|
static VOID
|
||||||
|
DisplayNICStatus(HWND hParent,TCHAR *tpszCfgInstanceID)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp[1];
|
PROPSHEETPAGE psp[1];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh;
|
||||||
|
@ -484,7 +490,8 @@ VOID DisplayNICStatus(HWND hParent,TCHAR *tpszCfgInstanceID)
|
||||||
// IPHLPAPI does not provide a list of all adapters
|
// IPHLPAPI does not provide a list of all adapters
|
||||||
//
|
//
|
||||||
#if 0
|
#if 0
|
||||||
VOID EnumAdapters(HWND hwndDlg)
|
static VOID
|
||||||
|
EnumAdapters(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR pszText[MAX_ADAPTER_NAME_LENGTH + 4];
|
TCHAR pszText[MAX_ADAPTER_NAME_LENGTH + 4];
|
||||||
IP_ADAPTER_INFO *pInfo;
|
IP_ADAPTER_INFO *pInfo;
|
||||||
|
@ -511,7 +518,8 @@ VOID EnumAdapters(HWND hwndDlg)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
static void
|
||||||
|
NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
{
|
{
|
||||||
TCHAR tpszDisplayName[MAX_PATH];
|
TCHAR tpszDisplayName[MAX_PATH];
|
||||||
//TCHAR tpszDeviceID[MAX_PATH];
|
//TCHAR tpszDeviceID[MAX_PATH];
|
||||||
|
@ -579,7 +587,8 @@ void NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EnumAdapters(HWND hwndDlg)
|
static void
|
||||||
|
EnumAdapters(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
LPTSTR lpRegPath = _T("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}");
|
LPTSTR lpRegPath = _T("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}");
|
||||||
|
|
||||||
|
@ -588,7 +597,7 @@ void EnumAdapters(HWND hwndDlg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
NetworkPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
NetworkPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
NMHDR* pnmh;
|
NMHDR* pnmh;
|
||||||
|
@ -651,15 +660,15 @@ NetworkPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
/* First Applet */
|
/* First Applet */
|
||||||
LONG CALLBACK DisplayApplet(VOID)
|
static LONG CALLBACK
|
||||||
|
DisplayApplet(VOID)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE psp[1];
|
PROPSHEETPAGE psp[1];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh = {0};
|
||||||
TCHAR Caption[1024];
|
TCHAR Caption[1024];
|
||||||
|
|
||||||
LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
|
LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
psh.dwFlags = PSH_PROPSHEETPAGE;
|
psh.dwFlags = PSH_PROPSHEETPAGE;
|
||||||
psh.hwndParent = NULL;
|
psh.hwndParent = NULL;
|
||||||
|
@ -677,7 +686,8 @@ LONG CALLBACK DisplayApplet(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Control Panel Callback */
|
/* Control Panel Callback */
|
||||||
LONG CALLBACK CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
LONG CALLBACK
|
||||||
|
CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
||||||
{
|
{
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,23 +53,26 @@
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "ncpa.h"
|
#include "ncpa.h"
|
||||||
|
|
||||||
extern void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc);
|
void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc);
|
||||||
|
|
||||||
void EnableDHCP( HWND hwndDlg, BOOL Enabled ) {
|
static void
|
||||||
|
EnableDHCP( HWND hwndDlg, BOOL Enabled ) {
|
||||||
CheckDlgButton(hwndDlg,IDC_USEDHCP,Enabled ? BST_CHECKED : BST_UNCHECKED);
|
CheckDlgButton(hwndDlg,IDC_USEDHCP,Enabled ? BST_CHECKED : BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg,IDC_NODHCP,Enabled ? BST_UNCHECKED : BST_CHECKED);
|
CheckDlgButton(hwndDlg,IDC_NODHCP,Enabled ? BST_UNCHECKED : BST_CHECKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ManualDNS( HWND hwndDlg, BOOL Enabled ) {
|
static void
|
||||||
|
ManualDNS( HWND hwndDlg, BOOL Enabled ) {
|
||||||
CheckDlgButton(hwndDlg,IDC_FIXEDDNS,Enabled ? BST_CHECKED : BST_UNCHECKED);
|
CheckDlgButton(hwndDlg,IDC_FIXEDDNS,Enabled ? BST_CHECKED : BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg,IDC_AUTODNS,Enabled ? BST_UNCHECKED : BST_CHECKED);
|
CheckDlgButton(hwndDlg,IDC_AUTODNS,Enabled ? BST_UNCHECKED : BST_CHECKED);
|
||||||
EnableWindow(GetDlgItem(hwndDlg,IDC_DNS1),Enabled);
|
EnableWindow(GetDlgItem(hwndDlg,IDC_DNS1),Enabled);
|
||||||
EnableWindow(GetDlgItem(hwndDlg,IDC_DNS2),Enabled);
|
EnableWindow(GetDlgItem(hwndDlg,IDC_DNS2),Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GetAddressFromField( HWND hwndDlg, UINT CtlId,
|
static BOOL
|
||||||
DWORD *dwIPAddr,
|
GetAddressFromField( HWND hwndDlg, UINT CtlId,
|
||||||
const char **AddressString ) {
|
DWORD *dwIPAddr,
|
||||||
|
const char **AddressString ) {
|
||||||
LRESULT lResult;
|
LRESULT lResult;
|
||||||
struct in_addr inIPAddr;
|
struct in_addr inIPAddr;
|
||||||
|
|
||||||
|
@ -86,7 +89,8 @@ BOOL GetAddressFromField( HWND hwndDlg, UINT CtlId,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL InternTCPIPSettings( HWND hwndDlg ) {
|
static BOOL
|
||||||
|
InternTCPIPSettings( HWND hwndDlg ) {
|
||||||
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
||||||
IP_ADAPTER_INFO *pInfo = NULL;
|
IP_ADAPTER_INFO *pInfo = NULL;
|
||||||
TCHAR pszRegKey[MAX_PATH];
|
TCHAR pszRegKey[MAX_PATH];
|
||||||
|
@ -147,7 +151,7 @@ cleanup:
|
||||||
return RetVal;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
|
||||||
|
|
Loading…
Reference in a new issue