Fatal error when loading Media Label Libraries

T

Torben Nielsen

Hey

I'm trying to create my own Media Label Library, but for some reason
the library I create is invalid, and I'm kind of hoping that someone
out there could provide an answer.

I've written a dll that contains the functions 'MaxMediaLabel' and
'ClaimMediaLabel' as stated in the example below 'ERROR_BAD_FORMAT' is
return which should make the process move to the next check.

I do know the dll file is loaded and read as the function
'MaxMediaLabel' is called, but hereafter the following error is
recieved:
"RSM cannot identify media because a fatal error occured while
trying to load the Media Label Libraries."

I've af couse read the documentation, and found that apparently the
parameters changed between 2001 and 2003. So I have written the code
according to the header file (NtmsMli.h).

Hope someone out the could provide the answer of what I'm doing wrong.

Thanks
Torben Nielsen

CODE:
---------------------------------------------------------------
#include "stdafx.h"
#include <stdio.h>
#include <NtmsMli.h>


#if defined(__cplusplus)
extern "C" {
#endif

__declspec (dllexport) DWORD ClaimMediaLabel(const BYTE * const
pBuffer, const DWORD nBufferSize, MediaLabelInfo * const pLabelInfo) {
return ERROR_BAD_FORMAT;
}

__declspec (dllexport) DWORD MaxMediaLabel(DWORD * const pMaxSize) {
*pMaxSize = 1024;
return NO_ERROR;
}

#if defined(__cplusplus)
}
#endif
---------------------------------------------------------------
 
J

Joseph Conway [MSFT]

Torben

Post this to the windowsmedia.player group. Zachd there might be able to
answer your questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top