direct music 9, what is COM?

Started by
4 comments, last by johnnyBravo 20 years, 6 months ago
just some sample code what is this COM? ive never seen it before, its from the dx9 tutorial for direct music No.1

CoInitialize(NULL);
    
    // Create loader object

    CoCreateInstance( CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, 
                      IID_IDirectMusicLoader8, (void**)&g_pLoader );

	// Close down COM

		CoUninitialize();

Advertisement
Component Object Model, all of DirectX is built off it. Many parts of it are integrated into .NET. Check out microsoft''s website about it. COM and COM+ were their babies until .NET came around (and I must say, after the steep learning curve at the start COM does its job very well).

Pat
I don''t know why Direct3D doesn''t require you to do this..
This is done in IDirect3D* Direct3DxCreate()?

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
quote:Original post by Pipo DeClown
I don''t know why Direct3D doesn''t require you to do this..
This is done in IDirect3D* Direct3DxCreate()?


Probably. DDraw7 used to require it, but not D3D8 or D3D9, at least on my apps.

-Nik

Niko Suni

It was never required by DirectDraw. In any version. You can use this technique with any of the DX modules though. DirectMusic is the only module that does not provide a *Create function. I read somewhere a while back the reason why, but can''t remember what it was.
I used indirect ddraw initialization, that must be the reason it was required in my apps back then

-Nik

Niko Suni

This topic is closed to new replies.

Advertisement