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
---------------------------------------------------------------
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
---------------------------------------------------------------