4 * Copied and modified heavily from loader/resource.c
10 struct resource
/* This needs to coincide with what winerc generates. */
11 { /* It should really only appear in one place. */
20 struct resource
** Resources
/* NULL-terminated array of pointers */
24 static ResListE
* ResourceList
=NULL
;
26 void LIBRES_RegisterResources(struct resource
** Res
)
30 for(Curr
=&ResourceList
; *Curr
; Curr
=&((*Curr
)->next
)) { }
31 n
=malloc(sizeof(ResListE
));
39 fprintf(stderr
,"LIBRES_RegisterResources(): Out of memory.\n");
42 /**********************************************************************
45 HRSRC
LIBRES_FindResource( HMODULE hModule
, SEGPTR name
, SEGPTR type
)
47 WINELIB_UNIMP("LIBRES_FindResource()");
52 /**********************************************************************
55 HGLOBAL
LIBRES_LoadResource( HMODULE hModule
, HRSRC hRsrc
)
57 return (HGLOBAL
)(((struct resource
*)hRsrc
)->bytes
);
61 /**********************************************************************
64 LPVOID
LIBRES_LockResource( HMODULE hModule
, HGLOBAL handle
)
70 /**********************************************************************
73 BOOL
LIBRES_FreeResource( HMODULE hModule
, HGLOBAL handle
)
79 /**********************************************************************
80 * LIBRES_AccessResource
82 INT
LIBRES_AccessResource( HINSTANCE hModule
, HRSRC hRsrc
)
84 WINELIB_UNIMP("LIBRES_AccessResource()");
89 /**********************************************************************
90 * LIBRES_SizeofResource
92 DWORD
LIBRES_SizeofResource( HMODULE hModule
, HRSRC hRsrc
)
94 return (HGLOBAL
)(((struct resource
*)hRsrc
)->size
);
98 /**********************************************************************
99 * LIBRES_AllocResource
101 HGLOBAL
LIBRES_AllocResource( HMODULE hModule
, HRSRC hRsrc
, DWORD size
)
103 WINELIB_UNIMP("LIBRES_AllocResource()");