Author: jimtabor
Date: Sun Aug 19 12:16:01 2007
New Revision: 28417
URL:
http://svn.reactos.org/svn/reactos?rev=28417&view=rev
Log:
Implemented a handfull of easy Eng APIs. Just leave them in stubs for now.
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubs.c
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Sun Aug 19 12:16:01 2007
@@ -2766,11 +2766,26 @@
* @unimplemented
*/
PVOID STDCALL
-EngFindResource(HANDLE h,int iName,int iType,PULONG pulSize)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+EngFindResource(HANDLE h,
+ int iName,
+ int iType,
+ PULONG pulSize)
+{
+ HRSRC HRSrc;
+ DWORD Size;
+ HGLOBAL Hg;
+ LPVOID Lock;
+
+ if (!(HRSrc = FindResourceW( (HMODULE) h,
+ MAKEINTRESOURCEW(iName),
+ MAKEINTRESOURCEW(iType)
+ )))
+ return NULL;
+ if (!(Size = SizeofResource( (HMODULE) h, HRSrc ))) return NULL;
+ if (!(Hg = LoadResource( (HMODULE) h, HRSrc ))) return NULL;
+ Lock = LockResource( Hg );
+ pulSize = (PULONG) Size;
+ return (PVOID) Lock;
}
/*
@@ -2779,8 +2794,7 @@
VOID STDCALL
EngFreeModule(HANDLE h)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ LdrUnloadDll(h);
}
/*
@@ -2790,8 +2804,8 @@
EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
OUT PUSHORT AnsiCodePage)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ OemCodePage = (PUSHORT) GetOEMCP();
+ AnsiCodePage = (PUSHORT) GetACP();
}
/*
@@ -2852,9 +2866,7 @@
HANDLE STDCALL
EngLoadModule(LPWSTR pwsz)
{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ return LoadLibraryExW ( pwsz, NULL, LOAD_LIBRARY_AS_DATAFILE);
}