Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Laroche

DirectAudio wrapper problem

This topic is 5957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a member functoin in my class wrapper called "LoadFile()" in order to wrap the loader->LoadObjectFromFile function. The problem is i''m not quite sure of the syntax nessecary. the declaration is:
  
int LoadFile(WCHAR Filename[MAX_PATH]);
  
And the function is implemented as:
  
CDAW::LoadFile(WCHAR filename[MAX_PATH])
{
	if (FAILED(Loader->LoadObjectFromFile(
        CLSID_DirectMusicSegment,
        IID_IDirectMusicSegment8,
        filename,               
        (LPVOID*)&Segment
    )))
	{
		MessageBox(NULL, "DA LoadFile() Failed", "damn", MB_OK);
	}
	return (TRUE);
}
  
but it doesn''t work...im not quite sure what to pass to the function in order to get it to work properly, any help would be greatly appreciated, thanks!

Share this post


Link to post
Share on other sites
Advertisement
When I do that, I get the following error message:

error C2664: ''LoadFile'' : cannot convert parameter 1 from ''char [15]'' to ''unsigned short *''

Do i have to type cast Filename to an unsigned short pointer?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!