On 20 Mar, 19:09, Craig <craigm3... at gmail.com> wrote: The culprit i here: > Before - X = 0, CacheSize = 0, OpenMode = 3, vHandle = 0 This binds these names to Python ints, but byref expects C types. Also observe that CacheSize and OpenMode should be c_short.