Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9d2b8628
Commit
9d2b8628
authored
Sep 16, 2002
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Sep 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert HRSRC to a void*.
parent
3a860194
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
42 additions
and
29 deletions
+42
-29
colordlg.c
dlls/commdlg/colordlg.c
+5
-5
filedlg.c
dlls/commdlg/filedlg.c
+4
-3
finddlg.c
dlls/commdlg/finddlg.c
+2
-1
fontdlg.c
dlls/commdlg/fontdlg.c
+4
-2
printdlg.c
dlls/commdlg/printdlg.c
+10
-5
virtcopy.c
dlls/setupapi/virtcopy.c
+2
-1
windef.h
include/windef.h
+1
-1
resource.c
loader/resource.c
+8
-5
cursoricon.c
windows/cursoricon.c
+2
-2
dialog.c
windows/dialog.c
+4
-4
No files found.
dlls/commdlg/colordlg.c
View file @
9d2b8628
...
...
@@ -1403,7 +1403,8 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
}
else
{
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
...
...
@@ -1454,9 +1455,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
* ChooseColorW (COMDLG32.@)
*/
BOOL
WINAPI
ChooseColorW
(
LPCHOOSECOLORW
lpChCol
)
{
HANDLE
hDlgTmpl
=
0
;
BOOL
bRet
=
FALSE
;
LPCVOID
template
;
...
...
@@ -1474,7 +1473,7 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol )
}
else
if
(
lpChCol
->
Flags
&
CC_ENABLETEMPLATE
)
{
HANDLE
hResInfo
;
HRSRC
hResInfo
;
if
(
!
(
hResInfo
=
FindResourceW
(
lpChCol
->
hInstance
,
lpChCol
->
lpTemplateName
,
RT_DIALOGW
)))
...
...
@@ -1491,7 +1490,8 @@ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol )
}
else
{
HANDLE
hResInfo
,
hDlgTmpl
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
"CHOOSE_COLOR"
,
RT_DIALOGA
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
...
...
dlls/commdlg/filedlg.c
View file @
9d2b8628
...
...
@@ -151,7 +151,7 @@ BOOL Get32BitsTemplate(LFSPRIVATE lfs)
}
else
if
(
ofnW
->
Flags
&
OFN_ENABLETEMPLATE
)
{
H
ANDLE
hResInfo
;
H
RSRC
hResInfo
;
if
(
lfs
->
ofnA
)
hResInfo
=
FindResourceA
(
lfs
->
ofnA
->
hInstance
,
lfs
->
ofnA
->
lpTemplateName
,
...
...
@@ -173,7 +173,7 @@ BOOL Get32BitsTemplate(LFSPRIVATE lfs)
return
FALSE
;
}
}
else
{
/* get it from internal Wine resource */
H
ANDLE
hResInfo
;
H
RSRC
hResInfo
;
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
lfs
->
open
?
"OPEN_FILE"
:
"SAVE_FILE"
,
RT_DIALOGA
)))
{
...
...
@@ -225,7 +225,8 @@ BOOL Get16BitsTemplate(LFSPRIVATE lfs)
}
else
{
/* get resource from (32 bits) own Wine resource; convert it to 16 */
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
...
...
dlls/commdlg/finddlg.c
View file @
9d2b8628
...
...
@@ -96,7 +96,8 @@ BOOL FINDDLG_Get16BitsTemplate(LFRPRIVATE lfr)
}
else
{
/* get resource from (32 bits) own Wine resource; convert it to 16 */
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
HGLOBAL16
hGlobal16
;
...
...
dlls/commdlg/fontdlg.c
View file @
9d2b8628
...
...
@@ -183,7 +183,8 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
}
else
{
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
...
...
@@ -260,7 +261,8 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
BOOL
WINAPI
ChooseFontA
(
LPCHOOSEFONTA
lpChFont
)
{
LPCVOID
template
;
HANDLE
hResInfo
,
hDlgTmpl
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
!
(
hResInfo
=
FindResourceA
(
COMMDLG_hInstance32
,
"CHOOSE_FONT"
,
RT_DIALOGA
)))
{
...
...
dlls/commdlg/printdlg.c
View file @
9d2b8628
...
...
@@ -2096,7 +2096,8 @@ BOOL WINAPI PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
*/
static
HGLOBAL16
PRINTDLG_Get16TemplateFrom32
(
char
*
PrintResourceName
)
{
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
LPCVOID
template32
;
DWORD
size
;
HGLOBAL16
hGlobal16
;
...
...
@@ -2142,7 +2143,8 @@ static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(char *PrintResourceName)
*/
static
HGLOBAL
PRINTDLG_GetDlgTemplateA
(
PRINTDLGA
*
lppd
)
{
HGLOBAL
hDlgTmpl
,
hResInfo
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
lppd
->
Flags
&
PD_PRINTSETUP
)
{
if
(
lppd
->
Flags
&
PD_ENABLESETUPTEMPLATEHANDLE
)
{
...
...
@@ -2175,7 +2177,8 @@ static HGLOBAL PRINTDLG_GetDlgTemplateA(PRINTDLGA *lppd)
static
HGLOBAL
PRINTDLG_GetDlgTemplateW
(
PRINTDLGW
*
lppd
)
{
HGLOBAL
hDlgTmpl
,
hResInfo
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
const
WCHAR
xpsetup
[]
=
{
'P'
,
'R'
,
'I'
,
'N'
,
'T'
,
'3'
,
'2'
,
'_'
,
'S'
,
'E'
,
'T'
,
'U'
,
'P'
,
0
};
const
WCHAR
xprint
[]
=
{
'P'
,
'R'
,
'I'
,
'N'
,
'T'
,
'3'
,
'2'
,
0
};
...
...
@@ -2846,7 +2849,8 @@ typedef struct {
static
HGLOBAL
PRINTDLG_GetPGSTemplateA
(
PAGESETUPDLGA
*
lppd
)
{
HGLOBAL
hDlgTmpl
,
hResInfo
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
lppd
->
Flags
&
PSD_ENABLEPAGESETUPTEMPLATEHANDLE
)
{
hDlgTmpl
=
lppd
->
hPageSetupTemplate
;
...
...
@@ -2863,7 +2867,8 @@ static HGLOBAL PRINTDLG_GetPGSTemplateA(PAGESETUPDLGA *lppd)
static
HGLOBAL
PRINTDLG_GetPGSTemplateW
(
PAGESETUPDLGW
*
lppd
)
{
HGLOBAL
hDlgTmpl
,
hResInfo
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl
;
if
(
lppd
->
Flags
&
PSD_ENABLEPAGESETUPTEMPLATEHANDLE
)
{
hDlgTmpl
=
lppd
->
hPageSetupTemplate
;
...
...
dlls/setupapi/virtcopy.c
View file @
9d2b8628
...
...
@@ -594,7 +594,8 @@ static BOOL CALLBACK VCP_UI_FileCopyDlgProc(HWND hWndDlg, UINT iMsg, WPARAM wPar
BOOL
VCP_UI_GetDialogTemplate
(
LPCVOID
*
template32
)
{
HANDLE
hResInfo
,
hDlgTmpl32
;
HRSRC
hResInfo
;
HGLOBAL
hDlgTmpl32
;
if
(
!
(
hResInfo
=
FindResourceA
(
SETUPAPI_hInstance
,
MAKEINTRESOURCEA
(
COPYFILEDLGORD
),
RT_DIALOGA
)))
return
FALSE
;
...
...
include/windef.h
View file @
9d2b8628
...
...
@@ -90,7 +90,7 @@ DECLARE_HANDLE(HMONITOR);
DECLARE_HANDLE
(
HPALETTE
);
DECLARE_OLD_HANDLE
(
HPEN
);
DECLARE_OLD_HANDLE
(
HRGN
);
DECLARE_
OLD_
HANDLE
(
HRSRC
);
DECLARE_HANDLE
(
HRSRC
);
DECLARE_HANDLE
(
HTASK
);
DECLARE_HANDLE
(
HWINEVENTHOOK
);
DECLARE_HANDLE
(
HWINSTA
);
...
...
loader/resource.c
View file @
9d2b8628
...
...
@@ -48,10 +48,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
#define HRSRC_MAP_BLOCKSIZE 16
/* handle conversions */
#define HRSRC_32(h16) ((HRSRC)(ULONG_PTR)(h16))
typedef
struct
_HRSRC_ELEM
{
H
ANDLE
hRsrc
;
WORD
type
;
H
RSRC
hRsrc
;
WORD
type
;
}
HRSRC_ELEM
;
typedef
struct
_HRSRC_MAP
...
...
@@ -64,7 +67,7 @@ typedef struct _HRSRC_MAP
/**********************************************************************
* MapHRsrc32To16
*/
static
HRSRC
MapHRsrc32To16
(
NE_MODULE
*
pModule
,
H
ANDLE
hRsrc32
,
WORD
type
)
static
HRSRC
MapHRsrc32To16
(
NE_MODULE
*
pModule
,
H
RSRC
hRsrc32
,
WORD
type
)
{
HRSRC_MAP
*
map
=
(
HRSRC_MAP
*
)
pModule
->
hRsrcMap
;
HRSRC_ELEM
*
newElem
;
...
...
@@ -385,7 +388,7 @@ HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
*/
HGLOBAL16
WINAPI
LoadResource16
(
HMODULE16
hModule
,
HRSRC16
hRsrc
)
{
return
RES_LoadResource
(
hModule
,
hRsrc
,
TRUE
);
return
RES_LoadResource
(
hModule
,
HRSRC_32
(
hRsrc
)
,
TRUE
);
}
/**********************************************************************
...
...
@@ -477,7 +480,7 @@ BOOL WINAPI FreeResource( HGLOBAL handle )
*/
DWORD
WINAPI
SizeofResource16
(
HMODULE16
hModule
,
HRSRC16
hRsrc
)
{
return
RES_SizeofResource
(
hModule
,
hRsrc
,
TRUE
);
return
RES_SizeofResource
(
hModule
,
HRSRC_32
(
hRsrc
)
,
TRUE
);
}
/**********************************************************************
...
...
windows/cursoricon.c
View file @
9d2b8628
...
...
@@ -735,7 +735,7 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
BOOL
fCursor
,
UINT
loadflags
)
{
HANDLE
handle
=
0
,
h
=
0
;
H
ANDLE
hRsrc
;
H
RSRC
hRsrc
;
CURSORICONDIR
*
dir
;
CURSORICONDIRENTRY
*
dirEntry
;
LPBYTE
bits
;
...
...
@@ -757,7 +757,7 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
}
else
/* Load from resource */
{
HANDLE
hGroupRsrc
;
HRSRC
hGroupRsrc
;
WORD
wResId
;
DWORD
dwBytesInRes
;
...
...
windows/dialog.c
View file @
9d2b8628
...
...
@@ -931,7 +931,7 @@ HWND WINAPI CreateDialogParamA( HINSTANCE hInst, LPCSTR name,
HWND
owner
,
DLGPROC
dlgProc
,
LPARAM
param
)
{
H
ANDLE
hrsrc
=
FindResourceA
(
hInst
,
name
,
RT_DIALOGA
);
H
RSRC
hrsrc
=
FindResourceA
(
hInst
,
name
,
RT_DIALOGA
);
if
(
!
hrsrc
)
return
0
;
return
CreateDialogIndirectParamA
(
hInst
,
(
LPVOID
)
LoadResource
(
hInst
,
hrsrc
),
...
...
@@ -946,7 +946,7 @@ HWND WINAPI CreateDialogParamW( HINSTANCE hInst, LPCWSTR name,
HWND
owner
,
DLGPROC
dlgProc
,
LPARAM
param
)
{
H
ANDLE
hrsrc
=
FindResourceW
(
hInst
,
name
,
RT_DIALOGW
);
H
RSRC
hrsrc
=
FindResourceW
(
hInst
,
name
,
RT_DIALOGW
);
if
(
!
hrsrc
)
return
0
;
return
CreateDialogIndirectParamW
(
hInst
,
(
LPVOID
)
LoadResource
(
hInst
,
hrsrc
),
...
...
@@ -1100,7 +1100,7 @@ INT WINAPI DialogBoxParamA( HINSTANCE hInst, LPCSTR name,
HWND
owner
,
DLGPROC
dlgProc
,
LPARAM
param
)
{
HWND
hwnd
;
H
ANDLE
hrsrc
=
FindResourceA
(
hInst
,
name
,
RT_DIALOGA
);
H
RSRC
hrsrc
=
FindResourceA
(
hInst
,
name
,
RT_DIALOGA
);
if
(
!
hrsrc
)
return
0
;
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
(
LPVOID
)
LoadResource
(
hInst
,
hrsrc
),
owner
,
dlgProc
,
param
,
WIN_PROC_32A
,
TRUE
);
...
...
@@ -1116,7 +1116,7 @@ INT WINAPI DialogBoxParamW( HINSTANCE hInst, LPCWSTR name,
HWND
owner
,
DLGPROC
dlgProc
,
LPARAM
param
)
{
HWND
hwnd
;
H
ANDLE
hrsrc
=
FindResourceW
(
hInst
,
name
,
RT_DIALOGW
);
H
RSRC
hrsrc
=
FindResourceW
(
hInst
,
name
,
RT_DIALOGW
);
if
(
!
hrsrc
)
return
0
;
hwnd
=
DIALOG_CreateIndirect
(
hInst
,
(
LPVOID
)
LoadResource
(
hInst
,
hrsrc
),
owner
,
dlgProc
,
param
,
WIN_PROC_32W
,
TRUE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment