I don't understand if you was you able to generate a key in .NET code.
Consider that NCryptoki is a wrapper to an underlying PKCS#11 module. So it forwards the calls to such an underlying module and returns back the responses. Thus, usually the errors comes from the underlying module.
Which PKCS#11 module are you using?
If you was not able to generate a key in .NET there is something wrong in your code or in the undelying PKCS#11.
the method GenerateKey throws and exception if something fails. Did you get such an exception? It cannot return null without throwing an exception
Finally I don't understand why did you use strtoint (strtoint(CKM_AES_ECB))