By CoCreateObject(), did you mean CoCreateInstance()? I couldn't find CoCreateObject in the documentation or MSDN.

CoCreateInstance(&CLSID_CDirect3DRMTexture, NULL, CLSCTX_INPROC_SERVER, &IID_IDirect3DRMTexture3, &texture3) returns REGDB_E_CLASSNOTREG. Am I missing something?

On Sat, Mar 26, 2016 at 4:38 PM, Henri Verbeet <hverbeet@gmail.com> wrote:
On 26 March 2016 at 10:19, Aaryaman Vasishta <jem456.vasishta@gmail.com> wrote:
> What can probably be done is, making InitFromFile call d3drm_create_image,
> checking if D3DRMIMAGE struct isn't set already, and LoadTexture will call
> InitFromFIle (on a fresh new object every time LoadTexture is called),
> whereas CreateTexture will merely HeapAlloc the object and assign the image
> supplied by the application.
>
CreateTexture() should probably call InitFromImage(), or some
equivalent, although it's odd that that only exists since
IDirect3DRMTexture2. It would also be interesting to know if
CoCreateObject() works, mainly because you can't pass the IDirect3DRM
interface to the texture in that case.