Click here to Skip to main content
14,826,717 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copy certain member variable data of a structure Pin
manoharbalu31-May-16 0:40
Membermanoharbalu31-May-16 0:40 
GeneralRe: Copy certain member variable data of a structure Pin
Richard MacCutchan31-May-16 0:47
mveRichard MacCutchan31-May-16 0:47 
AnswerRe: Copy certain member variable data of a structure Pin
Jochen Arndt31-May-16 1:43
professionalJochen Arndt31-May-16 1:43 
AnswerRe: Copy certain member variable data of a structure Pin
leon de boer31-May-16 3:59
Memberleon de boer31-May-16 3:59 
GeneralRe: Copy certain member variable data of a structure Pin
manoharbalu1-Jun-16 2:25
Membermanoharbalu1-Jun-16 2:25 
GeneralRe: Copy certain member variable data of a structure Pin
Bram van Kampen1-Jun-16 15:51
MemberBram van Kampen1-Jun-16 15:51 
GeneralRe: Copy certain member variable data of a structure Pin
manoharbalu1-Jun-16 20:02
Membermanoharbalu1-Jun-16 20:02 
GeneralRe: Copy certain member variable data of a structure Pin
leon de boer1-Jun-16 20:18
Memberleon de boer1-Jun-16 20:18 
I think you have already worked out the problem it is going to take you a lot of power to work out what has changed in the mapped file.

The best approach but the hardest would be to intercept the Writefile calls from the Model application since you don't have the code. The process is called IAT patching and you hook the model application write calls and simply send the data for each write call to your client before letting it drop thru to write to the mapfile as normal. There are a couple of IAT patching articles right here on Code Project. It obviously has the massive advantage that effectively it slows the model program down if your update dispatch is slowed and there is no searching to be done you are transmitting the changes as they are made. The downside is this is not something a novice can code it requires a level of experience.

The second alternative is to make an application that simply cycles around comparing the mapfile comparing the mapfile to a local copy of the last scan thru the file and transmitting changes as it encounters them. So you have a local copy of the mapfile as you last visited this position as you then find a change you hold the position in the file and then keep reading while you have differences. All you do then is send a simple structure File position, size of change, change data to the client. Then you continue back to looking for a changes. All the client does is grab a packet, move to the position given and copies the changed data. So the client copy just changes slowly to mirror the server mapfile at whatever rate the packets can be sent. This is how remote terminal services work sending your screen to another user.

The downside of the second alternative is you will often get your fields having part of current data and part old data. For you that is not to bad because you know the structure layout so you can probably carry field flags to indicate if they are currently half changed because you in the process of writing them.

Anyhow whichever technique you use this will not be a trivial task Smile | :)
In vino veritas

GeneralRe: Copy certain member variable data of a structure Pin
leon de boer2-Jun-16 19:31
Memberleon de boer2-Jun-16 19:31 
QuestionRe: Copy certain member variable data of a structure Pin
David Crow31-May-16 5:07
MemberDavid Crow31-May-16 5:07 
QuestionC++ Smartphone application, get data from MySQL Pin
PonSvens29-May-16 10:04
MemberPonSvens29-May-16 10:04 
AnswerRe: C++ Smartphone application, get data from MySQL Pin
CPallini29-May-16 20:58
mveCPallini29-May-16 20:58 
AnswerRe: C++ Smartphone application, get data from MySQL Pin
leon de boer29-May-16 22:53
Memberleon de boer29-May-16 22:53 
AnswerRe: C++ Smartphone application, get data from MySQL Pin
Richard MacCutchan30-May-16 1:16
mveRichard MacCutchan30-May-16 1:16 
GeneralRe: C++ Smartphone application, get data from MySQL Pin
leon de boer30-May-16 2:43
Memberleon de boer30-May-16 2:43 
GeneralRe: C++ Smartphone application, get data from MySQL Pin
Richard MacCutchan30-May-16 3:02
mveRichard MacCutchan30-May-16 3:02 
GeneralRe: C++ Smartphone application, get data from MySQL Pin
David Crow30-May-16 5:04
MemberDavid Crow30-May-16 5:04 
Question8Puzzle game Pin
Abdulrahman Mostafa24-May-16 16:31
MemberAbdulrahman Mostafa24-May-16 16:31 
AnswerRe: 8Puzzle game Pin
Richard MacCutchan24-May-16 21:56
mveRichard MacCutchan24-May-16 21:56 
QuestionRe: 8Puzzle game Pin
David Crow25-May-16 4:34
MemberDavid Crow25-May-16 4:34 
QuestionEdit Subitems In Owner Drawn List Pin
DanYELL23-May-16 4:58
MemberDanYELL23-May-16 4:58 
QuestionRe: Edit Subitems In Owner Drawn List Pin
Richard MacCutchan23-May-16 5:39
mveRichard MacCutchan23-May-16 5:39 
AnswerRe: Edit Subitems In Owner Drawn List Pin
DanYELL23-May-16 5:50
MemberDanYELL23-May-16 5:50 
GeneralRe: Edit Subitems In Owner Drawn List Pin
leon de boer23-May-16 6:02
Memberleon de boer23-May-16 6:02 
GeneralRe: Edit Subitems In Owner Drawn List Pin
Richard MacCutchan23-May-16 6:08
mveRichard MacCutchan23-May-16 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.