Click here to Skip to main content
15,906,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to read japanese string from the string table (.rc file). Pin
ThatsAlok19-May-08 1:22
ThatsAlok19-May-08 1:22 
QuestionUsing multithreading to log... Pin
pl_kode18-May-08 19:57
pl_kode18-May-08 19:57 
AnswerRe: Using multithreading to log... Pin
Cedric Moonen18-May-08 20:17
Cedric Moonen18-May-08 20:17 
GeneralRe: Using multithreading to log... Pin
pl_kode18-May-08 20:46
pl_kode18-May-08 20:46 
AnswerRe: Using multithreading to log... Pin
pl_kode18-May-08 22:39
pl_kode18-May-08 22:39 
QuestionRe: Using multithreading to log... Pin
Rajkumar R18-May-08 23:22
Rajkumar R18-May-08 23:22 
QuestionRe: Using multithreading to log... Pin
CPallini18-May-08 23:17
mveCPallini18-May-08 23:17 
QuestionRead one struct,write to another struct. Pin
Anu_Bala18-May-08 19:23
Anu_Bala18-May-08 19:23 
Hi Im having two structures as follow
struct TagModel
{
float SPV [900];
float SPV1 [900];
float IPV [900];
float ISV[900];
};
struct Mystruct
{
float SPV [900];
float SPV1 [900];
}

From first structure, just i need only first two variables,and values of all varaibles are stored in shared memory. I used BELOW coding to read from first strucutre and write to my strucuture.
htBackTrackFile = FileName;
no_bt = 1;
struct Mystruct *temp;
temp = (struct Mystruct*) malloc(sizeof(struct Mystruct));

DWORD fp = SetFilePointer( htBackTrackFile, (no_bt * sizeof(struct TagModel)) + 10,NULL,(DWORD)FILE_BEGIN );
Flag = ReadProcessMemory((HANDLE)GetCurrentProcess(),(struct TagModel*)First,temp, (DWORD)sizeof(struct Mystruct),(LPDWORD)&ReturnVal );
WriteFile( htBackTrackFile,temp,(DWORD)sizeof(struct Mystruct), (LPDWORD&ReturnVal,(LPOVERLAPPED)NULL );

When i check this in debug mode...it shows as

First->SPV[1] = 50.000 //Its the correct value. from Fisrt TagModel struct

But mystruct writes as
temp->SPV[1] = 4.50000 .

Where is the problem..totally it shows very different value.

Is it the correct way to read very few member varaibles from one main structure to another strucute???

Anu

AnswerRe: Read one struct,write to another struct. Pin
chandu00418-May-08 19:49
chandu00418-May-08 19:49 
AnswerRe: Read one struct,write to another struct. Pin
Rajkumar R18-May-08 21:08
Rajkumar R18-May-08 21:08 
Question[RESOLVED]Creating Toolbar [modified] Pin
Priya_Sundar18-May-08 18:58
Priya_Sundar18-May-08 18:58 
AnswerRe: Creating Toolbar Pin
ShilpiP18-May-08 19:53
ShilpiP18-May-08 19:53 
AnswerRe: Creating Toolbar Pin
Rajkumar R18-May-08 20:53
Rajkumar R18-May-08 20:53 
General[RESOLVED]: Thanks Pin
Priya_Sundar19-May-08 0:57
Priya_Sundar19-May-08 0:57 
QuestionHow to return COM object? Pin
RYU^^18-May-08 18:13
RYU^^18-May-08 18:13 
AnswerRe: How to return COM object? Pin
RYU^^18-May-08 20:15
RYU^^18-May-08 20:15 
Questioninteger value in editbox Pin
Mohanraj D18-May-08 18:12
Mohanraj D18-May-08 18:12 
AnswerRe: integer value in editbox Pin
Hamid_RT18-May-08 18:17
Hamid_RT18-May-08 18:17 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:07
Mohanraj D18-May-08 19:07 
GeneralRe: integer value in editbox Pin
Hamid_RT18-May-08 19:17
Hamid_RT18-May-08 19:17 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:31
Mohanraj D18-May-08 19:31 
AnswerRe: integer value in editbox Pin
Paresh Chitte18-May-08 19:07
Paresh Chitte18-May-08 19:07 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:27
Mohanraj D18-May-08 19:27 
GeneralRe: integer value in editbox Pin
Paresh Chitte18-May-08 19:54
Paresh Chitte18-May-08 19:54 
GeneralRe: integer value in editbox Pin
Hamid_RT18-May-08 20:10
Hamid_RT18-May-08 20:10 

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.