Click here to Skip to main content
15,884,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MCI -> set video position at a specific time Pin
Hamid_RT10-Oct-07 7:09
Hamid_RT10-Oct-07 7:09 
GeneralRe: MCI -> set video position at a specific time Pin
sdancer7510-Oct-07 20:00
sdancer7510-Oct-07 20:00 
GeneralRe: MCI -> set video position at a specific time Pin
Hamid_RT10-Oct-07 21:32
Hamid_RT10-Oct-07 21:32 
QuestionMultiline textout Pin
vSteve9-Oct-07 3:44
vSteve9-Oct-07 3:44 
AnswerRe: Multiline textout Pin
Chris Losinger9-Oct-07 3:51
professionalChris Losinger9-Oct-07 3:51 
GeneralRe: Multiline textout Pin
vSteve9-Oct-07 4:20
vSteve9-Oct-07 4:20 
GeneralRe: Multiline textout Pin
led mike9-Oct-07 5:02
led mike9-Oct-07 5:02 
QuestionBuffer Overrun Pin
LCI9-Oct-07 2:33
LCI9-Oct-07 2:33 
I have a buffer overrun problem that i am not 100% sure of the best way to fix it. If someone can give me some direction i would appreciate it.

I have the following :
Two structs with fields of different values that i am attempting to StrCpy();

typedef struct _myInfo
{
TCHAR szOwnerLastName[64];
TCHAR szOwnerFirstName[64];
} MyInfo;

typedef struct _otherInfo
{
TCHAR szOwnerLastName[32];
TCHAR szOwnerFirstName[32];
} OtherInfo;

MyInfo* pMyInfo;
OtherInfo* pOtherInfo;

After populating these fields, here is what i find:
If i do a :

StrCpy(pOtherInfo->szOwnerLastName, pMyInfo->szOwnerLastName);

Since MyInfo is bigger than OtherInfo, the above statement basically writes into the OtherInfo's Firstname field.

Is there a nice way to get around this? I cannot change the field sizes for either structure.
Thanks,
cw
AnswerRe: Buffer Overrun Pin
David Crow9-Oct-07 2:51
David Crow9-Oct-07 2:51 
AnswerRe: Buffer Overrun Pin
Stephen Hewitt9-Oct-07 12:29
Stephen Hewitt9-Oct-07 12:29 
QuestionDirectX - Generall Question Pin
GermanGeorge9-Oct-07 2:05
GermanGeorge9-Oct-07 2:05 
AnswerRe: DirectX - Generall Question Pin
El Corazon9-Oct-07 15:17
El Corazon9-Oct-07 15:17 
GeneralRe: DirectX - Generall Question Pin
GermanGeorge9-Oct-07 20:37
GermanGeorge9-Oct-07 20:37 
GeneralRe: DirectX - Generall Question Pin
El Corazon10-Oct-07 4:04
El Corazon10-Oct-07 4:04 
GeneralRe: DirectX - Generall Question Pin
GermanGeorge10-Oct-07 22:11
GermanGeorge10-Oct-07 22:11 
QuestionNot Getting picture in Picture in Picture Control Pin
GauranG Shah9-Oct-07 1:45
GauranG Shah9-Oct-07 1:45 
AnswerRe: Not Getting picture in Picture in Picture Control Pin
chandu0049-Oct-07 3:33
chandu0049-Oct-07 3:33 
AnswerRe: Not Getting picture in Picture in Picture Control Pin
Roger Broomfield9-Oct-07 6:03
Roger Broomfield9-Oct-07 6:03 
QuestionStop USB Devices Pin
VC_RYK9-Oct-07 1:39
VC_RYK9-Oct-07 1:39 
QuestionRe: Stop USB Devices Pin
David Crow9-Oct-07 2:52
David Crow9-Oct-07 2:52 
AnswerRe: Stop USB Devices Pin
VC_RYK9-Oct-07 18:56
VC_RYK9-Oct-07 18:56 
GeneralRe: Stop USB Devices Pin
aks.9-Oct-07 19:33
aks.9-Oct-07 19:33 
AnswerRe: Stop USB Devices Pin
ram.Jaddu9-Oct-07 23:11
ram.Jaddu9-Oct-07 23:11 
Questionmsdn files are affected Pin
prithaa9-Oct-07 1:22
prithaa9-Oct-07 1:22 
AnswerRe: msdn files are affected Pin
chandu0049-Oct-07 3:18
chandu0049-Oct-07 3:18 

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.