2 * System resources loading
4 * Copyright 1995 Alexandre Julliard
12 extern const struct resource * const sysres_En_Table[];
13 extern const struct resource * const sysres_Es_Table[];
14 extern const struct resource * const sysres_De_Table[];
15 extern const struct resource * const sysres_No_Table[];
16 extern const struct resource * const sysres_Fr_Table[];
17 extern const struct resource * const sysres_Fi_Table[];
18 extern const struct resource * const sysres_Da_Table[];
19 extern const struct resource * const sysres_Cz_Table[];
20 extern const struct resource * const sysres_Eo_Table[];
21 extern const struct resource * const sysres_It_Table[];
22 extern const struct resource * const sysres_Ko_Table[];
23 extern const struct resource * const sysres_Hu_Table[];
24 extern const struct resource * const sysres_Pl_Table[];
25 extern const struct resource * const sysres_Po_Table[];
27 static const struct resource * const * SYSRES_Resources[] =
29 sysres_En_Table, /* LANG_En */
30 sysres_Es_Table, /* LANG_Es */
31 sysres_De_Table, /* LANG_De */
32 sysres_No_Table, /* LANG_No */
33 sysres_Fr_Table, /* LANG_Fr */
34 sysres_Fi_Table, /* LANG_Fi */
35 sysres_Da_Table, /* LANG_Da */
36 sysres_Cz_Table, /* LANG_Cz */
37 sysres_Eo_Table, /* LANG_Eo */
38 sysres_It_Table, /* LANG_It */
39 sysres_Ko_Table, /* LANG_Ko */
40 sysres_Hu_Table, /* LANG_Hu */
41 sysres_Pl_Table, /* LANG_Pl */
42 sysres_Po_Table /* LANG_Po */
46 /***********************************************************************
47 * SYSRES_GetResourcePtr
49 * Return a pointer to a system resource.
51 LPCVOID SYSRES_GetResPtr( SYSTEM_RESOURCE id )
53 return SYSRES_Resources[Options.language][id]->bytes;
57 /***********************************************************************
60 * Create a global memory block for a system resource.
62 HGLOBAL16 SYSRES_LoadResource( SYSTEM_RESOURCE id )
64 const struct resource *resPtr;
66 resPtr = SYSRES_Resources[Options.language][id];
67 return GLOBAL_CreateBlock( GMEM_FIXED, resPtr->bytes, resPtr->size,
68 GetCurrentPDB(), FALSE, FALSE, TRUE, NULL );
72 /***********************************************************************
75 * Free a global memory block for a system resource.
77 void SYSRES_FreeResource( HGLOBAL16 handle )
79 GLOBAL_FreeBlock( handle );