KeyPair Generation problem

Dear All,
I have an urgent problem I have eToken Pro USB device and I need to generate private key on it, I was able to load the KeyStore using the pkcs#11 dll file, but I don't have any Idea on how to generate keys on the USB ... I tried to use the keyStore.setEntry method but the problem is it requires a Certificate chain and I don't know how to get this certificate ?? here is the code that i have reached