Original Post
Is it possible to create a reference to a DirectX object? (or any COM object for that matter...)
This appears to work...
Yes it works!
Object.Method();
is faster than
pObject->Method();
right?
I'm not missing something that makes them same, am I?
If there's a single other person out there who does not think I am delusional, I'd be happy to hammer out some object designs that take advantage of this...
Edited by - Magmai Kai Holmlor on 6/26/00 10:08:32 PM
class CFrame
{
public:
CFrame(hInstance newInst, int newShowCmd, IDirectDraw7* lpDD7): DD7(*lpDD7)
{
//WinAPI stuff..
}
private:
IDirectDraw7& DD7;
};
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
IDirectDraw7* lpDD7;
HRESULT hr;
hr = DirectDrawCreateEx(NULL, (VOID**)&lpDD7, IID_IDirectDraw7, NULL);
CFrame* Capsule;
Capsule = new CFrame(hInstance, nShowCmn, lpDD7);
}
|