mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Sync to Wine-20050419:
Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Jakob Eriksson <jakov@vmlinux.org> - Get rid of HeapAlloc casts. svn path=/trunk/; revision=15012
This commit is contained in:
parent
df82a2a2a8
commit
7bd0add306
1 changed files with 2 additions and 2 deletions
|
@ -375,7 +375,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo)
|
||||||
len = MAX_PATH;
|
len = MAX_PATH;
|
||||||
if (ERROR_SUCCESS == RegQueryValueA(hkey, NULL, keydesc, &len))
|
if (ERROR_SUCCESS == RegQueryValueA(hkey, NULL, keydesc, &len))
|
||||||
{
|
{
|
||||||
CLSID* lpclsid = (CLSID*) HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
|
CLSID* lpclsid = HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
|
||||||
memcpy(lpclsid, &clsid, sizeof(CLSID));
|
memcpy(lpclsid, &clsid, sizeof(CLSID));
|
||||||
|
|
||||||
len = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc);
|
len = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc);
|
||||||
|
@ -479,7 +479,7 @@ static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo)
|
||||||
WCHAR wcsFile[MAX_PATH];
|
WCHAR wcsFile[MAX_PATH];
|
||||||
|
|
||||||
SendMessageA(pdlgInfo->hwndFileTB, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)fname);
|
SendMessageA(pdlgInfo->hwndFileTB, WM_GETTEXT, (WPARAM)MAX_PATH, (LPARAM)fname);
|
||||||
strncpy(pdlgInfo->lpOleUIInsertObject->lpszFile, fname, pdlgInfo->lpOleUIInsertObject->cchFile);
|
lstrcpynA(pdlgInfo->lpOleUIInsertObject->lpszFile, fname, pdlgInfo->lpOleUIInsertObject->cchFile);
|
||||||
|
|
||||||
RtlMultiByteToUnicodeN(wcsFile, MAX_PATH, NULL, fname, MAX_PATH);
|
RtlMultiByteToUnicodeN(wcsFile, MAX_PATH, NULL, fname, MAX_PATH);
|
||||||
if (ERROR_SUCCESS == (hres = GetClassFile(wcsFile, &pdlgInfo->lpOleUIInsertObject->clsid)))
|
if (ERROR_SUCCESS == (hres = GetClassFile(wcsFile, &pdlgInfo->lpOleUIInsertObject->clsid)))
|
||||||
|
|
Loading…
Reference in a new issue