* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "oledlg_private.h"
-
-#include <winreg.h>
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
+#include "wine/winternl.h"
+#include "winerror.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include "oledlg.h"
+#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(oledlg);
typedef HRESULT (*DLLREGISTER) (void);
extern HINSTANCE OLEDLG_hInstance;
-static const char OleUIInsertObjectInfoStr[] = "OleUIInsertObjectInfoStr";
+static const WCHAR OleUIInsertObjectInfoStr[] = {'O','l','e','U','I','I','n','s','e','r','t','O','b','j','e','c','t',
+ 'I','n','f','o','S','t','r',0};
/***********************************************************************
* OleUIInsertObjectA (OLEDLG.3)
*/
INT_PTR CALLBACK UIInsertObjectDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- InsertObjectDlgInfo* pdlgInfo = GetPropA(hwnd,OleUIInsertObjectInfoStr);
+ InsertObjectDlgInfo* pdlgInfo = GetPropW(hwnd, OleUIInsertObjectInfoStr);
switch(uMsg)
{
pdlgInfo->hwndSelf = hwnd;
- SetPropA(hwnd, OleUIInsertObjectInfoStr, pdlgInfo);
+ SetPropW(hwnd, OleUIInsertObjectInfoStr, pdlgInfo);
UIINSERTOBJECTDLG_InitDialog(pdlgInfo);
case WM_DESTROY:
if (pdlgInfo)
UIINSERTOBJECTDLG_FreeObjectTypes(pdlgInfo);
- RemovePropA(hwnd, OleUIInsertObjectInfoStr);
+ RemovePropW(hwnd, OleUIInsertObjectInfoStr);
return FALSE;
default :
*/
static LRESULT UIINSOBJDLG_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
+ InsertObjectDlgInfo* pdlgInfo = GetPropW(hwnd, OleUIInsertObjectInfoStr);
WORD wNotifyCode = HIWORD(wParam);
WORD wID = LOWORD(wParam);
- InsertObjectDlgInfo* pdlgInfo = GetPropA(hwnd,OleUIInsertObjectInfoStr);
switch(wID)
{
RegOpenKeyExW(HKEY_CLASSES_ROOT, szClsid, 0, KEY_READ, &hkclsids);
- while (ERROR_SUCCESS == (ret = RegEnumKeyW(hkclsids, index, szclsid, sizeof(szclsid)/sizeof(szclsid[0]))))
+ while (ERROR_SUCCESS == (ret = RegEnumKeyW(hkclsids, index, szclsid, ARRAY_SIZE(szclsid))))
{
index++;
WideCharToMultiByte(CP_ACP, 0, wcsFile, -1,
pdlgInfo->lpOleUIInsertObject->lpszFile, pdlgInfo->lpOleUIInsertObject->cchFile, NULL, NULL);
- if (ERROR_SUCCESS == (hres = GetClassFile(wcsFile, &pdlgInfo->lpOleUIInsertObject->clsid)))
+ if (SUCCEEDED(hres = GetClassFile(wcsFile, &pdlgInfo->lpOleUIInsertObject->clsid)))
{
if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATEFILEOBJECT)
{