Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b2888e1e
Commit
b2888e1e
authored
Jul 16, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jul 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Add the CorTokenType and use those constants in the assembly code.
parent
8f985a33
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
2 deletions
+64
-2
assembly.c
dlls/fusion/assembly.c
+5
-2
Makefile.in
include/Makefile.in
+1
-0
corhdr.h
include/corhdr.h
+58
-0
No files found.
dlls/fusion/assembly.c
View file @
b2888e1e
...
...
@@ -29,11 +29,14 @@
#include "dbghelp.h"
#include "ole2.h"
#include "fusion.h"
#include "corhdr.h"
#include "fusionpriv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#define TableFromToken(tk) (TypeFromToken(tk) >> 24)
#define MAX_CLR_TABLES 64
typedef
struct
tagCLRTABLE
...
...
@@ -458,7 +461,7 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPSTR *name)
ASSEMBLYTABLE
*
asmtbl
;
ULONG
offset
;
offset
=
assembly
->
tables
[
0x20
].
offset
;
/* FIXME: add constants */
offset
=
assembly
->
tables
[
TableFromToken
(
mdtAssembly
)].
offset
;
if
(
offset
==
-
1
)
return
E_FAIL
;
...
...
@@ -572,7 +575,7 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPSTR *token)
*
token
=
NULL
;
offset
=
assembly
->
tables
[
0x20
].
offset
;
/* FIXME: add constants */
offset
=
assembly
->
tables
[
TableFromToken
(
mdtAssembly
)].
offset
;
if
(
offset
==
-
1
)
return
E_FAIL
;
...
...
include/Makefile.in
View file @
b2888e1e
...
...
@@ -106,6 +106,7 @@ SRCDIR_INCLUDES = \
compobj.h
\
cor.h
\
corerror.h
\
corhdr.h
\
cpl.h
\
cryptdlg.h
\
cryptuiapi.h
\
...
...
include/corhdr.h
0 → 100644
View file @
b2888e1e
/*
* Copyright 2008 James Hawkins
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_CORHDR_H
#define __WINE_CORHDR_H
typedef
enum
CorTokenType
{
mdtModule
=
0x00000000
,
mdtTypeRef
=
0x01000000
,
mdtTypeDef
=
0x02000000
,
mdtFieldDef
=
0x04000000
,
mdtMethodDef
=
0x06000000
,
mdtParamDef
=
0x08000000
,
mdtInterfaceImpl
=
0x09000000
,
mdtMemberRef
=
0x0a000000
,
mdtCustomAttribute
=
0x0c000000
,
mdtPermission
=
0x0e000000
,
mdtSignature
=
0x11000000
,
mdtEvent
=
0x14000000
,
mdtProperty
=
0x17000000
,
mdtModuleRef
=
0x1a000000
,
mdtTypeSpec
=
0x1b000000
,
mdtAssembly
=
0x20000000
,
mdtAssemblyRef
=
0x23000000
,
mdtFile
=
0x26000000
,
mdtExportedType
=
0x27000000
,
mdtManifestResource
=
0x28000000
,
mdtGenericParam
=
0x2a000000
,
mdtMethodSpec
=
0x2b000000
,
mdtGenericParamConstraint
=
0x2c000000
,
mdtString
=
0x70000000
,
mdtName
=
0x71000000
,
mdtBaseType
=
0x72000000
,
}
CorTokenType
;
#define RidToToken(rid,tktype) ((rid) |= (tktype))
#define TokenFromRid(rid,tktype) ((rid) | (tktype))
#define RidFromToken(tk) ((RID)((tk) & 0x00ffffff))
#define TypeFromToken(tk) ((ULONG32)((tk) & 0xff000000))
#define IsNilToken(tk) ((RidFromToken(tk)) == 0)
#endif
/* __WINE_CORHDR_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment