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
4e959365
Commit
4e959365
authored
Jun 09, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Drop outdated comment about COM interface implementations.
parent
f1cd2139
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
42 deletions
+1
-42
objbase.h
include/objbase.h
+1
-42
No files found.
include/objbase.h
View file @
4e959365
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
* virtual methods in C++ and a structure with a table of pointer to functions in C.
* virtual methods in C++ and a structure with a table of pointer to functions in C.
* Unfortunately the layout of the virtual table is compiler specific, the layout of
* Unfortunately the layout of the virtual table is compiler specific, the layout of
* g++ virtual tables is not the same as that of an egcs virtual table which is not the
* g++ virtual tables is not the same as that of an egcs virtual table which is not the
* same as that generated by Visual C+. There are workarounds to make the virtual tables
* same as that generated by Visual C+
+
. There are workarounds to make the virtual tables
* compatible via padding but unfortunately the one which is imposed to the WINE emulator
* compatible via padding but unfortunately the one which is imposed to the WINE emulator
* by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
* by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
*
*
...
@@ -168,47 +168,6 @@
...
@@ -168,47 +168,6 @@
* - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
* - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
* - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
* - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
* macro is defined in which case we would not be here.
* macro is defined in which case we would not be here.
*
*
* Implementing a COM interface.
*
* This continues the above example. This example assumes that the implementation is in C.
*
* typedef struct IDirect3DImpl {
* void* lpVtbl;
* // ...
*
* } IDirect3DImpl;
*
* static IDirect3DVtbl d3dvt;
*
* // implement the IDirect3D methods here
*
* int IDirect3D_QueryInterface(IDirect3D* me)
* {
* IDirect3DImpl *This = (IDirect3DImpl *)me;
* // ...
* }
*
* // ...
*
* static IDirect3DVtbl d3dvt = {
* IDirect3D_QueryInterface,
* IDirect3D_Add,
* IDirect3D_Add2,
* IDirect3D_Initialize,
* IDirect3D_SetWidth
* };
*
* Comments:
* - We first define what the interface really contains. This is the IDirect3DImpl structure. The
* first field must of course be the virtual table pointer. Everything else is free.
* - Then we predeclare our static virtual table variable, we will need its address in some
* methods to initialize the virtual table pointer of the returned interface objects.
* - Then we implement the interface methods. To match what has been declared in the header file
* they must take a pointer to an IDirect3D structure and we must cast it to an IDirect3DImpl so
* that we can manipulate the fields.
* - Finally we initialize the virtual table.
*/
*/
#if defined(__cplusplus) && !defined(CINTERFACE)
#if defined(__cplusplus) && !defined(CINTERFACE)
...
...
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