reactos/dll/cpl/appwiz/appwiz.h

83 lines
1.6 KiB
C
Raw Normal View History

#define COBJMACROS
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <winnls.h>
#include <shellapi.h>
#include <cpl.h>
#include <tchar.h>
#include <shlobj.h>
#include <wine/debug.h>
#include <wine/unicode.h>
#include "resource.h"
typedef struct
{
WCHAR szTarget[MAX_PATH];
WCHAR szWorkingDirectory[MAX_PATH];
WCHAR szDescription[MAX_PATH];
WCHAR szLinkName[MAX_PATH];
} CREATE_LINK_CONTEXT, *PCREATE_LINK_CONTEXT;
extern HINSTANCE hApplet;
/* createlink.c */
INT_PTR CALLBACK
WelcomeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK
FinishDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
LONG CALLBACK
NewLinkHere(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
void ShowLastWin32Error(HWND hWndOwner);
typedef enum {
ADDON_GECKO,
ADDON_MONO
} addon_t;
BOOL install_addon(addon_t) DECLSPEC_HIDDEN;
extern HINSTANCE hInst DECLSPEC_HIDDEN;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
static inline void *heap_realloc(void *mem, size_t len)
{
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline WCHAR *heap_strdupAtoW(const char *str)
{
WCHAR *ret = NULL;
if(str) {
size_t len;
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
ret = heap_alloc(len*sizeof(WCHAR));
if(ret)
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
}
return ret;
}
/* EOF */