DX Symphony in C minor
Not to start a flame war, but how well does C handle DX com calls vs. C++? I''m wondering if there would be any extra overhead calling lpdd->vtable->function as opposed to lpdd->function in C++. Anyone tested this or know of any tests?
I''m terribly weak in theory and fundamentals (self-taught programmer) so I really don''t know what goes on underneath it all.
--- Official D Blog | Learning D | The One With D | D Bits
It''s exactly the same. The vtable thing is not COM specific, that''s just how C++ handles polymorphism (the ability to call the member functions for one of several classes through a standard interface). So the efficiency will be unchanged, it just means the code is a little uglier (in my opinion).
I think I remember reading somewhere if you were using C, you called a function like
lpdds->Blt(param,param,lpdds);
Were you included the object as the last parameter in the funciton.
-------------------------
-Now Working on Pokemon like Engine!
lpdds->Blt(param,param,lpdds);
Were you included the object as the last parameter in the funciton.
-------------------------
-Now Working on Pokemon like Engine!
-------------------------
-Now Working on Pokemon like Engine!
-Now Working on Pokemon like Engine!
To access DX under C, you''d need to call your functions like this
lpdds->lpVtbl->Function(lpdds, param, param);
The object is the first argument of the function. I know. I use lcc-win32.
========================================================
If something sounds stupid but works, it's not stupid
lpdds->lpVtbl->Function(lpdds, param, param);
The object is the first argument of the function. I know. I use lcc-win32.
========================================================
If something sounds stupid but works, it's not stupid
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
I think Marauderz was refering to the macros used to call the functions.
So it would be:
Hope it helps .
Damm keyboard!
Edited by - octavsoft on May 21, 2000 12:21:08 PM
So it would be:
Interface_Function(object,parameters)
Hope it helps .
Damm keyboard!
Edited by - octavsoft on May 21, 2000 12:21:08 PM
OctavianE-mail: [email=octav@octavsoft.com]octav@octavsoft.com[/email]Webpage: http://www.octavsoft.com
octavsoft,
people actually use those macros? I always kinda preferred the COM way of accessing things, so I never really bothered about those macros.
========================================================
If something sounds stupid but works, it's not stupid
people actually use those macros? I always kinda preferred the COM way of accessing things, so I never really bothered about those macros.
========================================================
If something sounds stupid but works, it's not stupid
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement