73d7e9a8a9cf892b49ec88a7f7593cdc16562085
[reactos.git] / reactos / dll / cpl / appwiz / appwiz.h
1 #include <config.h>
2 #include <wine/port.h>
3
4 #include <stdarg.h>
5
6 #define WIN32_NO_STATUS
7 #define _INC_WINDOWS
8 #define COM_NO_WINDOWS_H
9
10 #define COBJMACROS
11
12 #include <windef.h>
13 #include <winbase.h>
14 #include <winreg.h>
15 #include <winnls.h>
16 #include <shlobj.h>
17
18 #include <wine/debug.h>
19 WINE_DEFAULT_DEBUG_CHANNEL(appwiz);
20
21 #include "resource.h"
22
23 typedef struct
24 {
25 WCHAR szTarget[MAX_PATH];
26 WCHAR szWorkingDirectory[MAX_PATH];
27 WCHAR szDescription[MAX_PATH];
28 WCHAR szLinkName[MAX_PATH];
29 } CREATE_LINK_CONTEXT, *PCREATE_LINK_CONTEXT;
30
31 extern HINSTANCE hApplet;
32
33 /* createlink.c */
34 INT_PTR CALLBACK
35 WelcomeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
36
37 INT_PTR CALLBACK
38 FinishDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
39
40 LONG CALLBACK
41 NewLinkHere(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
42
43 void ShowLastWin32Error(HWND hWndOwner);
44
45 typedef enum {
46 ADDON_GECKO,
47 ADDON_MONO
48 } addon_t;
49
50 BOOL install_addon(addon_t) DECLSPEC_HIDDEN;
51
52 extern HINSTANCE hInst DECLSPEC_HIDDEN;
53
54 static inline void *heap_alloc(size_t len)
55 {
56 return HeapAlloc(GetProcessHeap(), 0, len);
57 }
58
59 static inline void *heap_realloc(void *mem, size_t len)
60 {
61 return HeapReAlloc(GetProcessHeap(), 0, mem, len);
62 }
63
64 static inline BOOL heap_free(void *mem)
65 {
66 return HeapFree(GetProcessHeap(), 0, mem);
67 }
68
69 static inline WCHAR *heap_strdupAtoW(const char *str)
70 {
71 WCHAR *ret = NULL;
72
73 if(str) {
74 size_t len;
75
76 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
77 ret = heap_alloc(len*sizeof(WCHAR));
78 if(ret)
79 MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
80 }
81
82 return ret;
83 }
84
85 /* EOF */