CreateDevice: illegal entry point combination in driver DLL



hi all,

I just encountered a something that is puzzling me.

I am developing a Flash Media Driver (FMD) for a CE 5.0 project.

I am attempting to implement a FMD for a Flash. My first step is to create
a DLL of an essentially empty FMD_XXX functions that just return success and
print a debug message when called.

At this point I encountered a failure when the CreateDevices() is processing
the DLL. The message emitted is "CreateDevice: illegal entry point
combination in driver DLL..."

When stepping through CreateDevices()'s code with a debugger I discovered a
complicated "if" statement that validates the presence of several APIs. It
first validates that FMD_Init() and FMD_Deinit() can be obtained from the
DLL. Then, if a devicename is present, it proceeds to validate other API's
were obtained from the DLL. Specifically, it validates that FMD_Read() and
FMD_Write() were obtained.

The problem is that , according to msdn, the FMD's APIs are only comprised of

FMD_Deinit
FMD_EraseBlock
FMD_GetBlockStatus
FMD_GetInfo
FMD_Init
FMD_OEMIoControl
FMD_PowerDown
FMD_PowerUp
FMD_ReadSector
FMD_SetBlockStatus
FMD_WriteSector

As far as I can tell, the FMD does not require a FMD_Read() or FMD_Write()
APIs.

More detail: while stepping through CreateDevice I saw that the code was
taking the FMD's prefix, which I set to "FMD" and appended a "1" to it and
created a "DeviceName" of "FMD1".

Because a Device name was created by the code, the complicated if statement
I previously described, checks for APIs like FMD_Read(), determines it is not
in the DLL and prints out "CreateDevice: illegal entry point combination in
driver DLL"

I have the idea that CreateDevice should not be trying to process this
particular DLL.

More details: My registry settings are:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NDFMD]

"Dll"="ndfmd.dll"
"Prefix"="DSK"



;; cause the FS to be automatically mounted

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MyPDCFS]

"DriverPath"="drivers\\builtin\\NDFMD"


; loadflags == 1 specifies synchronous loading (would async loading be
better?)
"LoadFlags"=dword:00000001



; bootphase == 2 specifies that the file system is loaded after the mounting
of the user hive
"BootPhase"=dword:00000002



"Dll"="OurFileSystem.dll"

; paging = 0 specifies that paging is disable

"Paging"=dword:00000000



"testint"=dword:00000001



;

[HKEY_LOCAL_MACHINE\System\StorageManager\Profile\NdfmdPro\FATFS]

; accept default FATFS settings, except for the following

"EnableDataCacheWarm"=dword:0 ; disable warming

"EnableFatCacheWarm"=dword:0 ; disable warming

"EnableWriteBack"=dword:0 ; disable write-back cache



; create a profile named 'HDProfile', for the ndfmd partition

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile\]

"Name"="Expermental"

"Folder"="ndfmd"

"PartitionID"=dword:0

"PartitionDriver"=""


What am I getting wrong?
.