Windows CE 7 SPI Driver Not Loaded at Startup
===

I am a newbie. 

I want to develop device drivers on Windows CE 7.

I use Adeneo BSP on TI AM33xx Development Board

I want to drive a SPI Flash so I should use SPI driver. 

I have written my driver and when I debug it, all functions calling correctly. But when I call the 

    CreateFile(	_T("SPI1:"),
    			GENERIC_READ | GENERIC_WRITE,
    			FILE_SHARE_READ | FILE_SHARE_WRITE,
    			NULL, OPEN_EXISTING, 0, NULL);

deviceHandle always return invalid value. So when I debug the low level SPI driver, I seen , SPI_Init() stream function never called. 

There is this tines in my platform.reg file 

	;===============================================================================
	; MCSPI driver
	#include "$(_PLATFORMROOT)\AM33x_BSP\SRC\DRIVERS\MCSPI\mcspi.reg"

And 

My mcspi.reg file is 

	;-- SPI Driver -----------------------------------------------------------------
	IF BSP_AM33X_MCSPI1
	[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SPI1]
	    "Prefix"="SPI"
	    "Dll"="am33x_mcspi.dll"
	    "Index"=dword:1
	    "Port"=dword:1
	    "Order"=dword:8
	    "MemBase"=multi_sz:"48030000"
	    "MemLen"=multi_sz:"00000100"
	    "Timeout"=dword:300
	    "PowerFlags"=dword:00000103              ; send pre/post device state changes
		; PMCLASS_PMEXT_GUID
	    "IClass"=multi_sz:"{0AE2066F-89A2-4D70-8FC2-29AEFA68413C}"
	ENDIF


**[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SPI1]** this lines say to us, "SPI1 driver will be loaded at startup", isnt it ??? But spi driver SPI_Init function never loaded at starttup. I havent seen any extra setting in Microsoft White Paper. 

And additional,

I have tried 

    ActivateDeviceEx(TEXT("Drivers\\BuiltIn\\SPI1"), NULL, 0, NULL);

and

    LoadLibrary(TEXT("am33x_mcspi.dll"));

functions but result is same. 

Is there any extra setting for Driver Loading?



Thanks

Murat.