Microsoft DirectX 8.1 (Visual Basic)

Loading an Object from a File

To load an object, first create a DirectMusicLoader8 object. Then call one of the following methods:

Pass in either a simple file name or a full path for the file that contains the desired object.

The following code example, in which objDX is a DirectX8 object, loads a segment from a file in the current directory:

Dim objDMLoader As DirectMusicLoader8
Dim objSeg As DirectMusicSegment8
 
Set objDMLoader = objDX.DirectMusicLoaderCreate
Set objSeg = objDMLoader.LoadSegment("Myseg.sgt")

See also Loading an Object from a Resource.