fixed about 70 warnings (msvc /W4)

svn path=/trunk/; revision=22892
This commit is contained in:
Christoph von Wittich 2006-07-06 16:25:42 +00:00
parent e0f209d6c1
commit 305978e29e
9 changed files with 99 additions and 54 deletions

View file

@ -67,7 +67,8 @@ static void draw_splitbar(HWND hWnd, int x)
static void ResizeWnd(ChildWnd* pChildWnd, int cx, int cy) static void ResizeWnd(ChildWnd* pChildWnd, int cx, int cy)
{ {
HDWP hdwp = BeginDeferWindowPos(2); HDWP hdwp = BeginDeferWindowPos(2);
RECT rt = {0, 0, cx, cy}; RECT rt;
SetRect(&rt, 0, 0, cx, cy);
cx = pChildWnd->nSplitPos + SPLIT_WIDTH/2; cx = pChildWnd->nSplitPos + SPLIT_WIDTH/2;
DeferWindowPos(hdwp, pChildWnd->hTreeWnd, 0, rt.left, rt.top, pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE); DeferWindowPos(hdwp, pChildWnd->hTreeWnd, 0, rt.left, rt.top, pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
@ -103,6 +104,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LPCTSTR keyPath, s; LPCTSTR keyPath, s;
WORD wID = LOWORD(wParam); WORD wID = LOWORD(wParam);
UNREFERENCED_PARAMETER(message);
switch (wID) { switch (wID) {
/* Parse the menu selections: */ /* Parse the menu selections: */
case ID_REGISTRY_EXIT: case ID_REGISTRY_EXIT:
@ -209,12 +212,12 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
{ {
if (RegOpenKey(hRootKey, szBuffer, &hOtherKey) == ERROR_SUCCESS) if (RegOpenKey(hRootKey, szBuffer, &hOtherKey) == ERROR_SUCCESS)
{ {
lstrcpyn(pszSuggestions, TEXT("HKCR\\"), iSuggestionsLength); lstrcpyn(pszSuggestions, TEXT("HKCR\\"), (int) iSuggestionsLength);
i = _tcslen(pszSuggestions); i = _tcslen(pszSuggestions);
pszSuggestions += i; pszSuggestions += i;
iSuggestionsLength -= i; iSuggestionsLength -= i;
lstrcpyn(pszSuggestions, szBuffer, iSuggestionsLength); lstrcpyn(pszSuggestions, szBuffer, (int) iSuggestionsLength);
i = MIN(_tcslen(pszSuggestions) + 1, iSuggestionsLength); i = MIN(_tcslen(pszSuggestions) + 1, iSuggestionsLength);
pszSuggestions += i; pszSuggestions += i;
iSuggestionsLength -= i; iSuggestionsLength -= i;
@ -235,12 +238,12 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
if (RegQueryStringValue(hSubKey, TEXT("CLSID"), NULL, if (RegQueryStringValue(hSubKey, TEXT("CLSID"), NULL,
szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0])) == ERROR_SUCCESS) szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0])) == ERROR_SUCCESS)
{ {
lstrcpyn(pszSuggestions, TEXT("HKCR\\CLSID\\"), iSuggestionsLength); lstrcpyn(pszSuggestions, TEXT("HKCR\\CLSID\\"), (int) iSuggestionsLength);
i = _tcslen(pszSuggestions); i = _tcslen(pszSuggestions);
pszSuggestions += i; pszSuggestions += i;
iSuggestionsLength -= i; iSuggestionsLength -= i;
lstrcpyn(pszSuggestions, szBuffer, iSuggestionsLength); lstrcpyn(pszSuggestions, szBuffer, (int) iSuggestionsLength);
i = MIN(_tcslen(pszSuggestions) + 1, iSuggestionsLength); i = MIN(_tcslen(pszSuggestions) + 1, iSuggestionsLength);
pszSuggestions += i; pszSuggestions += i;
iSuggestionsLength -= i; iSuggestionsLength -= i;
@ -263,7 +266,7 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
*/ */
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
static short last_split; static int last_split;
BOOL Result; BOOL Result;
ChildWnd* pChildWnd = g_pChildWnd; ChildWnd* pChildWnd = g_pChildWnd;
@ -432,7 +435,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"), _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"),
&hKey) == ERROR_SUCCESS) &hKey) == ERROR_SUCCESS)
{ {
RegSetValueEx(hKey, _T("LastKey"), 0, REG_SZ, (LPBYTE) szBuffer, _tcslen(szBuffer) * sizeof(szBuffer[0])); RegSetValueEx(hKey, _T("LastKey"), 0, REG_SZ, (LPBYTE) szBuffer, (DWORD) _tcslen(szBuffer) * sizeof(szBuffer[0]));
RegCloseKey(hKey); RegCloseKey(hKey);
} }
} }

View file

@ -103,6 +103,8 @@ INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
HWND hwndValue; HWND hwndValue;
int len; int len;
UNREFERENCED_PARAMETER(lParam);
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if(editValueName && _tcscmp(editValueName, _T(""))) if(editValueName && _tcscmp(editValueName, _T("")))
@ -168,6 +170,8 @@ INT_PTR CALLBACK modify_multi_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPa
HWND hwndValue; HWND hwndValue;
int len; int len;
UNREFERENCED_PARAMETER(lParam);
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if(editValueName && _tcscmp(editValueName, _T(""))) if(editValueName && _tcscmp(editValueName, _T("")))
@ -238,7 +242,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR
case WM_CHAR: case WM_CHAR:
if (dwordEditMode == EDIT_MODE_DEC) if (dwordEditMode == EDIT_MODE_DEC)
{ {
if (isdigit(wParam & 0xff)) if (isdigit((int) wParam & 0xff))
{ {
break; break;
} }
@ -249,7 +253,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR
} }
else if (dwordEditMode == EDIT_MODE_HEX) else if (dwordEditMode == EDIT_MODE_HEX)
{ {
if (isxdigit(wParam & 0xff)) if (isxdigit((int) wParam & 0xff))
{ {
break; break;
} }
@ -278,6 +282,8 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
DWORD Base; DWORD Base;
DWORD Value = 0; DWORD Value = 0;
UNREFERENCED_PARAMETER(lParam);
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
dwordEditMode = EDIT_MODE_HEX; dwordEditMode = EDIT_MODE_HEX;
@ -384,6 +390,8 @@ INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
HWND hwndValue; HWND hwndValue;
UINT len; UINT len;
UNREFERENCED_PARAMETER(lParam);
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
if(editValueName && _tcscmp(editValueName, _T(""))) if(editValueName && _tcscmp(editValueName, _T("")))
@ -408,7 +416,7 @@ INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
case IDOK: case IDOK:
if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA))) if ((hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA)))
{ {
len = HexEdit_GetBufferSize(hwndValue); len = (UINT) HexEdit_GetBufferSize(hwndValue);
if (len != valueDataLen && len > 0) if (len != valueDataLen && len > 0)
{ {
binValueData = HeapReAlloc(GetProcessHeap(), 0, binValueData, len); binValueData = HeapReAlloc(GetProcessHeap(), 0, binValueData, len);
@ -482,7 +490,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
{ {
if (stringValueData) if (stringValueData)
{ {
lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)stringValueData, (_tcslen(stringValueData) + 1) * sizeof(TCHAR)); lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)stringValueData, (DWORD) (_tcslen(stringValueData) + 1) * sizeof(TCHAR));
} }
else else
{ {
@ -496,7 +504,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
{ {
if (valueDataLen > 0) if (valueDataLen > 0)
{ {
DWORD llen, listlen, nl_len; size_t llen, listlen, nl_len;
LPTSTR src, lines = NULL; LPTSTR src, lines = NULL;
if (!(stringValueData = HeapAlloc(GetProcessHeap(), 0, valueDataLen))) if (!(stringValueData = HeapAlloc(GetProcessHeap(), 0, valueDataLen)))
@ -542,7 +550,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
/* convert \r\n to \0 */ /* convert \r\n to \0 */
BOOL EmptyLines = FALSE; BOOL EmptyLines = FALSE;
LPTSTR src, lines, nl; LPTSTR src, lines, nl;
DWORD linechars, buflen, c_nl, dest; size_t linechars, buflen, c_nl, dest;
src = stringValueData; src = stringValueData;
buflen = sizeof(TCHAR); buflen = sizeof(TCHAR);
@ -586,7 +594,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
warning(hwnd, IDS_MULTI_SZ_EMPTY_STRING); warning(hwnd, IDS_MULTI_SZ_EMPTY_STRING);
} }
lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)lines, buflen); lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)lines, (DWORD) buflen);
HeapFree(GetProcessHeap(), 0, lines); HeapFree(GetProcessHeap(), 0, lines);
} }
else else

View file

@ -76,6 +76,9 @@ static void SetFindFlags(DWORD dwFlags)
static INT_PTR CALLBACK AbortFindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK AbortFindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(hDlg);
switch(uMsg) switch(uMsg)
{ {
case WM_CLOSE: case WM_CLOSE:
@ -102,6 +105,7 @@ static INT_PTR CALLBACK AbortFindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam,
static BOOL RegSearchProc(LPVOID lpParam) static BOOL RegSearchProc(LPVOID lpParam)
{ {
MSG msg; MSG msg;
UNREFERENCED_PARAMETER(lpParam);
if (s_hwndAbortDialog && PeekMessage(&msg, s_hwndAbortDialog, 0, 0, PM_REMOVE)) if (s_hwndAbortDialog && PeekMessage(&msg, s_hwndAbortDialog, 0, 0, PM_REMOVE))
{ {

View file

@ -119,6 +119,7 @@ done:
static void OnEnterMenuLoop(HWND hWnd) static void OnEnterMenuLoop(HWND hWnd)
{ {
int nParts; int nParts;
UNREFERENCED_PARAMETER(hWnd);
/* Update the status bar pane sizes */ /* Update the status bar pane sizes */
nParts = -1; nParts = -1;
@ -191,6 +192,7 @@ static void toggle_child(HWND hWnd, UINT cmd, HWND hchild)
static BOOL CheckCommDlgError(HWND hWnd) static BOOL CheckCommDlgError(HWND hWnd)
{ {
DWORD dwErrorCode = CommDlgExtendedError(); DWORD dwErrorCode = CommDlgExtendedError();
UNREFERENCED_PARAMETER(hWnd);
switch (dwErrorCode) { switch (dwErrorCode) {
case CDERR_DIALOGFAILURE: case CDERR_DIALOGFAILURE:
break; break;
@ -347,6 +349,8 @@ static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
LPTSTR pszSelectedKey; LPTSTR pszSelectedKey;
OFNOTIFY *pOfnNotify; OFNOTIFY *pOfnNotify;
UNREFERENCED_PARAMETER(wParam);
switch(uiMsg) { switch(uiMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
pOfn = (OPENFILENAME *) lParam; pOfn = (OPENFILENAME *) lParam;
@ -453,6 +457,7 @@ BOOL PrintRegistryHive(HWND hWnd, LPTSTR path)
{ {
#if 1 #if 1
PRINTDLG pd; PRINTDLG pd;
UNREFERENCED_PARAMETER(path);
ZeroMemory(&pd, sizeof(PRINTDLG)); ZeroMemory(&pd, sizeof(PRINTDLG));
pd.lStructSize = sizeof(PRINTDLG); pd.lStructSize = sizeof(PRINTDLG);
@ -714,7 +719,7 @@ InvokeRemoteRegistryPickerDialog(IN IDsObjectPicker *pDsObjectPicker,
STGMEDIUM stm; STGMEDIUM stm;
FORMATETC fe; FORMATETC fe;
fe.cfFormat = RegisterClipboardFormat(CFSTR_DSOP_DS_SELECTION_LIST); fe.cfFormat = (CLIPFORMAT) RegisterClipboardFormat(CFSTR_DSOP_DS_SELECTION_LIST);
fe.ptd = NULL; fe.ptd = NULL;
fe.dwAspect = DVASPECT_CONTENT; fe.dwAspect = DVASPECT_CONTENT;
fe.lindex = -1; fe.lindex = -1;
@ -787,6 +792,9 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
LONG lRet; LONG lRet;
int item; int item;
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(message);
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case ID_REGISTRY_IMPORTREGISTRYFILE: case ID_REGISTRY_IMPORTREGISTRYFILE:
ImportRegistryFile(hWnd); ImportRegistryFile(hWnd);

View file

@ -182,7 +182,7 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
DWORD dx, dy, linestart; DWORD dx, dy, linestart;
INT x; INT x;
PBYTE buf, current, end, line; PBYTE buf, current, end, line;
UINT bufsize; size_t bufsize;
TCHAR hex[3], addr[17]; TCHAR hex[3], addr[17];
RECT rct; RECT rct;
@ -526,6 +526,7 @@ HEXEDIT_WM_NCDESTROY(PHEXEDIT_DATA hed)
static LRESULT static LRESULT
HEXEDIT_WM_CREATE(PHEXEDIT_DATA hed) HEXEDIT_WM_CREATE(PHEXEDIT_DATA hed)
{ {
UNREFERENCED_PARAMETER(hed);
return 1; return 1;
} }
@ -541,6 +542,7 @@ HEXEDIT_WM_SETFOCUS(PHEXEDIT_DATA hed)
static LRESULT static LRESULT
HEXEDIT_WM_KILLFOCUS(PHEXEDIT_DATA hed) HEXEDIT_WM_KILLFOCUS(PHEXEDIT_DATA hed)
{ {
UNREFERENCED_PARAMETER(hed);
DestroyCaret(); DestroyCaret();
return 0; return 0;
} }
@ -551,6 +553,8 @@ HEXEDIT_WM_VSCROLL(PHEXEDIT_DATA hed, WORD ThumbPosition, WORD SbCmd)
int ScrollY; int ScrollY;
SCROLLINFO si; SCROLLINFO si;
UNREFERENCED_PARAMETER(ThumbPosition);
ZeroMemory(&si, sizeof(SCROLLINFO)); ZeroMemory(&si, sizeof(SCROLLINFO));
si.cbSize = sizeof(SCROLLINFO); si.cbSize = sizeof(SCROLLINFO);
si.fMask = SIF_ALL; si.fMask = SIF_ALL;
@ -708,6 +712,9 @@ HEXEDIT_WM_MOUSEWHEEL(PHEXEDIT_DATA hed, int cyMoveLines, WORD ButtonsDown, LPPO
SCROLLINFO si; SCROLLINFO si;
int ScrollY; int ScrollY;
UNREFERENCED_PARAMETER(ButtonsDown);
UNREFERENCED_PARAMETER(MousePos);
SetFocus(hed->hWndSelf); SetFocus(hed->hWndSelf);
si.cbSize = sizeof(SCROLLINFO); si.cbSize = sizeof(SCROLLINFO);
@ -733,6 +740,7 @@ HEXEDIT_WM_MOUSEWHEEL(PHEXEDIT_DATA hed, int cyMoveLines, WORD ButtonsDown, LPPO
static LRESULT static LRESULT
HEXEDIT_WM_GETDLGCODE(LPMSG Msg) HEXEDIT_WM_GETDLGCODE(LPMSG Msg)
{ {
UNREFERENCED_PARAMETER(Msg);
return DLGC_WANTARROWS | DLGC_WANTCHARS; return DLGC_WANTARROWS | DLGC_WANTCHARS;
} }
@ -743,6 +751,7 @@ HEXEDIT_WM_LBUTTONDOWN(PHEXEDIT_DATA hed, INT Buttons, POINTS Pt)
POINT EditPos; POINT EditPos;
DWORD Hit = HEXEDIT_HitRegionTest(hed, Pt); DWORD Hit = HEXEDIT_HitRegionTest(hed, Pt);
UNREFERENCED_PARAMETER(Buttons);
SetFocus(hed->hWndSelf); SetFocus(hed->hWndSelf);
hed->Position = HEXEDIT_PositionFromPoint(hed, Pt, Hit, &EditPos, &NewField); hed->Position = HEXEDIT_PositionFromPoint(hed, Pt, Hit, &EditPos, &NewField);
@ -849,6 +858,9 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
static LRESULT static LRESULT
HEXEDIT_WM_SIZE(PHEXEDIT_DATA hed, DWORD sType, WORD NewWidth, WORD NewHeight) HEXEDIT_WM_SIZE(PHEXEDIT_DATA hed, DWORD sType, WORD NewWidth, WORD NewHeight)
{ {
UNREFERENCED_PARAMETER(sType);
UNREFERENCED_PARAMETER(NewHeight);
UNREFERENCED_PARAMETER(NewWidth);
HEXEDIT_Update(hed); HEXEDIT_Update(hed);
return 0; return 0;
} }

View file

@ -128,7 +128,7 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType, void* ValB
item.state = 0; item.state = 0;
item.stateMask = 0; item.stateMask = 0;
item.pszText = Name; item.pszText = Name;
item.cchTextMax = _tcslen(item.pszText); item.cchTextMax = (int) _tcslen(item.pszText);
if (item.cchTextMax == 0) if (item.cchTextMax == 0)
item.pszText = LPSTR_TEXTCALLBACK; item.pszText = LPSTR_TEXTCALLBACK;
item.iImage = 0; item.iImage = 0;
@ -356,6 +356,8 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{ {
LINE_INFO*l, *r; LINE_INFO*l, *r;
UNREFERENCED_PARAMETER(lParamSort);
l = (LINE_INFO*)lParam1; l = (LINE_INFO*)lParam1;
r = (LINE_INFO*)lParam2; r = (LINE_INFO*)lParam2;
@ -373,6 +375,7 @@ static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSor
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result) BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
{ {
NMLVDISPINFO* Info; NMLVDISPINFO* Info;
UNREFERENCED_PARAMETER(wParam);
*Result = TRUE; *Result = TRUE;
switch (((LPNMHDR)lParam)->code) { switch (((LPNMHDR)lParam)->code) {
case LVN_GETDISPINFO: case LVN_GETDISPINFO:

View file

@ -62,41 +62,38 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
HMENU hEditMenu; HMENU hEditMenu;
TCHAR szBuffer[256]; TCHAR szBuffer[256];
WNDCLASSEX wcFrame = { WNDCLASSEX wcFrame;
sizeof(WNDCLASSEX), WNDCLASSEX wcChild;
CS_HREDRAW | CS_VREDRAW/*style*/, ATOM hFrameWndClass;
FrameWndProc, ATOM hChildWndClass;
0/*cbClsExtra*/,
0/*cbWndExtra*/,
hInstance,
LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REGEDIT)),
LoadCursor(0, IDC_ARROW),
0/*hbrBackground*/,
0/*lpszMenuName*/,
szFrameClass,
(HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
};
ATOM hFrameWndClass = RegisterClassEx(&wcFrame); /* register frame window class */
WNDCLASSEX wcChild = { ZeroMemory(&wcFrame, sizeof(WNDCLASSEX));
sizeof(WNDCLASSEX), wcFrame.cbSize = sizeof(WNDCLASSEX);
CS_HREDRAW | CS_VREDRAW/*style*/, wcFrame.style = CS_HREDRAW | CS_VREDRAW;
ChildWndProc, wcFrame.lpfnWndProc = FrameWndProc;
0/*cbClsExtra*/, wcFrame.hInstance = hInstance;
sizeof(HANDLE)/*cbWndExtra*/, wcFrame.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REGEDIT));
hInstance, wcFrame.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT),
LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REGEDIT)), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
LoadCursor(0, IDC_ARROW), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
0/*hbrBackground*/, wcFrame.hCursor = LoadCursor(0, IDC_ARROW);
0/*lpszMenuName*/, wcFrame.lpszClassName = szFrameClass;
szChildClass,
(HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
}; hFrameWndClass = RegisterClassEx(&wcFrame); /* register frame window class */
ATOM hChildWndClass = RegisterClassEx(&wcChild); /* register child windows class */
hChildWndClass = hChildWndClass; /* warning eater */ ZeroMemory(&wcChild, sizeof(WNDCLASSEX));
wcChild.cbSize = sizeof(WNDCLASSEX);
wcChild.style = CS_HREDRAW | CS_VREDRAW;
wcChild.lpfnWndProc = ChildWndProc;
wcChild.cbWndExtra = sizeof(HANDLE);
wcChild.hInstance = hInstance;
wcChild.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_REGEDIT));
wcChild.hCursor = LoadCursor(0, IDC_ARROW),
wcChild.lpszClassName = szChildClass,
wcChild.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_REGEDIT), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
hChildWndClass = RegisterClassEx(&wcChild); /* register child windows class */
RegisterHexEditorClass(hInstance); RegisterHexEditorClass(hInstance);
@ -195,6 +192,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,
MSG msg; MSG msg;
HACCEL hAccel; HACCEL hAccel;
UNREFERENCED_PARAMETER(hPrevInstance);
/* /*
int hCrt; int hCrt;
FILE *hf; FILE *hf;
@ -238,5 +237,5 @@ int APIENTRY WinMain(HINSTANCE hInstance,
} }
ExitInstance(hInstance); ExitInstance(hInstance);
return msg.wParam; return (int) msg.wParam;
} }

View file

@ -227,8 +227,8 @@ DWORD convertHexCSVToHex(char *str, BYTE *buf, ULONG bufLen)
char *s = str; /* Pointer to current */ char *s = str; /* Pointer to current */
char *b = (char*) buf; /* Pointer to result */ char *b = (char*) buf; /* Pointer to result */
ULONG strLen = strlen(str); size_t strLen = strlen(str);
ULONG strPos = 0; size_t strPos = 0;
DWORD byteCount = 0; DWORD byteCount = 0;
memset(buf, 0, bufLen); memset(buf, 0, bufLen);
@ -645,6 +645,7 @@ void doQueryValue(LPSTR stdInput)
*/ */
void doDeleteValue(LPSTR line) void doDeleteValue(LPSTR line)
{ {
UNREFERENCED_PARAMETER(line);
fprintf(stderr,"%s: deleteValue not yet implemented\n", getAppName()); fprintf(stderr,"%s: deleteValue not yet implemented\n", getAppName());
} }
@ -655,6 +656,7 @@ void doDeleteValue(LPSTR line)
*/ */
void doDeleteKey(LPSTR line) void doDeleteKey(LPSTR line)
{ {
UNREFERENCED_PARAMETER(line);
fprintf(stderr,"%s: deleteKey not yet implemented\n", getAppName()); fprintf(stderr,"%s: deleteKey not yet implemented\n", getAppName());
} }
@ -665,6 +667,7 @@ void doDeleteKey(LPSTR line)
*/ */
void doCreateKey(LPSTR line) void doCreateKey(LPSTR line)
{ {
UNREFERENCED_PARAMETER(line);
fprintf(stderr,"%s: createKey not yet implemented\n", getAppName()); fprintf(stderr,"%s: createKey not yet implemented\n", getAppName());
} }
@ -735,6 +738,7 @@ void processSetValue(LPSTR line)
*/ */
void processQueryValue(LPSTR cmdline) void processQueryValue(LPSTR cmdline)
{ {
UNREFERENCED_PARAMETER(cmdline);
fprintf(stderr,"ERROR!!! - temporary disabled"); fprintf(stderr,"ERROR!!! - temporary disabled");
exit(1); exit(1);
#if 0 #if 0
@ -1791,6 +1795,8 @@ LONG RegSearch(HKEY hKey, LPTSTR lpSubKey, size_t iSubKeyLength,
LONG lResult; LONG lResult;
LPCTSTR s; LPCTSTR s;
UNREFERENCED_PARAMETER(dwValueIndex);
if (dwSearchFlags & (RSF_LOOKATVALUES | RSF_LOOKATDATA)) if (dwSearchFlags & (RSF_LOOKATVALUES | RSF_LOOKATDATA))
return ERROR_CALL_NOT_IMPLEMENTED; /* NYI */ return ERROR_CALL_NOT_IMPLEMENTED; /* NYI */

View file

@ -28,6 +28,8 @@ DEFINE_GUID(IID_IRegKeySecurity, 0x965fc360, 0x16ff, 0x11d0, 0x0091, 0xcb,0x00,0
#if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2 #if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2
DEFINE_GUID(IID_IRegKeySecurity2, 0xc3ccfdb4, 0x6f88, 0x11d2, 0x00a3, 0xce,0x00,0xc0,0x4f,0xb1,0x78,0x2a); DEFINE_GUID(IID_IRegKeySecurity2, 0xc3ccfdb4, 0x6f88, 0x11d2, 0x00a3, 0xce,0x00,0xc0,0x4f,0xb1,0x78,0x2a);
#endif #endif
/* FIXME: already defined in aclui.h - causing problems when compiling with MSVC/PSDK*/
DEFINE_GUID(IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x0088, 0xa1,0xd1,0x93,0x44,0x36,0x5f,0xbc); DEFINE_GUID(IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x0088, 0xa1,0xd1,0x93,0x44,0x36,0x5f,0xbc);
DEFINE_GUID(IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x0091, 0x11,0xd1,0x8a,0x75,0xeb,0xf2,0xfa); DEFINE_GUID(IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x0091, 0x11,0xd1,0x8a,0x75,0xeb,0xf2,0xfa);
@ -839,7 +841,7 @@ RegKeyEditPermissions(HWND hWndOwner,
LPTSTR lpKeyPath = NULL; LPTSTR lpKeyPath = NULL;
PCRegKeySecurity RegKeySecurity; PCRegKeySecurity RegKeySecurity;
SI_OBJECT_INFO ObjectInfo; SI_OBJECT_INFO ObjectInfo;
int lnMachine = 0, lnKeyName = 0; size_t lnMachine = 0, lnKeyName = 0;
if (pfnEditSecurity == NULL) if (pfnEditSecurity == NULL)
{ {