Guest_imported
New member
- Jan 1, 1970
- 0
Hallo,
I have a problem with the following source:
typedef struct _TEST1 {
LPTSTR lpStr1;
DWORD cbStr1;
} TEST1, FAR *LPTEST1; LPTEST1 lpTest
LPTSTR RetVal RetVal = "...";
strcpy( lpTest->lpStr1, RetVal);
lpTest->cbStr1= strlen (RetVal) * sizeof(BYTE);
What's wrong with it, because the debugger jumps to:
-> strcpy( lpTest->lpStr1, RetVal);
with Access Violation at 0xC0000005
and if I run the application:
Access Violation in
KRNL386.EXE at 0001:00008614.
Register:
EAX=00004c00 CS=013f EIP=00008614 EFLGS=00010212
EBX=00558d03 SS=0167 ESP=0065fb0a EBP=0065fb0e
ECX=cccccccc DS=0157 ESI=818740b8 FS=558f
EDX=00780c10 ES=0167 EDI=0065fdf8 GS=0000
Bytes at CS:EIP:
87 5e fc 8e 5e fe 50 9c 58 f6 c4 02 58 75 01 fb
...
Bye Tim
I have a problem with the following source:
typedef struct _TEST1 {
LPTSTR lpStr1;
DWORD cbStr1;
} TEST1, FAR *LPTEST1; LPTEST1 lpTest
LPTSTR RetVal RetVal = "...";
strcpy( lpTest->lpStr1, RetVal);
lpTest->cbStr1= strlen (RetVal) * sizeof(BYTE);
What's wrong with it, because the debugger jumps to:
-> strcpy( lpTest->lpStr1, RetVal);
with Access Violation at 0xC0000005
and if I run the application:
Access Violation in
KRNL386.EXE at 0001:00008614.
Register:
EAX=00004c00 CS=013f EIP=00008614 EFLGS=00010212
EBX=00558d03 SS=0167 ESP=0065fb0a EBP=0065fb0e
ECX=cccccccc DS=0157 ESI=818740b8 FS=558f
EDX=00780c10 ES=0167 EDI=0065fdf8 GS=0000
Bytes at CS:EIP:
87 5e fc 8e 5e fe 50 9c 58 f6 c4 02 58 75 01 fb
...
Bye Tim