2 * System resources loading
4 * Copyright 1995 Alexandre Julliard
8 #include "wine/winbase16.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_Cz_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_Po_ResTable[];
28 extern const wrc_resource32_t * const sysres_Sw_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[];
33 static const wrc_resource32_t * const * SYSRES_Resources[] =
35 sysres_En_ResTable, /* LANG_En */
36 sysres_Es_ResTable, /* LANG_Es */
37 sysres_De_ResTable, /* LANG_De */
38 sysres_No_ResTable, /* LANG_No */
39 sysres_Fr_ResTable, /* LANG_Fr */
40 sysres_Fi_ResTable, /* LANG_Fi */
41 sysres_Da_ResTable, /* LANG_Da */
42 sysres_Cz_ResTable, /* LANG_Cz */
43 sysres_Eo_ResTable, /* LANG_Eo */
44 sysres_It_ResTable, /* LANG_It */
45 sysres_Ko_ResTable, /* LANG_Ko */
46 sysres_Hu_ResTable, /* LANG_Hu */
47 sysres_Pl_ResTable, /* LANG_Pl */
48 sysres_Po_ResTable, /* LANG_Po */
49 sysres_Sw_ResTable, /* LANG_Sw */
50 sysres_Ca_ResTable, /* LANG_Ca */
51 sysres_Nl_ResTable, /* LANG_Nl */
52 sysres_Ru_ResTable /* LANG_Ru */
56 /***********************************************************************
57 * SYSRES_GetResourcePtr
59 * Return a pointer to a system resource.
61 LPCVOID SYSRES_GetResPtr( SYSTEM_RESOURCE id )
63 return SYSRES_Resources[Options.language][id]->data;
67 /***********************************************************************
70 * Create a global memory block for a system resource.
72 HGLOBAL16 SYSRES_LoadResource( SYSTEM_RESOURCE id )
74 const wrc_resource32_t *resPtr;
76 resPtr = SYSRES_Resources[Options.language][id];
77 return GLOBAL_CreateBlock( GMEM_FIXED, resPtr->data, resPtr->datasize,
78 GetCurrentPDB16(), FALSE, FALSE, TRUE, NULL );
82 /***********************************************************************
85 * Free a global memory block for a system resource.
87 void SYSRES_FreeResource( HGLOBAL16 handle )
89 GLOBAL_FreeBlock( handle );