You can find in our wiki an example on extracting an extractable DES key from an HSM:
http://wiki.ncryptoki.com/How-to-extract-a-DES-secret-key.ashx
Consider also that usually to import/export a secret key from an HSM you must use wrap/unwrap functions by using a RSA key pair to wrap/unwrap the key.