//No, I don't write in a file ... I just read from a file.If the state is changed it is set in the struct object.

But... if you have 100 records and 100 doors, how are you telling the doors their states?
Imho, you need OR load state of the door in every action of door (read all file and search needed state), OR store all records in operative memory, and spread doors/states from here


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro