1 /*==========================================================================;
3 * Copyright (c) Microsoft Corporation. All rights reserved.
6 * Content: Direct3DRM include file
8 ***************************************************************************/
19 typedef struct IDirect3DRM
*LPDIRECT3DRM
;
28 DEFINE_GUID(IID_IDirect3DRM
, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
29 DEFINE_GUID(IID_IDirect3DRM2
, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
30 DEFINE_GUID(IID_IDirect3DRM3
, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
31 WIN_TYPES(IDirect3DRM
, DIRECT3DRM
);
32 WIN_TYPES(IDirect3DRM2
, DIRECT3DRM2
);
33 WIN_TYPES(IDirect3DRM3
, DIRECT3DRM3
);
36 * Direct3DRM Object Class (for CoCreateInstance())
38 DEFINE_GUID(CLSID_CDirect3DRM
, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
41 /* Create a Direct3DRM API */
42 STDAPI
Direct3DRMCreate(LPDIRECT3DRM FAR
*lplpDirect3DRM
);
45 #define INTERFACE IDirect3DRM
47 DECLARE_INTERFACE_(IDirect3DRM
, IUnknown
)
49 IUNKNOWN_METHODS(PURE
);
51 STDMETHOD(CreateObject
)
52 (THIS_ REFCLSID rclsid
, LPUNKNOWN pUnkOuter
, REFIID riid
, LPVOID FAR
* ppv
) PURE
;
53 STDMETHOD(CreateFrame
) (THIS_ LPDIRECT3DRMFRAME
, LPDIRECT3DRMFRAME
*) PURE
;
54 STDMETHOD(CreateMesh
) (THIS_ LPDIRECT3DRMMESH
*) PURE
;
55 STDMETHOD(CreateMeshBuilder
)(THIS_ LPDIRECT3DRMMESHBUILDER
*) PURE
;
56 STDMETHOD(CreateFace
) (THIS_ LPDIRECT3DRMFACE
*) PURE
;
57 STDMETHOD(CreateAnimation
) (THIS_ LPDIRECT3DRMANIMATION
*) PURE
;
58 STDMETHOD(CreateAnimationSet
)(THIS_ LPDIRECT3DRMANIMATIONSET
*) PURE
;
59 STDMETHOD(CreateTexture
) (THIS_ LPD3DRMIMAGE
, LPDIRECT3DRMTEXTURE
*) PURE
;
60 STDMETHOD(CreateLight
) (THIS_ D3DRMLIGHTTYPE
, D3DCOLOR
, LPDIRECT3DRMLIGHT
*) PURE
;
61 STDMETHOD(CreateLightRGB
)
62 (THIS_ D3DRMLIGHTTYPE
, D3DVALUE
, D3DVALUE
, D3DVALUE
, LPDIRECT3DRMLIGHT
*) PURE
;
63 STDMETHOD(CreateMaterial
) (THIS_ D3DVALUE
, LPDIRECT3DRMMATERIAL
*) PURE
;
64 STDMETHOD(CreateDevice
) (THIS_ DWORD
, DWORD
, LPDIRECT3DRMDEVICE
*) PURE
;
66 /* Create a Windows Device using DirectDraw surfaces */
67 STDMETHOD(CreateDeviceFromSurface
)
68 ( THIS_ LPGUID lpGUID
, LPDIRECTDRAW lpDD
,
69 LPDIRECTDRAWSURFACE lpDDSBack
, LPDIRECT3DRMDEVICE
*
72 /* Create a Windows Device using D3D objects */
73 STDMETHOD(CreateDeviceFromD3D
)
74 ( THIS_ LPDIRECT3D lpD3D
, LPDIRECT3DDEVICE lpD3DDev
,
78 STDMETHOD(CreateDeviceFromClipper
)
79 ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper
, LPGUID lpGUID
,
80 int width
, int height
, LPDIRECT3DRMDEVICE
*) PURE
;
82 STDMETHOD(CreateTextureFromSurface
)(THIS_ LPDIRECTDRAWSURFACE lpDDS
, LPDIRECT3DRMTEXTURE
*) PURE
;
84 STDMETHOD(CreateShadow
)
85 ( THIS_ LPDIRECT3DRMVISUAL
, LPDIRECT3DRMLIGHT
,
86 D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
,
87 D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
,
90 STDMETHOD(CreateViewport
)
91 ( THIS_ LPDIRECT3DRMDEVICE
, LPDIRECT3DRMFRAME
, DWORD
, DWORD
,
92 DWORD
, DWORD
, LPDIRECT3DRMVIEWPORT
*
95 ( THIS_ D3DRMWRAPTYPE
, LPDIRECT3DRMFRAME
,
96 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
,
97 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
98 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
,
99 D3DVALUE ou
, D3DVALUE ov
,
100 D3DVALUE su
, D3DVALUE sv
,
103 STDMETHOD(CreateUserVisual
) (THIS_ D3DRMUSERVISUALCALLBACK
, LPVOID lPArg
, LPDIRECT3DRMUSERVISUAL
*) PURE
;
104 STDMETHOD(LoadTexture
) (THIS_
const char *, LPDIRECT3DRMTEXTURE
*) PURE
;
105 STDMETHOD(LoadTextureFromResource
) (THIS_ HRSRC rs
, LPDIRECT3DRMTEXTURE
*) PURE
;
107 STDMETHOD(SetSearchPath
) (THIS_ LPCSTR
) PURE
;
108 STDMETHOD(AddSearchPath
) (THIS_ LPCSTR
) PURE
;
109 STDMETHOD(GetSearchPath
) (THIS_ DWORD
*size_return
, LPSTR path_return
) PURE
;
110 STDMETHOD(SetDefaultTextureColors
)(THIS_ DWORD
) PURE
;
111 STDMETHOD(SetDefaultTextureShades
)(THIS_ DWORD
) PURE
;
113 STDMETHOD(GetDevices
) (THIS_ LPDIRECT3DRMDEVICEARRAY
*) PURE
;
114 STDMETHOD(GetNamedObject
) (THIS_
const char *, LPDIRECT3DRMOBJECT
*) PURE
;
116 STDMETHOD(EnumerateObjects
) (THIS_ D3DRMOBJECTCALLBACK
, LPVOID
) PURE
;
119 ( THIS_ LPVOID
, LPVOID
, LPIID
*, DWORD
, D3DRMLOADOPTIONS
,
120 D3DRMLOADCALLBACK
, LPVOID
, D3DRMLOADTEXTURECALLBACK
, LPVOID
,
123 STDMETHOD(Tick
) (THIS_ D3DVALUE
) PURE
;
127 #define INTERFACE IDirect3DRM2
129 DECLARE_INTERFACE_(IDirect3DRM2
, IUnknown
)
131 IUNKNOWN_METHODS(PURE
);
133 STDMETHOD(CreateObject
)
134 (THIS_ REFCLSID rclsid
, LPUNKNOWN pUnkOuter
, REFIID riid
, LPVOID FAR
* ppv
) PURE
;
135 STDMETHOD(CreateFrame
) (THIS_ LPDIRECT3DRMFRAME
, LPDIRECT3DRMFRAME2
*) PURE
;
136 STDMETHOD(CreateMesh
) (THIS_ LPDIRECT3DRMMESH
*) PURE
;
137 STDMETHOD(CreateMeshBuilder
)(THIS_ LPDIRECT3DRMMESHBUILDER2
*) PURE
;
138 STDMETHOD(CreateFace
) (THIS_ LPDIRECT3DRMFACE
*) PURE
;
139 STDMETHOD(CreateAnimation
) (THIS_ LPDIRECT3DRMANIMATION
*) PURE
;
140 STDMETHOD(CreateAnimationSet
)(THIS_ LPDIRECT3DRMANIMATIONSET
*) PURE
;
141 STDMETHOD(CreateTexture
) (THIS_ LPD3DRMIMAGE
, LPDIRECT3DRMTEXTURE2
*) PURE
;
142 STDMETHOD(CreateLight
) (THIS_ D3DRMLIGHTTYPE
, D3DCOLOR
, LPDIRECT3DRMLIGHT
*) PURE
;
143 STDMETHOD(CreateLightRGB
)
144 (THIS_ D3DRMLIGHTTYPE
, D3DVALUE
, D3DVALUE
, D3DVALUE
, LPDIRECT3DRMLIGHT
*) PURE
;
145 STDMETHOD(CreateMaterial
) (THIS_ D3DVALUE
, LPDIRECT3DRMMATERIAL
*) PURE
;
146 STDMETHOD(CreateDevice
) (THIS_ DWORD
, DWORD
, LPDIRECT3DRMDEVICE2
*) PURE
;
148 /* Create a Windows Device using DirectDraw surfaces */
149 STDMETHOD(CreateDeviceFromSurface
)
150 ( THIS_ LPGUID lpGUID
, LPDIRECTDRAW lpDD
,
151 LPDIRECTDRAWSURFACE lpDDSBack
, LPDIRECT3DRMDEVICE2
*
154 /* Create a Windows Device using D3D objects */
155 STDMETHOD(CreateDeviceFromD3D
)
156 ( THIS_ LPDIRECT3D2 lpD3D
, LPDIRECT3DDEVICE2 lpD3DDev
,
157 LPDIRECT3DRMDEVICE2
*
160 STDMETHOD(CreateDeviceFromClipper
)
161 ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper
, LPGUID lpGUID
,
162 int width
, int height
, LPDIRECT3DRMDEVICE2
*) PURE
;
164 STDMETHOD(CreateTextureFromSurface
)(THIS_ LPDIRECTDRAWSURFACE lpDDS
, LPDIRECT3DRMTEXTURE2
*) PURE
;
166 STDMETHOD(CreateShadow
)
167 ( THIS_ LPDIRECT3DRMVISUAL
, LPDIRECT3DRMLIGHT
,
168 D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
,
169 D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
,
172 STDMETHOD(CreateViewport
)
173 ( THIS_ LPDIRECT3DRMDEVICE
, LPDIRECT3DRMFRAME
, DWORD
, DWORD
,
174 DWORD
, DWORD
, LPDIRECT3DRMVIEWPORT
*
176 STDMETHOD(CreateWrap
)
177 ( THIS_ D3DRMWRAPTYPE
, LPDIRECT3DRMFRAME
,
178 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
,
179 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
180 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
,
181 D3DVALUE ou
, D3DVALUE ov
,
182 D3DVALUE su
, D3DVALUE sv
,
185 STDMETHOD(CreateUserVisual
) (THIS_ D3DRMUSERVISUALCALLBACK
, LPVOID lPArg
, LPDIRECT3DRMUSERVISUAL
*) PURE
;
186 STDMETHOD(LoadTexture
) (THIS_
const char *, LPDIRECT3DRMTEXTURE2
*) PURE
;
187 STDMETHOD(LoadTextureFromResource
) (THIS_ HMODULE hModule
, LPCTSTR strName
, LPCTSTR strType
, LPDIRECT3DRMTEXTURE2
*) PURE
;
189 STDMETHOD(SetSearchPath
) (THIS_ LPCSTR
) PURE
;
190 STDMETHOD(AddSearchPath
) (THIS_ LPCSTR
) PURE
;
191 STDMETHOD(GetSearchPath
) (THIS_ DWORD
*size_return
, LPSTR path_return
) PURE
;
192 STDMETHOD(SetDefaultTextureColors
)(THIS_ DWORD
) PURE
;
193 STDMETHOD(SetDefaultTextureShades
)(THIS_ DWORD
) PURE
;
195 STDMETHOD(GetDevices
) (THIS_ LPDIRECT3DRMDEVICEARRAY
*) PURE
;
196 STDMETHOD(GetNamedObject
) (THIS_
const char *, LPDIRECT3DRMOBJECT
*) PURE
;
198 STDMETHOD(EnumerateObjects
) (THIS_ D3DRMOBJECTCALLBACK
, LPVOID
) PURE
;
201 ( THIS_ LPVOID
, LPVOID
, LPIID
*, DWORD
, D3DRMLOADOPTIONS
,
202 D3DRMLOADCALLBACK
, LPVOID
, D3DRMLOADTEXTURECALLBACK
, LPVOID
,
205 STDMETHOD(Tick
) (THIS_ D3DVALUE
) PURE
;
207 STDMETHOD(CreateProgressiveMesh
)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH
*) PURE
;
211 #define INTERFACE IDirect3DRM3
213 DECLARE_INTERFACE_(IDirect3DRM3
, IUnknown
)
215 IUNKNOWN_METHODS(PURE
);
217 STDMETHOD(CreateObject
)
218 (THIS_ REFCLSID rclsid
, LPUNKNOWN pUnkOuter
, REFIID riid
, LPVOID FAR
* ppv
) PURE
;
219 STDMETHOD(CreateFrame
) (THIS_ LPDIRECT3DRMFRAME3
, LPDIRECT3DRMFRAME3
*) PURE
;
220 STDMETHOD(CreateMesh
) (THIS_ LPDIRECT3DRMMESH
*) PURE
;
221 STDMETHOD(CreateMeshBuilder
)(THIS_ LPDIRECT3DRMMESHBUILDER3
*) PURE
;
222 STDMETHOD(CreateFace
) (THIS_ LPDIRECT3DRMFACE2
*) PURE
;
223 STDMETHOD(CreateAnimation
) (THIS_ LPDIRECT3DRMANIMATION2
*) PURE
;
224 STDMETHOD(CreateAnimationSet
)(THIS_ LPDIRECT3DRMANIMATIONSET2
*) PURE
;
225 STDMETHOD(CreateTexture
) (THIS_ LPD3DRMIMAGE
, LPDIRECT3DRMTEXTURE3
*) PURE
;
226 STDMETHOD(CreateLight
) (THIS_ D3DRMLIGHTTYPE
, D3DCOLOR
, LPDIRECT3DRMLIGHT
*) PURE
;
227 STDMETHOD(CreateLightRGB
)
228 (THIS_ D3DRMLIGHTTYPE
, D3DVALUE
, D3DVALUE
, D3DVALUE
, LPDIRECT3DRMLIGHT
*) PURE
;
229 STDMETHOD(CreateMaterial
) (THIS_ D3DVALUE
, LPDIRECT3DRMMATERIAL2
*) PURE
;
230 STDMETHOD(CreateDevice
) (THIS_ DWORD
, DWORD
, LPDIRECT3DRMDEVICE3
*) PURE
;
232 /* Create a Windows Device using DirectDraw surfaces */
233 STDMETHOD(CreateDeviceFromSurface
)
234 ( THIS_ LPGUID lpGUID
, LPDIRECTDRAW lpDD
,
235 LPDIRECTDRAWSURFACE lpDDSBack
, DWORD dwFlags
, LPDIRECT3DRMDEVICE3
*
238 /* Create a Windows Device using D3D objects */
239 STDMETHOD(CreateDeviceFromD3D
)
240 ( THIS_ LPDIRECT3D2 lpD3D
, LPDIRECT3DDEVICE2 lpD3DDev
,
241 LPDIRECT3DRMDEVICE3
*
244 STDMETHOD(CreateDeviceFromClipper
)
245 ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper
, LPGUID lpGUID
,
246 int width
, int height
, LPDIRECT3DRMDEVICE3
*) PURE
;
248 STDMETHOD(CreateTextureFromSurface
)(THIS_ LPDIRECTDRAWSURFACE lpDDS
, LPDIRECT3DRMTEXTURE3
*) PURE
;
250 STDMETHOD(CreateShadow
)
251 ( THIS_ LPUNKNOWN
, LPDIRECT3DRMLIGHT
,
252 D3DVALUE px
, D3DVALUE py
, D3DVALUE pz
,
253 D3DVALUE nx
, D3DVALUE ny
, D3DVALUE nz
,
254 LPDIRECT3DRMSHADOW2
*
256 STDMETHOD(CreateViewport
)
257 ( THIS_ LPDIRECT3DRMDEVICE3
, LPDIRECT3DRMFRAME3
, DWORD
, DWORD
,
258 DWORD
, DWORD
, LPDIRECT3DRMVIEWPORT2
*
260 STDMETHOD(CreateWrap
)
261 ( THIS_ D3DRMWRAPTYPE
, LPDIRECT3DRMFRAME3
,
262 D3DVALUE ox
, D3DVALUE oy
, D3DVALUE oz
,
263 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
,
264 D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
,
265 D3DVALUE ou
, D3DVALUE ov
,
266 D3DVALUE su
, D3DVALUE sv
,
269 STDMETHOD(CreateUserVisual
) (THIS_ D3DRMUSERVISUALCALLBACK
, LPVOID lPArg
, LPDIRECT3DRMUSERVISUAL
*) PURE
;
270 STDMETHOD(LoadTexture
) (THIS_
const char *, LPDIRECT3DRMTEXTURE3
*) PURE
;
271 STDMETHOD(LoadTextureFromResource
) (THIS_ HMODULE hModule
, LPCTSTR strName
, LPCTSTR strType
, LPDIRECT3DRMTEXTURE3
*) PURE
;
273 STDMETHOD(SetSearchPath
) (THIS_ LPCSTR
) PURE
;
274 STDMETHOD(AddSearchPath
) (THIS_ LPCSTR
) PURE
;
275 STDMETHOD(GetSearchPath
) (THIS_ DWORD
*size_return
, LPSTR path_return
) PURE
;
276 STDMETHOD(SetDefaultTextureColors
)(THIS_ DWORD
) PURE
;
277 STDMETHOD(SetDefaultTextureShades
)(THIS_ DWORD
) PURE
;
279 STDMETHOD(GetDevices
) (THIS_ LPDIRECT3DRMDEVICEARRAY
*) PURE
;
280 STDMETHOD(GetNamedObject
) (THIS_
const char *, LPDIRECT3DRMOBJECT
*) PURE
;
282 STDMETHOD(EnumerateObjects
) (THIS_ D3DRMOBJECTCALLBACK
, LPVOID
) PURE
;
285 ( THIS_ LPVOID
, LPVOID
, LPIID
*, DWORD
, D3DRMLOADOPTIONS
,
286 D3DRMLOADCALLBACK
, LPVOID
, D3DRMLOADTEXTURE3CALLBACK
, LPVOID
,
289 STDMETHOD(Tick
) (THIS_ D3DVALUE
) PURE
;
291 STDMETHOD(CreateProgressiveMesh
)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH
*) PURE
;
293 /* Used with IDirect3DRMObject2 */
294 STDMETHOD(RegisterClient
) (THIS_ REFGUID rguid
, LPDWORD lpdwID
) PURE
;
295 STDMETHOD(UnregisterClient
) (THIS_ REFGUID rguid
) PURE
;
297 STDMETHOD(CreateClippedVisual
) (THIS_ LPDIRECT3DRMVISUAL
, LPDIRECT3DRMCLIPPEDVISUAL
*) PURE
;
298 STDMETHOD(SetOptions
) (THIS_ DWORD
);
299 STDMETHOD(GetOptions
) (THIS_ LPDWORD
);
302 #define D3DRM_OK DD_OK
303 #define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
304 #define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
305 #define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
306 #define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
307 #define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
308 #define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
309 #define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
310 #define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
311 #define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
312 #define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
313 #define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
314 #define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
315 #define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
316 #define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
317 #define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
318 #define D3DRMERR_PENDING MAKE_DDHRESULT(796)
319 #define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
320 #define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
321 #define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
322 #define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
323 #define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
324 #define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
325 #define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
326 #define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
327 #define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
328 #define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
329 #define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
330 #define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
331 #define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
332 #define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
333 #define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
334 #define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812)
340 #endif /* _D3DRMAPI_H_ */