Archived

This topic is now archived and is closed to further replies.

z_yang

interface pointers

Recommended Posts

i really dont get the interface pointers; they decleared as normal(non pointer) objects, right; but some time they are accessed as pointers, like when you use it to call a method, you need to write something like this: lpdd->something; can anyone throw me a pointer what''s going on here, thanx

Share this post


Link to post
Share on other sites
If you really want to understand the nitty gritty of what''s going on, pick up a book on COM. Some are better than others, but most will get the general point across and it would probably be helpful if you ever use other MS technologies.

If you want to skip all that and just live with the fact that the entities you actually deal with are indeed pointers, then you probably will be able to get by just fine.

Share this post


Link to post
Share on other sites
Well I think you are probably misinterpreting what you are writing. Most of the samples for D3D use typedefed pointers. So when you write something like this:

LPDIRECTDRAW lpdd;

LPDIRECTDRAW is defined as:
typedef struct IDirectDraw FAR *LPDIRECTDRAW;

So it is equivalent to:

IDirectDraw FAR *lpdd;

And is really a pointer. Normally any type declaration that begins with LP will be a typedefed pointer. Atleast when dealing with Microsoft

Seeya
Krippy

Share this post


Link to post
Share on other sites