How to initialize SPI channel

I am using colibri vf61 on iris var 1.0 with operating system 1.3 BETA, Build 1(CE 6.0) . i am trying to initialize SPI channel by using this API http://developer.toradex.com/knowledge-base/how-to-use-spi-library-in-vcsharp
but i am unable to initialize it. when i run the application the message ( "Could not initialize codec " ) display in console output. kindly refer me a suitable example to start spi channel.

Currently we do not have SPI demo in csharp for new wince library which we have used for VFxx and same has been communicated to him over telephonic call.
ADC and GPIO sample code in csharp with updated VFxx library is already been provided to him.
Also communicated that he has to take reference from native SPI sample code which comes with library and develop in csharp.

we are trying to make SPI Api by using ADC,GPIO and Native SPI sample code referred by you but we are still facing problem with Library Function (" Spi_SetConfigInt () ") after initialization function as in ADC sample code. whether is it right way to create SPI or not? there is native exception obtain on Spi_SetConfigInt () function.