Tim wrote: > Hello Everyone, > > I am getting shared memory in python using the following. > > szName = c_char_p(name) > hMapObject = windll.kernel32.CreateFileMappingA(INVALID_HANDLE_VALUE, > None, PAGE_READONLY, 0, TABLE_SHMEMSIZE, szName) > if (hMapObject == 0): > print "OpenKey: Could not open name file mapping object" > raise WinError() > > self.pData = windll.kernel32.MapViewOfFile(hMapObject, > FILE_MAP_ALL_ACCESS, 0, 0, TABLE_SHMEMSIZE)
Without answering your question directly, why not use the stdlib mmap module, which does exactly this for you behind the scenes? Docs - http://docs.python.org/lib/module-mmap.html Example - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413807 TJG -- http://mail.python.org/mailman/listinfo/python-list