Author: akhaldi
Date: Mon Dec 2 10:56:38 2013
New Revision: 61195
URL:
http://svn.reactos.org/svn/reactos?rev=61195&view=rev
Log:
[PSDK]
* Fix IMAGE_RESOURCE_DIRECTORY_ENTRY structure.
[KERNEL32][VERSION]
* Correct the use of IMAGE_RESOURCE_DIRECTORY_ENTRY.
CORE-7667 #resolve
Modified:
trunk/reactos/dll/win32/kernel32/wine/res.c
trunk/reactos/dll/win32/version/resource.c
trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/dll/win32/kernel32/wine/res.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/wine/re…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/wine/res.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/wine/res.c [iso-8859-1] Mon Dec 2 10:56:38 2013
@@ -983,7 +983,7 @@
Type = resource_dup_string( root, e1 );
- namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
e1->u2.s3.OffsetToDirectory);
+ namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
e1->u2.s2.OffsetToDirectory);
for (j = 0; j < namedir->NumberOfNamedEntries +
namedir->NumberOfIdEntries; j++)
{
LPWSTR Name;
@@ -992,7 +992,7 @@
Name = resource_dup_string( root, e2 );
- langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
e2->u2.s3.OffsetToDirectory);
+ langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
e2->u2.s2.OffsetToDirectory);
for (k = 0; k < langdir->NumberOfNamedEntries +
langdir->NumberOfIdEntries; k++)
{
LANGID Lang;
@@ -1252,8 +1252,8 @@
root->NumberOfIdEntries++;
e1->u1.Id = LOWORD( types->id );
}
- e1->u2.s3.OffsetToDirectory = si->names_ofs;
- e1->u2.s3.DataIsDirectory = TRUE;
+ e1->u2.s2.OffsetToDirectory = si->names_ofs;
+ e1->u2.s2.DataIsDirectory = TRUE;
si->types_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY);
namedir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->names_ofs];
@@ -1288,8 +1288,8 @@
namedir->NumberOfIdEntries++;
e2->u1.Id = LOWORD( names->id );
}
- e2->u2.s3.OffsetToDirectory = si->langs_ofs;
- e2->u2.s3.DataIsDirectory = TRUE;
+ e2->u2.s2.OffsetToDirectory = si->langs_ofs;
+ e2->u2.s2.DataIsDirectory = TRUE;
si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY);
langdir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->langs_ofs];
Modified: trunk/reactos/dll/win32/version/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/resource…
==============================================================================
--- trunk/reactos/dll/win32/version/resource.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/version/resource.c [iso-8859-1] Mon Dec 2 10:56:38 2013
@@ -84,7 +84,7 @@
{
pos = (min + max) / 2;
if (entry[pos].u1.Id == id)
- return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
entry[pos].u2.s3.OffsetToDirectory);
+ return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
entry[pos].u2.s2.OffsetToDirectory);
if (entry[pos].u1.Id > id) max = pos - 1;
else min = pos + 1;
}
@@ -104,7 +104,7 @@
const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry;
entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
- return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
entry->u2.s3.OffsetToDirectory);
+ return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root +
entry->u2.s2.OffsetToDirectory);
}
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=6…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Mon Dec 2 10:56:38 2013
@@ -4661,7 +4661,7 @@
_ANONYMOUS_STRUCT struct {
DWORD OffsetToDirectory:31;
DWORD DataIsDirectory:1;
- } DUMMYSTRUCTNAME3;
+ } DUMMYSTRUCTNAME2;
} DUMMYUNIONNAME2;
} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;