4 * Copyright 1993 Robert J. Amstadt
5 * Copyright 1995 Alexandre Julliard
11 #include <sys/types.h>
16 #include "wine/winuser16.h"
30 extern WORD WINE_LanguageId;
32 #define HRSRC_MAP_BLOCKSIZE 16
34 typedef struct _HRSRC_ELEM
40 typedef struct _HRSRC_MAP
47 /**********************************************************************
50 static HRSRC16 MapHRsrc32To16( NE_MODULE *pModule, HANDLE32 hRsrc32, WORD type )
52 HRSRC_MAP *map = (HRSRC_MAP *)pModule->hRsrcMap;
56 /* On first call, initialize HRSRC map */
59 if ( !(map = (HRSRC_MAP *)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
60 sizeof(HRSRC_MAP) ) ) )
62 ERR( resource, "Cannot allocate HRSRC map\n" );
65 pModule->hRsrcMap = (LPVOID)map;
68 /* Check whether HRSRC32 already in map */
69 for ( i = 0; i < map->nUsed; i++ )
70 if ( map->elem[i].hRsrc == hRsrc32 )
71 return (HRSRC16)(i + 1);
73 /* If no space left, grow table */
74 if ( map->nUsed == map->nAlloc )
76 if ( !(newElem = (HRSRC_ELEM *)HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
78 (map->nAlloc + HRSRC_MAP_BLOCKSIZE)
79 * sizeof(HRSRC_ELEM) ) ))
81 ERR( resource, "Cannot grow HRSRC map\n" );
85 map->nAlloc += HRSRC_MAP_BLOCKSIZE;
88 /* Add HRSRC32 to table */
89 map->elem[map->nUsed].hRsrc = hRsrc32;
90 map->elem[map->nUsed].type = type;
93 return (HRSRC16)map->nUsed;
96 /**********************************************************************
99 static HANDLE32 MapHRsrc16To32( NE_MODULE *pModule, HRSRC16 hRsrc16 )
101 HRSRC_MAP *map = (HRSRC_MAP *)pModule->hRsrcMap;
102 if ( !map || !hRsrc16 || (int)hRsrc16 > map->nUsed ) return 0;
104 return map->elem[(int)hRsrc16-1].hRsrc;
107 /**********************************************************************
110 static WORD MapHRsrc16ToType( NE_MODULE *pModule, HRSRC16 hRsrc16 )
112 HRSRC_MAP *map = (HRSRC_MAP *)pModule->hRsrcMap;
113 if ( !map || !hRsrc16 || (int)hRsrc16 > map->nUsed ) return 0;
115 return map->elem[(int)hRsrc16-1].type;
118 /**********************************************************************
119 * FindResource16 (KERNEL.60)
121 HRSRC16 WINAPI FindResource16( HMODULE16 hModule, SEGPTR name, SEGPTR type )
123 LPCSTR nameStr = HIWORD(name)? PTR_SEG_TO_LIN(name) : (LPCSTR)name;
124 LPCSTR typeStr = HIWORD(type)? PTR_SEG_TO_LIN(type) : (LPCSTR)type;
126 NE_MODULE *pModule = NE_GetPtr( hModule );
127 if ( !pModule ) return 0;
129 if ( pModule->module32 )
131 HANDLE32 hRsrc32 = FindResource32A( pModule->module32, nameStr, typeStr );
132 return MapHRsrc32To16( pModule, hRsrc32, HIWORD(type)? 0 : type );
135 return NE_FindResource( pModule, nameStr, typeStr );
138 /**********************************************************************
139 * FindResource32A (KERNEL32.128)
141 HANDLE32 WINAPI FindResource32A( HMODULE32 hModule, LPCSTR name, LPCSTR type)
143 return FindResourceEx32A(hModule,type,name,WINE_LanguageId);
146 /**********************************************************************
147 * FindResourceEx32A (KERNEL32.129)
149 HANDLE32 WINAPI FindResourceEx32A( HMODULE32 hModule, LPCSTR type, LPCSTR name,
155 if (HIWORD((DWORD)name))
156 xname = HEAP_strdupAtoW( GetProcessHeap(), 0, name );
158 xname = (LPWSTR)name;
159 if (HIWORD((DWORD)type))
160 xtype = HEAP_strdupAtoW( GetProcessHeap(), 0, type);
162 xtype = (LPWSTR)type;
163 ret = FindResourceEx32W( hModule, xtype, xname, lang );
164 if (HIWORD((DWORD)name)) HeapFree( GetProcessHeap(), 0, xname );
165 if (HIWORD((DWORD)type)) HeapFree( GetProcessHeap(), 0, xtype );
170 /**********************************************************************
171 * FindResourceEx32W (KERNEL32.130)
173 HRSRC32 WINAPI FindResourceEx32W( HMODULE32 hModule, LPCWSTR type,
174 LPCWSTR name, WORD lang )
176 WINE_MODREF *wm = MODULE32_LookupHMODULE(PROCESS_Current(),hModule);
179 TRACE(resource, "module=%08x(%s) type=%s name=%s\n",
180 hModule, wm->modname,
184 if (!wm) return (HRSRC32)0;
189 hrsrc = PE_FindResourceEx32W(wm,name,type,lang);
193 hrsrc = LIBRES_FindResource( hModule, name, type );
197 ERR(module,"unknown module type %d\n",wm->type);
202 ERR(resource,"0x%08x(%s) %s(%s) not found!\n", hModule,wm->modname, debugres_w (name), debugres_w (type));
208 /**********************************************************************
209 * FindResource32W (KERNEL32.131)
211 HRSRC32 WINAPI FindResource32W(HINSTANCE32 hModule, LPCWSTR name, LPCWSTR type)
213 return FindResourceEx32W(hModule,type,name,WINE_LanguageId);
216 /**********************************************************************
217 * LoadResource16 (KERNEL.61)
219 HGLOBAL16 WINAPI LoadResource16( HMODULE16 hModule, HRSRC16 hRsrc )
221 NE_MODULE *pModule = NE_GetPtr( hModule );
222 if ( !pModule ) return 0;
224 if ( pModule->module32 )
226 HANDLE32 hRsrc32 = MapHRsrc16To32( pModule, hRsrc );
227 WORD type = MapHRsrc16ToType( pModule, hRsrc );
228 HGLOBAL32 image = LoadResource32( pModule->module32, hRsrc32 );
229 DWORD size = SizeofResource32( pModule->module32, hRsrc32 );
230 LPVOID bits = LockResource32( image );
232 return NE_LoadPEResource( pModule, type, bits, size );
235 return NE_LoadResource( pModule, hRsrc );
238 /**********************************************************************
239 * LoadResource32 (KERNEL32.370)
240 * 'loads' a resource. The current implementation just returns a pointer
241 * into the already mapped image.
243 * pointer into the mapped resource of the passed module
245 HGLOBAL32 WINAPI LoadResource32(
246 HINSTANCE32 hModule, /* [in] module handle */
247 HRSRC32 hRsrc ) /* [in] resource handle */
249 WINE_MODREF *wm = MODULE32_LookupHMODULE(PROCESS_Current(),hModule);
251 TRACE(resource, "module=%04x res=%04x\n",
254 ERR(resource,"hRsrc is 0, return 0.\n");
262 return PE_LoadResource32(wm,hRsrc);
265 return LIBRES_LoadResource( hModule, hRsrc );
268 ERR(resource,"unknown module type %d\n",wm->type);
274 /**********************************************************************
275 * LockResource16 (KERNEL.62)
277 SEGPTR WINAPI WIN16_LockResource16( HGLOBAL16 handle )
279 TRACE( resource, "handle=%04x\n", handle );
280 if (!handle) return (SEGPTR)0;
282 /* May need to reload the resource if discarded */
283 return (SEGPTR)WIN16_GlobalLock16( handle );
285 LPVOID WINAPI LockResource16( HGLOBAL16 handle )
287 return (LPVOID)PTR_SEG_TO_LIN( WIN16_LockResource16( handle ) );
290 /**********************************************************************
291 * LockResource32 (KERNEL32.384)
293 LPVOID WINAPI LockResource32( HGLOBAL32 handle )
295 return (LPVOID)handle;
299 /**********************************************************************
300 * FreeResource16 (KERNEL.63)
302 BOOL16 WINAPI FreeResource16( HGLOBAL16 handle )
304 NE_MODULE *pModule = NE_GetPtr( FarGetOwner(handle) );
305 if ( !pModule ) return handle;
307 if ( pModule->module32 )
308 return NE_FreePEResource( pModule, handle );
310 return NE_FreeResource( pModule, handle );
313 /**********************************************************************
314 * FreeResource32 (KERNEL32.145)
316 BOOL32 WINAPI FreeResource32( HGLOBAL32 handle )
318 /* no longer used in Win32 */
322 /**********************************************************************
323 * AccessResource16 (KERNEL.64)
325 INT16 WINAPI AccessResource16( HINSTANCE16 hModule, HRSRC16 hRsrc )
327 NE_MODULE *pModule = NE_GetPtr( hModule );
328 if ( !pModule ) return 0;
330 if ( pModule->module32 )
332 HANDLE32 hRsrc32 = MapHRsrc16To32( pModule, hRsrc );
333 HFILE32 hFile32 = AccessResource32( pModule->module32, hRsrc32 );
334 return FILE_AllocDosHandle( hFile32 );
337 return NE_AccessResource( pModule, hRsrc );
340 /**********************************************************************
341 * AccessResource32 (KERNEL32.64)
343 INT32 WINAPI AccessResource32( HMODULE32 hModule, HRSRC32 hRsrc )
345 FIXME(resource,"(module=%08x res=%08x),not implemented\n", hModule, hRsrc);
350 /**********************************************************************
351 * SizeofResource16 (KERNEL.65)
353 DWORD WINAPI SizeofResource16( HMODULE16 hModule, HRSRC16 hRsrc )
355 NE_MODULE *pModule = NE_GetPtr( hModule );
356 if ( !pModule ) return 0;
358 if ( pModule->module32 )
360 HANDLE32 hRsrc32 = MapHRsrc16To32( pModule, hRsrc );
361 return SizeofResource32( hModule, hRsrc32 );
364 return NE_SizeofResource( pModule, hRsrc );
367 /**********************************************************************
368 * SizeofResource32 (KERNEL32.522)
370 DWORD WINAPI SizeofResource32( HINSTANCE32 hModule, HRSRC32 hRsrc )
372 WINE_MODREF *wm = MODULE32_LookupHMODULE(PROCESS_Current(),hModule);
374 TRACE(resource, "module=%08x res=%08x\n", hModule, hRsrc );
380 return PE_SizeofResource32(hModule,hRsrc);
383 return LIBRES_SizeofResource( hModule, hRsrc );
386 ERR(module,"unknown module type %d\n",wm->type);
393 /**********************************************************************
394 * LoadAccelerators16 [USER.177]
396 HACCEL16 WINAPI LoadAccelerators16(HINSTANCE16 instance, SEGPTR lpTableName)
400 if (HIWORD(lpTableName))
401 TRACE(accel, "%04x '%s'\n",
402 instance, (char *)PTR_SEG_TO_LIN( lpTableName ) );
404 TRACE(accel, "%04x %04x\n",
405 instance, LOWORD(lpTableName) );
407 if (!(hRsrc = FindResource16( instance, lpTableName, RT_ACCELERATOR16 ))) {
408 WARN(accel, "couldn't find accelerator table resource\n");
412 TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
413 return LoadResource16(instance,hRsrc);
416 /**********************************************************************
417 * LoadAccelerators32W [USER.177]
418 * The image layout seems to look like this (not 100% sure):
419 * 00: BYTE type type of accelerator
420 * 01: BYTE pad (to WORD boundary)
423 * 06: WORD pad (to DWORD boundary)
425 HACCEL32 WINAPI LoadAccelerators32W(HINSTANCE32 instance,LPCWSTR lpTableName)
428 HACCEL32 hMem,hRetval=0;
431 if (HIWORD(lpTableName))
432 TRACE(accel, "%p '%s'\n",
433 (LPVOID)instance, (char *)( lpTableName ) );
435 TRACE(accel, "%p 0x%04x\n",
436 (LPVOID)instance, LOWORD(lpTableName) );
438 if (!(hRsrc = FindResource32W( instance, lpTableName, RT_ACCELERATOR32W )))
440 WARN(accel, "couldn't find accelerator table resource\n");
442 hMem = LoadResource32( instance, hRsrc );
443 size = SizeofResource32( instance, hRsrc );
444 if(size>=sizeof(PE_ACCEL))
446 LPPE_ACCEL accel_table = (LPPE_ACCEL) hMem;
448 int i,nrofaccells = size/sizeof(PE_ACCEL);
450 hRetval = GlobalAlloc16(0,sizeof(ACCEL16)*nrofaccells);
451 accel16 = (LPACCEL16)GlobalLock16(hRetval);
452 for (i=0;i<nrofaccells;i++) {
453 accel16[i].fVirt = accel_table[i].fVirt;
454 accel16[i].key = accel_table[i].key;
455 accel16[i].cmd = accel_table[i].cmd;
457 accel16[i-1].fVirt |= 0x80;
460 TRACE(accel, "returning HACCEL 0x%x\n", hRsrc);
464 HACCEL32 WINAPI LoadAccelerators32A(HINSTANCE32 instance,LPCSTR lpTableName)
468 if (HIWORD(lpTableName))
469 uni = HEAP_strdupAtoW( GetProcessHeap(), 0, lpTableName );
471 uni = (LPWSTR)lpTableName;
472 result = LoadAccelerators32W(instance,uni);
473 if (HIWORD(uni)) HeapFree( GetProcessHeap(), 0, uni);
477 /**********************************************************************
478 * CopyAcceleratorTable32A (USER32.58)
480 INT32 WINAPI CopyAcceleratorTable32A(HACCEL32 src, LPACCEL32 dst, INT32 entries)
482 return CopyAcceleratorTable32W(src, dst, entries);
485 /**********************************************************************
486 * CopyAcceleratorTable32W (USER32.59)
488 * By mortene@pvv.org 980321
490 INT32 WINAPI CopyAcceleratorTable32W(HACCEL32 src, LPACCEL32 dst,
494 LPACCEL16 accel = (LPACCEL16)GlobalLock16(src);
497 /* Do parameter checking to avoid the explosions and the screaming
498 as far as possible. */
499 if((dst && (entries < 1)) || (src == (HACCEL32)NULL) || !accel) {
500 WARN(accel, "Application sent invalid parameters (%p %p %d).\n",
501 (LPVOID)src, (LPVOID)dst, entries);
504 xsize = GlobalSize16(src)/sizeof(ACCEL16);
505 if (xsize>entries) entries=xsize;
509 /* Spit out some debugging information. */
510 TRACE(accel, "accel %d: type 0x%02x, event '%c', IDval 0x%04x.\n",
511 i, accel[i].fVirt, accel[i].key, accel[i].cmd);
513 /* Copy data to the destination structure array (if dst == NULL,
514 we're just supposed to count the number of entries). */
516 dst[i].fVirt = accel[i].fVirt;
517 dst[i].key = accel[i].key;
518 dst[i].cmd = accel[i].cmd;
520 /* Check if we've reached the end of the application supplied
521 accelerator table. */
523 /* Turn off the high order bit, just in case. */
524 dst[i].fVirt &= 0x7f;
529 /* The highest order bit seems to mark the end of the accelerator
530 resource table, but not always. Use GlobalSize() check too. */
531 if((accel[i].fVirt & 0x80) != 0) done = TRUE;
539 /*********************************************************************
540 * CreateAcceleratorTable (USER32.64)
542 * By mortene@pvv.org 980321
544 HACCEL32 WINAPI CreateAcceleratorTable32A(LPACCEL32 lpaccel, INT32 cEntries)
550 /* Do parameter checking just in case someone's trying to be
553 WARN(accel, "Application sent invalid parameters (%p %d).\n",
555 SetLastError(ERROR_INVALID_PARAMETER);
556 return (HACCEL32)NULL;
558 FIXME(accel, "should check that the accelerator descriptions are valid,"
559 " return NULL and SetLastError() if not.\n");
562 /* Allocate memory and copy the table. */
563 hAccel = GlobalAlloc16(0,cEntries*sizeof(ACCEL16));
565 TRACE(accel, "handle %x\n", hAccel);
567 ERR(accel, "Out of memory.\n");
568 SetLastError(ERROR_NOT_ENOUGH_MEMORY);
569 return (HACCEL32)NULL;
571 accel = GlobalLock16(hAccel);
572 for (i=0;i<cEntries;i++) {
573 accel[i].fVirt = lpaccel[i].fVirt;
574 accel[i].key = lpaccel[i].key;
575 accel[i].cmd = lpaccel[i].cmd;
577 /* Set the end-of-table terminator. */
578 accel[cEntries-1].fVirt |= 0x80;
580 TRACE(accel, "Allocated accelerator handle %x\n", hAccel);
585 /******************************************************************************
586 * DestroyAcceleratorTable [USER32.130]
587 * Destroys an accelerator table
590 * By mortene@pvv.org 980321
593 * handle [I] Handle to accelerator table
597 BOOL32 WINAPI DestroyAcceleratorTable( HACCEL32 handle )
599 FIXME(accel, "(0x%x): stub\n", handle);
600 /* FIXME: GlobalFree16(handle); */
604 /**********************************************************************
607 INT16 WINAPI LoadString16( HINSTANCE16 instance, UINT16 resource_id,
608 LPSTR buffer, INT16 buflen )
616 TRACE(resource,"inst=%04x id=%04x buff=%08x len=%d\n",
617 instance, resource_id, (int) buffer, buflen);
619 hrsrc = FindResource16( instance, (SEGPTR)((resource_id>>4)+1), RT_STRING16 );
620 if (!hrsrc) return 0;
621 hmem = LoadResource16( instance, hrsrc );
624 p = LockResource16(hmem);
625 string_num = resource_id & 0x000f;
626 for (i = 0; i < string_num; i++)
629 TRACE(resource, "strlen = %d\n", (int)*p );
631 i = MIN(buflen - 1, *p);
635 memcpy(buffer, p + 1, i);
642 WARN(resource,"Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
644 FreeResource16( hmem );
646 TRACE(resource,"'%s' loaded !\n", buffer);
650 /**********************************************************************
651 * LoadString32W (USER32.376)
653 INT32 WINAPI LoadString32W( HINSTANCE32 instance, UINT32 resource_id,
654 LPWSTR buffer, INT32 buflen )
662 if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
663 resource_id = (UINT32)(-((INT32)resource_id));
664 TRACE(resource, "instance = %04x, id = %04x, buffer = %08x, "
665 "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
667 hrsrc = FindResource32W( instance, (LPCWSTR)((resource_id>>4)+1),
669 if (!hrsrc) return 0;
670 hmem = LoadResource32( instance, hrsrc );
673 p = LockResource32(hmem);
674 string_num = resource_id & 0x000f;
675 for (i = 0; i < string_num; i++)
678 TRACE(resource, "strlen = %d\n", (int)*p );
680 i = MIN(buflen - 1, *p);
684 memcpy(buffer, p + 1, i * sizeof (WCHAR));
685 buffer[i] = (WCHAR) 0;
688 buffer[0] = (WCHAR) 0;
692 WARN(resource,"Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
696 TRACE(resource,"%s loaded !\n", debugstr_w(buffer));
700 /**********************************************************************
701 * LoadString32A (USER32.375)
703 INT32 WINAPI LoadString32A( HINSTANCE32 instance, UINT32 resource_id,
704 LPSTR buffer, INT32 buflen )
707 LPWSTR buffer2 = NULL;
708 if (buffer && buflen)
709 buffer2 = HeapAlloc( GetProcessHeap(), 0, buflen * 2 );
710 retval = LoadString32W(instance,resource_id,buffer2,buflen);
715 lstrcpynWtoA( buffer, buffer2, buflen );
716 retval = lstrlen32A( buffer );
720 HeapFree( GetProcessHeap(), 0, buffer2 );
725 /* Messages...used by FormatMessage32* (KERNEL32.something)
727 * They can be specified either directly or using a message ID and
728 * loading them from the resource.
730 * The resourcedata has following format:
732 * 0: DWORD nrofentries
733 * nrofentries * subentry:
734 * 0: DWORD firstentry
736 * 8: DWORD offset from start to the stringentries
738 * (lastentry-firstentry) * stringentry:
739 * 0: WORD len (0 marks end)
740 * 2: WORD unknown (flags?)
742 * (stringentry i of a subentry refers to the ID 'firstentry+i')
744 * Yes, ANSI strings in win32 resources. Go figure.
747 /**********************************************************************
748 * LoadMessage32A (internal)
750 INT32 WINAPI LoadMessage32A( HMODULE32 instance, UINT32 id, WORD lang,
751 LPSTR buffer, INT32 buflen )
756 int nrofentries,i,slen;
762 struct _stringentry {
768 TRACE(resource, "instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen);
770 /*FIXME: I am not sure about the '1' ... But I've only seen those entries*/
771 hrsrc = FindResourceEx32W(instance,RT_MESSAGELIST32W,(LPWSTR)1,lang);
772 if (!hrsrc) return 0;
773 hmem = LoadResource32( instance, hrsrc );
776 p = LockResource32(hmem);
777 nrofentries = *(DWORD*)p;
779 se = (struct _subentry*)(p+4);
780 for (i=nrofentries;i--;) {
781 if ((id>=se->firstentry) && (id<=se->lastentry)) {
782 stre = (struct _stringentry*)(p+se->offset);
783 id -= se->firstentry;
791 if (!(slen=stre->len))
793 stre = (struct _stringentry*)(((char*)stre)+slen);
796 TRACE(resource," - strlen=%d\n",slen);
797 i = MIN(buflen - 1, slen);
799 return slen; /* different to LoadString */
801 lstrcpyn32A(buffer,stre->str,i);
810 TRACE(resource,"'%s' copied !\n", buffer);
814 /**********************************************************************
815 * LoadMessage32W (internal)
817 INT32 WINAPI LoadMessage32W( HMODULE32 instance, UINT32 id, WORD lang,
818 LPWSTR buffer, INT32 buflen )
821 LPSTR buffer2 = NULL;
822 if (buffer && buflen)
823 buffer2 = HeapAlloc( GetProcessHeap(), 0, buflen );
824 retval = LoadMessage32A(instance,id,lang,buffer2,buflen);
828 lstrcpynAtoW( buffer, buffer2, buflen );
829 retval = lstrlen32W( buffer );
831 HeapFree( GetProcessHeap(), 0, buffer2 );
837 /**********************************************************************
838 * EnumResourceTypesA (KERNEL32.90)
840 BOOL32 WINAPI EnumResourceTypes32A( HMODULE32 hmodule,ENUMRESTYPEPROC32A lpfun,
843 /* FIXME: move WINE_MODREF stuff here */
844 return PE_EnumResourceTypes32A(hmodule,lpfun,lParam);
847 /**********************************************************************
848 * EnumResourceTypesW (KERNEL32.91)
850 BOOL32 WINAPI EnumResourceTypes32W( HMODULE32 hmodule,ENUMRESTYPEPROC32W lpfun,
853 /* FIXME: move WINE_MODREF stuff here */
854 return PE_EnumResourceTypes32W(hmodule,lpfun,lParam);
857 /**********************************************************************
858 * EnumResourceNamesA (KERNEL32.88)
860 BOOL32 WINAPI EnumResourceNames32A( HMODULE32 hmodule, LPCSTR type,
861 ENUMRESNAMEPROC32A lpfun, LONG lParam )
863 /* FIXME: move WINE_MODREF stuff here */
864 return PE_EnumResourceNames32A(hmodule,type,lpfun,lParam);
866 /**********************************************************************
867 * EnumResourceNamesW (KERNEL32.89)
869 BOOL32 WINAPI EnumResourceNames32W( HMODULE32 hmodule, LPCWSTR type,
870 ENUMRESNAMEPROC32W lpfun, LONG lParam )
872 /* FIXME: move WINE_MODREF stuff here */
873 return PE_EnumResourceNames32W(hmodule,type,lpfun,lParam);
876 /**********************************************************************
877 * EnumResourceLanguagesA (KERNEL32.86)
879 BOOL32 WINAPI EnumResourceLanguages32A( HMODULE32 hmodule, LPCSTR type,
880 LPCSTR name, ENUMRESLANGPROC32A lpfun,
883 /* FIXME: move WINE_MODREF stuff here */
884 return PE_EnumResourceLanguages32A(hmodule,type,name,lpfun,lParam);
886 /**********************************************************************
887 * EnumResourceLanguagesW (KERNEL32.87)
889 BOOL32 WINAPI EnumResourceLanguages32W( HMODULE32 hmodule, LPCWSTR type,
890 LPCWSTR name, ENUMRESLANGPROC32W lpfun,
893 /* FIXME: move WINE_MODREF stuff here */
894 return PE_EnumResourceLanguages32W(hmodule,type,name,lpfun,lParam);