Modified ImageList_LoadImageA to check the case where cx is set to zero.
[wine.git] / resources / sysres.c
blobcfdc45d04965bc2a5f727b669e5e1da2a004fab9
1 /*
2 * System resources loading
4 * Copyright 1995 Alexandre Julliard
5 */
7 #include "winbase.h"
8 #include "wine/winbase16.h"
9 #include "global.h"
10 #include "options.h"
11 #include "resource.h"
12 #include "wrc_rsc.h"
14 extern const wrc_resource32_t * const sysres_En_ResTable[];
15 extern const wrc_resource32_t * const sysres_Es_ResTable[];
16 extern const wrc_resource32_t * const sysres_De_ResTable[];
17 extern const wrc_resource32_t * const sysres_No_ResTable[];
18 extern const wrc_resource32_t * const sysres_Fr_ResTable[];
19 extern const wrc_resource32_t * const sysres_Fi_ResTable[];
20 extern const wrc_resource32_t * const sysres_Da_ResTable[];
21 extern const wrc_resource32_t * const sysres_Cs_ResTable[];
22 extern const wrc_resource32_t * const sysres_Eo_ResTable[];
23 extern const wrc_resource32_t * const sysres_It_ResTable[];
24 extern const wrc_resource32_t * const sysres_Ko_ResTable[];
25 extern const wrc_resource32_t * const sysres_Hu_ResTable[];
26 extern const wrc_resource32_t * const sysres_Pl_ResTable[];
27 extern const wrc_resource32_t * const sysres_Pt_ResTable[];
28 extern const wrc_resource32_t * const sysres_Sv_ResTable[];
29 extern const wrc_resource32_t * const sysres_Ca_ResTable[];
30 extern const wrc_resource32_t * const sysres_Nl_ResTable[];
31 extern const wrc_resource32_t * const sysres_Ru_ResTable[];
32 extern const wrc_resource32_t * const sysres_Wa_ResTable[];
34 static const wrc_resource32_t * const * SYSRES_Resources[] =
36 sysres_En_ResTable, /* LANG_En */
37 sysres_Es_ResTable, /* LANG_Es */
38 sysres_De_ResTable, /* LANG_De */
39 sysres_No_ResTable, /* LANG_No */
40 sysres_Fr_ResTable, /* LANG_Fr */
41 sysres_Fi_ResTable, /* LANG_Fi */
42 sysres_Da_ResTable, /* LANG_Da */
43 sysres_Cs_ResTable, /* LANG_Cs */
44 sysres_Eo_ResTable, /* LANG_Eo */
45 sysres_It_ResTable, /* LANG_It */
46 sysres_Ko_ResTable, /* LANG_Ko */
47 sysres_Hu_ResTable, /* LANG_Hu */
48 sysres_Pl_ResTable, /* LANG_Pl */
49 sysres_Pt_ResTable, /* LANG_Pt */
50 sysres_Sv_ResTable, /* LANG_Sv */
51 sysres_Ca_ResTable, /* LANG_Ca */
52 sysres_Nl_ResTable, /* LANG_Nl */
53 sysres_Ru_ResTable, /* LANG_Ru */
54 sysres_Wa_ResTable /* LANG_Wa */
58 /***********************************************************************
59 * SYSRES_GetResourcePtr
61 * Return a pointer to a system resource.
63 LPCVOID SYSRES_GetResPtr( SYSTEM_RESOURCE id )
65 return SYSRES_Resources[Options.language][id]->data;
69 /***********************************************************************
70 * SYSRES_LoadResource
72 * Create a global memory block for a system resource.
74 HGLOBAL16 SYSRES_LoadResource( SYSTEM_RESOURCE id )
76 const wrc_resource32_t *resPtr;
78 resPtr = SYSRES_Resources[Options.language][id];
79 return GLOBAL_CreateBlock( GMEM_FIXED, resPtr->data, resPtr->datasize,
80 GetCurrentPDB16(), FALSE, FALSE, TRUE, NULL );
84 /***********************************************************************
85 * SYSRES_FreeResource
87 * Free a global memory block for a system resource.
89 void SYSRES_FreeResource( HGLOBAL16 handle )
91 GLOBAL_FreeBlock( handle );