1. Brute Force Method Might Wrap DX Into Euphoria Library?

Since it has being long since I touched any DX code,
with the Rebirth 3D Engine I stumbled onto something.
There might be a brute-force way of getting rid of the
need for an extra DLL when using DX in Euphoria...

This is how I imagined it;

If you have the following code in C:
d3drm->lpVtbl->CreateDeviceFromClipper(d3drm, lpclip,
NULL, 640, 480, &lpdev)

Wouldn't it be possible to get the address of d3drm,
and peek the value of CreateDeviceFromClipper from the
result of the subtraction of the address of d3drm and
the address of lpVtbl, added to the address of d3drm?
This is what above could could look like in Eu;

atom CreateDeviceFromClipper

CreateDeviceFromClipper = 
peek4(d3drm_address+(lpvtbl_address-d3drm_address))

call( CreateDeviceFromClipper )

Would this work?
I think it would if all addresses remained constant
accross threads, wich is what COM is all about
anyways...

Correct me if I'm wrong on this one...

If I'm not, then expect Rebirth to go Euphoria!

Mike The Spike

new topic     » topic index » view message » categorize

2. Re: Brute Force Method Might Wrap DX Into Euphoria Library?

>peek4(d3drm_address+(lpvtbl_address-d3drm_address))
>

err..  a+(b-a)  usually equals b..

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu