Ahh cool. In the updated header I had changed the types to enum and set the min enum size to 4 which solved the keycode issue on my end (at least for delphi). The next problem (there is always a problem, haha) is how Delphi handles function result for a structure. I found this reference:
http://rvelthuis.de/articles/articles-convert.html (go down to the return types section)

If you call any of the routines that return a record value you will find that they do not work.... Arrrrrrrg! I've been trying to sort this out using the advance in that article but to no avail. The problem is that (at least in Delphi XE6) it simply will not let you type cast the Int64 type to anything ... other than a record that just so happens to be the same size as the Int64.... freaking Arrrrrg! So the sfVectorXXX types will work fine using this methods, but any other structure larger than Int64, Delphi will just say "invalid typecast". I have not tested this on any other Pascal compiler so not sure if it will be a problem say on FPC or not. But, code_glitch if you can check this it would be much appreciated.

The only solution that I know of is the change the signature of the routines on the c side. I really do not want to have to do this which then means I have more work to keep them up to date and then the same for all the other platforms. Oh my... what started out a looking like a fast and simple solution is turning into a small nightmare... Such as life however... good times, good times. Haha.