dx8vb.idl 23.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
/*
 * Copyright 2017 Fabian Maurer
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#pragma makedep register

#include "unknwn.idl"

#include "d3d8types.h"

interface Direct3DDevice8;
interface D3DXFont;
interface D3DXBuffer;
interface Direct3DSurface8;
interface Direct3DTexture8;
interface Direct3DCubeTexture8;
interface Direct3DVolume8;
interface D3DXMesh;
interface D3DXSPMesh;
interface D3DXPMesh;
interface D3DXBaseMesh;
interface D3DXSkinMesh;
interface D3DXSprite;
interface D3DXRenderToSurface;
interface Direct3DBaseTexture8;
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
interface DirectSound8;
interface DirectSoundCapture8;
interface DirectSoundEnum8;
interface DirectSoundEnum8;
interface DirectInput8;
interface DirectMusicLoader8;
interface DirectMusicComposer8;
interface DirectMusicPerformance8;
interface DirectXEvent8;
interface DirectPlayVoiceClient8;
interface DirectPlayVoiceServer8;
interface DirectPlayVoiceTest8;
interface DirectXFile;
interface DirectPlay8Peer;
interface DirectPlay8Server;
interface DirectPlay8Client;
interface DirectPlay8Address;
interface Direct3D8;
interface DirectPlay8LobbyClient;
interface DirectPlay8LobbiedApplication;
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723

typedef enum {
    D3DXIFF_BMP = 0,
    D3DXIFF_JPG = 1,
    D3DXIFF_TGA = 2,
    D3DXIFF_PNG = 3,
    D3DXIFF_DDS = 4,
    D3DXIFF_PPM = 5,
    D3DXIFF_DIB = 6,
    D3DXIFF_FORCE_DWORD = 0x7fffffff
} D3DXIMAGE_FILEFORMAT;

typedef struct tagD3DXDECLARATOR {
    LONG value[32];
} D3DXDECLARATOR;

typedef struct tagD3DXMATERIAL {
    D3DMATERIAL8 MatD3D;
    BSTR TextureFilename;
} D3DXMATERIAL;

typedef struct tagD3DXBONECOMBINATION {
    LONG AttribId;
    LONG FaceStart;
    LONG FaceCount;
    LONG VertexStart;
    LONG VertexCount;
    LONG pBones;
} D3DXBONECOMBINATION;

[
    object,
    uuid(3ac50043-cf82-4c44-862e-b206b4f03301),
    local
]
interface ID3DX8 : IUnknown {
    HRESULT CreateFont(
        [in] Direct3DDevice8 *device,
        [in] LONG hFont,
        [out, retval] D3DXFont **retFont
    );
    HRESULT DrawText(
        [in] D3DXFont *d3dFont,
        [in] LONG color,
        [in] BSTR text,
        [in] RECT *rect,
        [in] LONG format
    );
    HRESULT GetFVFVertexSize(
        [in] LONG fvf,
        [out, retval] LONG *size
    );
    HRESULT AssembleShaderFromFile(
        [in] BSTR file,
        [in] LONG flags,
        [in, out] BSTR *log,
        [in, out] D3DXBuffer **constants,
        [out, retval] D3DXBuffer **ppVertexShader
    );
    HRESULT AssembleShader(
        [in] BSTR data,
        [in] LONG flags,
        [in, out] D3DXBuffer **constants,
        [in, out, optional] BSTR *log,
        [out, retval] D3DXBuffer **ppVertexShader
    );
    HRESULT GetErrorString(
        [in] LONG hr,
        [out, retval] BSTR *retStr
    );
    HRESULT LoadSurfaceFromFile(
        [in] Direct3DSurface8 *destSurface,
        [in] void *destPalette,
        [in] void *destRect,
        [in] BSTR srcFile,
        [in] void *srcRect,
        [in] LONG filter,
        [in] LONG colorKey,
        [in, out] void *srcInfo
    );
    HRESULT LoadSurfaceFromFileInMemory(
        [in] Direct3DSurface8 *destSurface,
        [in] void *destPalette,
        [in] void *destRect,
        [in] void *srcData,
        [in] LONG lengthInBytes,
        [in] void *srcRect,
        [in] LONG filter,
        [in] LONG colorKey,
        [in, out] void *srcInfo
    );
    HRESULT LoadSurfaceFromSurface(
        [in] Direct3DSurface8 *destSurface,
        [in] void *destPalette,
        [in] void *destRect,
        [in] Direct3DSurface8 *srcSurface,
        [in] void *srcPalette,
        [in] void *srcRect,
        [in] LONG filter,
        [in] LONG colorKey
    );
    HRESULT LoadSurfaceFromMemory(
        [in] Direct3DSurface8 *destSurface,
        [in] void *destPalette,
        [in] void *destRect,
        [in] void *srcData,
        [in] D3DFORMAT formatSrc,
        [in] LONG srcPitch,
        [in] void *srcPalette,
        [in] RECT *srcRect,
        [in] LONG filter,
        [in] LONG colorKey
    );
    HRESULT CheckTextureRequirements(
        [in, out] Direct3DDevice8 *device,
        [in, out] LONG *width,
        [in, out] LONG *height,
        [in, out] LONG *mipLevels,
        [in] LONG usage,
        [in, out] D3DFORMAT *pixelformat,
        [in] D3DPOOL pool
    );
    HRESULT CreateTexture(
        [in] Direct3DDevice8 *device,
        [in] LONG width,
        [in] LONG height,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT CreateTextureFromResource(
        [in] Direct3DDevice8 *device,
        [in] LONG hModule,
        [in] BSTR srcResource,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT CreateTextureFromFile(
        [in] Direct3DDevice8 *device,
        [in] BSTR srcFile,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT CreateTextureFromFileEx(
        [in] Direct3DDevice8 *device,
        [in] BSTR srcFile,
        [in] LONG width,
        [in] LONG height,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [in] LONG filter,
        [in] LONG mipFilter,
        [in] LONG colorKey,
        [in, out] void *srcInfo,
        [in] void *palette,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT CreateTextureFromFileInMemory(
        [in] Direct3DDevice8 *device,
        [in] void *srcData,
        [in] LONG lengthInBytes,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT CreateTextureFromFileInMemoryEx(
        [in] Direct3DDevice8 *device,
        [in] void *srcData,
        [in] LONG lengthInBytes,
        [in] LONG width,
        [in] LONG height,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [in] LONG filter,
        [in] LONG mipFilter,
        [in] LONG colorKey,
        [in, out] void *srcInfo,
        [in] void *palette,
        [out, retval] Direct3DTexture8 **ppTexture
    );
    HRESULT FilterTexture(
        [in] Direct3DTexture8 *texture,
        [in] void *palette,
        [in] LONG srcLevel,
        [in] LONG filter
    );
    HRESULT CheckCubeTextureRequirements(
        [in] Direct3DDevice8 *device,
        [in, out] LONG *size,
        [in, out] LONG *mipLevels,
        [in] LONG usage,
        [in, out] D3DFORMAT *pixelformat,
        [in] D3DPOOL pool
    );
    HRESULT CreateCubeTexture(
        [in] Direct3DDevice8 *device,
        [in] LONG size,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [out, retval] Direct3DCubeTexture8 **ppCubeTexture
    );
    HRESULT CreateCubeTextureFromFile(
        [in] Direct3DDevice8 *device,
        [in] BSTR srcFile,
        [out, retval] Direct3DCubeTexture8 **ppCubeTexture
    );
    HRESULT CreateCubeTextureFromFileEx(
        [in] Direct3DDevice8 *device,
        [in] BSTR srcFile,
        [in] LONG textureSize,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [in] LONG filter,
        [in] LONG mipFilter,
        [in] LONG colorKey,
        [in, out] void *srcInfo,
        [in] void *palette,
        [out, retval] Direct3DCubeTexture8 **ppTexture
    );
    HRESULT CreateCubeTextureFromFileInMemory(
        [in] Direct3DDevice8 *device,
        [in] void *srcData,
        [in] LONG lengthInBytes,
        [out, retval] Direct3DCubeTexture8 **ppTexture
    );
    HRESULT CreateCubeTextureFromFileInMemoryEx(
        [in] Direct3DDevice8 *device,
        [in] void *srcData,
        [in] LONG lengthInBytes,
        [in] LONG textureSize,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [in] LONG filter,
        [in] LONG mipFilter,
        [in] LONG colorKey,
        [in, out] void *srcInfo,
        [in] void *palette,
        [out, retval] Direct3DCubeTexture8 **ppTexture
    );
    HRESULT FilterCubeTexture(
        [in] Direct3DCubeTexture8 *cubeTexture,
        [in] void *palette,
        [in] LONG srcLevel,
        [in] LONG filter
    );
    HRESULT CheckVolumeTextureRequirements(
        [in] Direct3DDevice8 *device,
        [out] LONG *width,
        [out] LONG *height,
        [out] LONG *depth,
        [out] LONG *mipLevels,
        [in] LONG usage,
        [in, out] D3DFORMAT *pixelformat,
        [in] D3DPOOL pool
    );
    HRESULT CreateTextureFromResourceEx(
        [in] Direct3DDevice8 *device,
        [in] LONG hSrcModule,
        [in] BSTR srcResource,
        [in] LONG width,
        [in] LONG height,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [in] LONG filter,
        [in] LONG mipFilter,
        [in] LONG colorKey,
        [in, out] void *srcInfo,
        [in] void *palette,
        [out, retval] Direct3DTexture8 **retTexture
    );
    HRESULT CreateVolumeTexture(
        [in] Direct3DDevice8 *device,
        [in] LONG width,
        [in] LONG height,
        [in] LONG depth,
        [in] LONG mipLevels,
        [in] LONG usage,
        [in] D3DFORMAT pixelformat,
        [in] D3DPOOL pool,
        [out, retval] Direct3DVolume8 **ppVolumeTexture
    );
    HRESULT FilterVolumeTexture(
        [in] Direct3DVolume8 *volumeTexture,
        [in] void *palette,
        [in] LONG srcLevel,
        [in] LONG filter
    );
    HRESULT LoadSurfaceFromResource(
        [in] Direct3DSurface8 *destSurface,
        [in] void *destPalette,
        [in] void *destRect,
        [in] LONG hSrcModule,
        [in] BSTR srcResource,
        [in] void *srcRect,
        [in] LONG filter,
        [in] LONG colorKey,
        [in, out] void *srcInfo
    );
    HRESULT LoadVolumeFromVolume(
        [in] Direct3DVolume8 *destVolume,
        [in] void *destPalette,
        [in] void *destBox,
        [in] Direct3DVolume8 *srcVolume,
        [in] void *srcPalette,
        [in] void *srcBox,
        [in] LONG filter,
        [in] LONG colorKey
    );
    HRESULT LoadVolumeFromMemory(
        [in] Direct3DVolume8 *destVolume,
        [in] void *destPalette,
        [in] void *destBox,
        [in] void *srcMemory,
        [in] LONG srcFormat,
        [in] LONG srcRowPitch,
        [in] LONG srcSlicePitch,
        [in] void *srcPalette,
        [in] void *srcBox,
        [in] LONG filter,
        [in] LONG colorKey
    );
    HRESULT CreateMesh(
        [in] LONG numFaces,
        [in] LONG numVertices,
        [in] LONG options,
        [in] void *declaration,
        [in] Direct3DDevice8 *pD3D,
        [out, retval] D3DXMesh **ppMesh
    );
    HRESULT CreateMeshFVF(
        [in] LONG numFaces,
        [in] LONG numVertices,
        [in] LONG options,
        [in] LONG fvf,
        [in] Direct3DDevice8 *pD3D,
        [out, retval] D3DXMesh **ppMesh
    );
    HRESULT CreateSPMesh(
        [in] D3DXMesh *pMesh,
        [in] void *adjacency,
        [in] void *vertexAttributeWeights,
        [in] void *vertexWeights,
        [out, retval] D3DXSPMesh **ppSMesh
    );
    HRESULT GeneratePMesh(
        [in] D3DXMesh *mesh,
        [in] void *adjacency,
        [in] void *vertexAttributeWeights,
        [in] void *vertexWeights,
        [in] LONG minValue,
        [in] LONG options,
        [out, retval] D3DXPMesh **ppPMesh
    );
    HRESULT SimplifyMesh(
        [in] D3DXMesh *mesh,
        [in] void *adjacency,
        [in] void *vertexAttributeWeights,
        [in] void *vertexWeights,
        [in] LONG minValue,
        [in] LONG options,
        [out, retval] D3DXMesh **ppMesh
    );
    HRESULT ComputeBoundingSphere(
        [in] void *pointsFVF,
        [in] LONG numVertices,
        [in] LONG fvf,
        [in] D3DVECTOR *centers,
        [in, out] float *radiusArray
    );
    HRESULT ComputeBoundingBox(
        [in] void *pointsFVF,
        [in] LONG numVertices,
        [in] LONG fvf,
        [in, out] D3DVECTOR *minVert,
        [in, out] D3DVECTOR *maxVert
    );
    HRESULT ComputeNormals(
        [in] D3DXBaseMesh *pMesh
    );
    HRESULT DeclaratorFromFVF(
        [in] LONG fvf,
        [out] D3DXDECLARATOR *declarator
    );
    HRESULT FVFFromDeclarator(
        [in] D3DXDECLARATOR *declarator,
        [out, retval] LONG *fvf
    );
    HRESULT CreateBuffer(
        [in] LONG numBytes,
        [out, retval] D3DXBuffer **ppBuffer
    );
    HRESULT LoadMeshFromX(
        [in] BSTR filename,
        [in] LONG options,
        [in] Direct3DDevice8 *device,
        [in, out] D3DXBuffer **retAdjacency,
        [in, out] D3DXBuffer **retMaterials,
        [in, out] LONG *retMaterialCount,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT SaveMeshToX(
        [in] BSTR filename,
        [in] D3DXMesh *mesh,
        [in] void *adjacencyArray,
        [in] D3DXMATERIAL *materialArray,
        [in] LONG materialCount,
        [in] LONG xFormat
    );
    HRESULT LoadMeshFromXof(
        [in] IUnknown *xofobjMesh,
        [in] LONG options,
        [in] Direct3DDevice8 *device,
        [in, out] D3DXBuffer **retBufAdjacency,
        [in, out] D3DXBuffer **retMaterials,
        [in, out] LONG *retMaterialCount,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT TessellateNPatches(
        [in] D3DXMesh *meshIn,
        [in] void *adjacencyIn,
        [in] float numSegs,
        [in] VARIANT_BOOL quadraticInterpNormals,
        [in, out, optional] D3DXBuffer **adjacencyOut,
        [out, retval] D3DXMesh **meshOut
    );
    HRESULT BufferGetMaterial(
        [in] D3DXBuffer *materialBuffer,
        [in] LONG index,
        [out] D3DMATERIAL8 *mat
    );
    HRESULT BufferGetTextureName(
        [in] D3DXBuffer *materialBuffer,
        [in] LONG index,
        [out, retval] BSTR *retName
    );
    HRESULT BufferGetData(
        [in] D3DXBuffer *buffer,
        [in] LONG index,
        [in] LONG typesize,
        [in] LONG typecount,
        [in, out] void *data
    );
    HRESULT BufferSetData(
        [in] D3DXBuffer *buffer,
        [in] LONG index,
        [in] LONG typesize,
        [in] LONG typecount,
        [in, out] void *data
    );
    HRESULT Intersect(
        [in] D3DXMesh *meshIn,
        [in] D3DVECTOR *rayPos,
        [in] D3DVECTOR *rayDir,
        [out] LONG *retHit,
        [out] LONG *retFaceIndex,
        [out] float *u,
        [out] float *v,
        [out] float *retDist,
        [out] LONG *countHits,
        [out, retval] D3DXBuffer **allHits
    );
    HRESULT SphereBoundProbe(
        [in] D3DVECTOR *center,
        [in] float radius,
        [in] D3DVECTOR *rayPosition,
        [in] D3DVECTOR *rayDirection,
        [out, retval] VARIANT_BOOL *retHit
    );
    HRESULT ComputeBoundingSphereFromMesh(
        [in] D3DXMesh *meshIn,
        [in, out] D3DVECTOR *centers,
        [in, out] float *radiusArray
    );
    HRESULT ComputeBoundingBoxFromMesh(
        [in] D3DXMesh *meshIn,
        [in, out] D3DVECTOR *minArray,
        [in, out] D3DVECTOR *maxArray
    );
    HRESULT CreateSkinMesh(
        [in] LONG numFaces,
        [in] LONG numVertices,
        [in] LONG numBones,
        [in] LONG options,
        [in] void *declaration,
        [in] Direct3DDevice8 *device,
        [out, retval] D3DXSkinMesh **ppSkinMesh
    );
    HRESULT CreateSkinMeshFVF(
        [in] LONG numFaces,
        [in] LONG numVertices,
        [in] LONG numBones,
        [in] LONG options,
        [in] LONG fvf,
        [in] Direct3DDevice8 *device,
        [out, retval] D3DXSkinMesh **ppSkinMesh
    );
    HRESULT CreateSkinMeshFromMesh(
        [in] D3DXMesh *mesh,
        [in] LONG numBones,
        [out, retval] D3DXSkinMesh **ppSkinMesh
    );
    HRESULT LoadSkinMeshFromXof(
        [in] IUnknown *xofobjMesh,
        [in] LONG options,
        [in] Direct3DDevice8 *device,
        [in, out] D3DXBuffer **adjacencyOut,
        [in, out] D3DXBuffer **materialsOut,
        [in, out] LONG *numMatOut,
        [in, out] D3DXBuffer **boneNamesOut,
        [in, out] D3DXBuffer **boneTransformsOut,
        [out, retval] D3DXSkinMesh **ppMesh
    );
    HRESULT CreatePolygon(
        [in] Direct3DDevice8 *device,
        [in] float length,
        [in] LONG sides,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateBox(
        [in] Direct3DDevice8 *device,
        [in] float width,
        [in] float height,
        [in] float depth,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateCylinder(
        [in] Direct3DDevice8 *device,
        [in] float radius1,
        [in] float radius2,
        [in] float length,
        [in] LONG slices,
        [in] LONG stacks,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateSphere(
        [in] Direct3DDevice8 *device,
        [in] float radius,
        [in] LONG slices,
        [in] LONG stacks,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateTorus(
        [in] Direct3DDevice8 *device,
        [in] float innerRadius,
        [in] float outerRadius,
        [in] LONG sides,
        [in] LONG rings,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateTeapot(
        [in] Direct3DDevice8 *device,
        [in, out] D3DXBuffer **retAdjacency,
        [out, retval] D3DXMesh **retMesh
    );
    HRESULT CreateText(
        [in] Direct3DDevice8 *device,
        [in] LONG hDC,
        [in] BSTR text,
        [in] float deviation,
        [in] float extrusion,
        [in, out] D3DXMesh **retMesh,
        [in, out] D3DXBuffer **adjacencyOut,
        [in, out] void *glyphMetrics
    );
    HRESULT BufferGetBoneName(
        [in] D3DXBuffer *boneNameBuffer,
        [in] LONG index,
        [out, retval] BSTR *retName
    );
    HRESULT CreateSprite(
        [in] Direct3DDevice8 *device,
        [out, retval] D3DXSprite **retSprite
    );
    HRESULT CreateRenderToSurface(
        [in] Direct3DDevice8 *device,
        [in] LONG width,
        [in] LONG height,
        [in] D3DFORMAT format,
        [in] LONG depthStencil,
        [in] D3DFORMAT depthStencilFormat,
        [out, retval] D3DXRenderToSurface **retRenderToSurface
    );
    HRESULT CleanMesh(
        [in] D3DXMesh *meshIn,
        [in] void *adjacency,
        [in, out] BSTR *log,
        [in, out] D3DXBuffer *adjacencyOut,
        [out, retval] D3DXMesh **meshOut
    );
    HRESULT ValidMesh(
        [in] D3DXMesh *meshIn,
        [in] void *adjacency,
        [in, out, optional] BSTR *log,
        [out, retval] VARIANT_BOOL *ret
    );
    HRESULT BoxBoundProbe(
        [in] D3DVECTOR *minVert,
        [in] D3DVECTOR *maxVert,
        [in] D3DVECTOR *rayPosition,
        [in] D3DVECTOR *rayDirection,
        [out, retval] VARIANT_BOOL *ret
    );
    HRESULT SavePMeshToFile(
        [in] BSTR filename,
        [in] D3DXPMesh *mesh,
        [in] D3DXMATERIAL *materialArray,
        [in] LONG materialCount
    );
    HRESULT LoadPMeshFromFile(
        [in] BSTR filename,
        [in] LONG options,
        [in] Direct3DDevice8 *device,
        [out] D3DXBuffer **retMaterials,
        [out] LONG *retNumMaterials,
        [out, retval] D3DXPMesh **retPMesh
    );
    HRESULT BufferGetBoneCombo(
        [in] D3DXBuffer *boneComboBuffer,
        [in] LONG index,
        [in, out] D3DXBONECOMBINATION *boneCombo
    );
    HRESULT BufferGetBoneComboBoneIds(
        [in] D3DXBuffer *boneComboBuffer,
        [in] LONG index,
        [in] LONG paletteSize,
        [in] void *boneIds
    );
    HRESULT SaveSurfaceToFile(
        [in] BSTR destFile,
        [in] D3DXIMAGE_FILEFORMAT destFormat,
        [in] Direct3DSurface8 *srcSurface,
        [in] PALETTEENTRY *srcPalette,
        [in] RECT *srcRect
    );
    HRESULT SaveVolumeToFile(
        [in] BSTR destFile,
        [in] D3DXIMAGE_FILEFORMAT destFormat,
        [in] Direct3DVolume8 *srcVolume,
        [in] PALETTEENTRY *srcPalette,
        [in] void *srcBox
    );
    HRESULT SaveTextureToFile(
        [in] BSTR destFile,
        [in] D3DXIMAGE_FILEFORMAT destFormat,
        [in] Direct3DBaseTexture8 *srcTexture,
        [in] PALETTEENTRY *srcPalette
    );
};

724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
[
    object,
    uuid(e7ff1301-96a5-11d3-ac85-00c04fc2c602),
    helpstring("DirectX8 root object functions"),
    local
]
interface IDirectX8 : IUnknown {
    HRESULT DirectSoundCreate(
        [in] BSTR guid,
        [out, retval] DirectSound8 **ret
    );
    HRESULT DirectSoundCaptureCreate(
        [in] BSTR guid,
        [out, retval] DirectSoundCapture8 **ret
    );
    HRESULT GetDSEnum(
        [out, retval] DirectSoundEnum8 **ret
    );
    HRESULT GetDSCaptureEnum(
        [out, retval] DirectSoundEnum8 **ret
    );
    HRESULT DirectInputCreate(
        [out, retval] DirectInput8 **ret
    );
    HRESULT DirectMusicLoaderCreate(
        [out, retval] DirectMusicLoader8 **ret
    );
    HRESULT DirectMusicComposerCreate(
        [out, retval] DirectMusicComposer8 **ret
    );
    HRESULT DirectMusicPerformanceCreate(
        [out, retval] DirectMusicPerformance8 **ret
    );
    HRESULT CreateEvent(
        [in] DirectXEvent8 *event,
        [out, retval] LONG *h
    );
    HRESULT SetEvent(
        [in] LONG eventid
    );
    HRESULT DestroyEvent(
        [in] LONG eventid
    );
    HRESULT CreateNewGuid(
        [out, retval] BSTR *retGuid
    );
    HRESULT DirectPlayVoiceClientCreate(
        [out, retval] DirectPlayVoiceClient8 **ret
    );
    HRESULT DirectPlayVoiceServerCreate(
        [out, retval] DirectPlayVoiceServer8 **ret
    );
    HRESULT DirectPlayVoiceTestCreate(
        [out, retval] DirectPlayVoiceTest8 **ret
    );
    HRESULT DirectXFileCreate(
        [out, retval] DirectXFile **ret
    );
    HRESULT DirectPlayPeerCreate(
        [out, retval] DirectPlay8Peer **ret
    );
    HRESULT DirectPlayServerCreate(
        [out, retval] DirectPlay8Server **ret
    );
    HRESULT DirectPlayClientCreate(
        [out, retval] DirectPlay8Client **ret
    );
    HRESULT DirectPlayAddressCreate(
        [out, retval] DirectPlay8Address **ret
    );
    HRESULT Direct3DCreate(
        [out, retval] Direct3D8 **ret
    );
    HRESULT DirectPlayLobbyClientCreate(
        [out, retval] DirectPlay8LobbyClient **ret
    );
    HRESULT DirectPlayLobbiedApplicationCreate(
        [out, retval] DirectPlay8LobbiedApplication **ret
    );
};

805 806 807 808 809 810 811 812
[
    uuid(58356c5d-0bfd-48ed-93c5-f4520b6233de),
    helpstring("D3DX8"),
    threading(both),
    progid("DIRECT.D3DX8.0"),
    vi_progid("DIRECT.D3DX8.0")
]
coclass D3DX8 { interface ID3DX8; };
813 814 815 816 817 818 819 820 821

[
    uuid(e7ff1300-96a5-11d3-ac85-00c04fc2c602),
    helpstring("DirectX8"),
    threading(both),
    progid("DIRECT.DirectX8.0"),
    vi_progid("DIRECT.DirectX8.0")
]
coclass DirectX8 { interface IDirectX8; };