start to rewrite the virtmem code to remove many bugs and make it more readable.

I'm currently working on enhancements to sysdm, but it's probably better to commit this separately 

svn path=/trunk/; revision=24115
This commit is contained in:
Ged Murphy 2006-09-14 16:49:11 +00:00
parent 4a1ee5a228
commit d667517b42
10 changed files with 595 additions and 770 deletions

View file

@ -25,12 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <stdlib.h>
#include <tchar.h>
#include "resource.h" #include "precomp.h"
#include "sysdm.h"
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK

View file

@ -25,11 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <stdlib.h> #include "precomp.h"
#include <lm.h>
#include "resource.h"
#include "sysdm.h"
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK

View file

@ -24,13 +24,7 @@
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
*/ */
#include <windows.h> #include "precomp.h"
#include <commctrl.h>
#include <stdlib.h>
#include <tchar.h>
#include "resource.h"
#include "sysdm.h"
typedef struct _VARIABLE_DATA typedef struct _VARIABLE_DATA

View file

@ -25,12 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <tchar.h>
#include <stdlib.h>
#include "resource.h" #include "precomp.h"
#include "sysdm.h"
void void
ShowLastWin32Error(HWND hWndOwner) ShowLastWin32Error(HWND hWndOwner)

View file

@ -25,12 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <stdlib.h>
#include <tchar.h>
#include "resource.h" #include "precomp.h"
#include "sysdm.h"
typedef BOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow); typedef BOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow);
BOOL LaunchDeviceManager(HWND hWndParent) BOOL LaunchDeviceManager(HWND hWndParent)

View file

@ -1,33 +1,56 @@
#ifndef __CPL_SYSDM_H #ifndef __CPL_PRECOMP_H
#define __CPL_SYSDM_H #define __CPL_PRECOMP_H
typedef LONG (CALLBACK *APPLET_INITPROC)(VOID); #include <windows.h>
#include <commctrl.h>
typedef struct #include <tchar.h>
{ #include <lm.h>
int idIcon; #include <cpl.h>
int idName; #include "resource.h"
int idDescription;
APPLET_INITPROC AppletProc; #define NUM_APPLETS (1)
} APPLET, *PAPPLET;
typedef LONG (CALLBACK *APPLET_INITPROC)(VOID);
extern HINSTANCE hApplet;
typedef struct _APPLET
void ShowLastWin32Error(HWND hWndOwner); {
int idIcon;
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); int idName;
INT_PTR CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); int idDescription;
INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); APPLET_INITPROC AppletProc;
INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); } APPLET, *PAPPLET;
INT_PTR CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern HINSTANCE hApplet;
/* environment.c */
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void ShowLastWin32Error(HWND hWndOwner);
/* virtmem.c */ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
#endif /* __CPL_SYSDM_H */ INT_PTR CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* EOF */ INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
typedef struct _PAGEFILE
{
TCHAR szDrive[3];
INT InitialValue;
INT MaxValue;
BOOL bUsed;
} PAGEFILE, *PPAGEFILE;
typedef struct _VIRTMEM
{
HWND hSelf;
HWND hListView;
LPTSTR szPagingFiles;
TCHAR szDrive[10];
INT Count;
BOOL bSave;
PAGEFILE Pagefile[26];
} VIRTMEM, *PVIRTMEM;
#endif /* __CPL_SYSDM_H */

View file

@ -25,14 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <commctrl.h>
#include <prsht.h>
#include <cpl.h>
#include <stdlib.h>
#include "resource.h" #include "precomp.h"
#include "sysdm.h"
#define NUM_APPLETS (1) #define NUM_APPLETS (1)

View file

@ -1,6 +1,6 @@
LIBRARY sysdm.cpl LIBRARY sysdm.cpl
EXPORTS EXPORTS
CPlApplet@16 CPlApplet
; EOF ; EOF

View file

@ -25,10 +25,8 @@
* UPDATE HISTORY: * UPDATE HISTORY:
* 03-04-2004 Created * 03-04-2004 Created
*/ */
#include <windows.h>
#include <stdlib.h> #include "precomp.h"
#include "resource.h"
#include "sysdm.h"
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK

File diff suppressed because it is too large Load diff