Minor fixes to ctypes (#18625)
Minor fixes taken from #18207
Summary of the issue:
Fixes ctypes which cause issues on 64bit builds
Description of user facing changes:
None
Description of developer facing changes:
Fixes ctypes which cause issues on 64bit builds
Description of development approach:
Refer to #18207 for more context