I have got a solution to my problem from Thomas Heller by email. The problem was solved by using .from_address() instead of causing trouble cast() - here the solution as a generalized example of code for reading access to shared memory area with given 'appropriateName':
from ctypes import * FILE_MAP_READ = 2 strNameOfSharedMemoryAreaToAccess = 'appropriateName' handle = windll.kernel32.OpenFileMappingA( FILE_MAP_READ , 0 , strNameOfSharedMemoryAreaToAccess ) if not handle: raise WinError() addr = windll.kernel32.MapViewOfFile( handle ,FILE_MAP_READ ,0 ,0 ,0 ) if not addr: raise WinError() class structureOfSharedMemoryArea(Structure): _fields_ = [ ("Elem01" , c_short ) # or any other ctype or ctype structure ("Elem02" , c_long ) ... ("ElemNN" , c_long ) ] contentOfSharedMemoryArea = structureOfSharedMemoryArea.from_address(addr) print 'Elem01 ', contentOfSharedMemoryArea.Elem01 print 'Elem02 ', contentOfSharedMemoryArea.Elem02 ... print 'ElemNN ', contentOfSharedMemoryArea.ElemNN Claudio -- http://mail.python.org/mailman/listinfo/python-list