Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I get the handle of a dialog in Visual C Pin
Maximilien10-Jun-09 4:39
Maximilien10-Jun-09 4:39 
GeneralRe: How do I get the handle of a dialog in Visual C Pin
jonsey2984710-Jun-09 7:17
jonsey2984710-Jun-09 7:17 
GeneralRe: How do I get the handle of a dialog in Visual C Pin
Maximilien10-Jun-09 7:24
Maximilien10-Jun-09 7:24 
QuestionRe: How do I get the handle of a dialog in Visual C Pin
jonsey2984710-Jun-09 7:32
jonsey2984710-Jun-09 7:32 
AnswerRe: How do I get the handle of a dialog in Visual C Pin
David Crow10-Jun-09 7:38
David Crow10-Jun-09 7:38 
AnswerRe: How do I get the handle of a dialog in Visual C Pin
ali kanju10-Jun-09 18:43
ali kanju10-Jun-09 18:43 
AnswerRe: How do I get the handle of a dialog in Visual C Pin
sujeet10-Jun-09 20:42
sujeet10-Jun-09 20:42 
QuestionHow to read footer at a particular sector using C++/VC++ Pin
Shiv Murti Pal10-Jun-09 2:54
Shiv Murti Pal10-Jun-09 2:54 
hi all,
i am creating an application in which i need to read the data at a particular sector for that i am using following code


Handle hCD = CreateFile (phydisk, //physical disk
GENERIC_READ ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
NULL);

if (hCD != INVALID_HANDLE_VALUE)
{
DWORD dwSize = total_sector * 512;
__int64 y=512*start_sector;

__int64 ss=myFileSeek(hCD,y,FILE_BEGIN);

int aa;
aa = ReadFile (hCD, buffer, dwSize, &dwNotUsed, NULL);
}


now i am able to see data in buffer untill the 0x00 comes in data

for example :- there is given a sector below

Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F

00094B000 FF D8 FF E1 11 B4 45 78 69 66 00 00 49 49 2A 00 ÿØÿá.´Exif..II*.
00094B010 08 00 00 00 0F 00 0F 01 02 00 0E 00 00 00 C2 00 ..............Â.
00094B020 00 00 10 01 02 00 06 00 00 00 D0 00 00 00 1A 01 ..........Ð.....
00094B030 05 00 01 00 00 00 D6 00 00 00 1B 01 05 00 01 00 ......Ö.........
00094B040 00 00 DE 00 00 00 28 01 03 00 01 00 00 00 02 00 ..Þ...(.........
00094B050 1B 9B 31 01 02 00 25 00 00 00 E6 00 00 00 32 01 .›1...%...æ...2.
00094B060 02 00 14 00 00 00 0C 01 00 00 13 02 03 00 01 00 ................
00094B070 00 00 02 00 2A 4F 69 87 04 00 01 00 00 00 28 01 ....*Oi‡......(.
00094B080 00 00 01 A4 03 00 01 00 00 00 00 00 AA 82 02 A4 ...¤........ª‚.¤
00094B090 03 00 01 00 00 00 00 00 75 3B 03 A4 03 00 01 00 ........u;.¤....
00094B0A0 00 00 01 00 5F 45 04 A4 05 00 01 00 00 00 20 01 ...._E.¤...... .
00094B0B0 00 00 06 A4 03 00 01 00 00 00 03 00 9E 8B 0C A4 ...¤........ž‹.¤
00094B0C0 03 00 01 00 00 00 03 00 68 D7 22 02 00 00 53 6F ........h×"...So
00094B0D0 6E 79 20 45 72 69 63 73 73 6F 6E 00 4B 37 35 30 ny Ericsson.K750
00094B0E0 69 00 48 00 00 00 01 00 00 00 48 00 00 00 01 00 i.H.......H.....
00094B0F0 00 00 52 31 44 42 30 30 31 20 20 20 20 20 70 72 ..R1DB001 pr
00094B100 67 43 58 43 31 32 35 39 35 32 5F 45 55 5F 31 5F gCXC125952_EU_1_
00094B110 43 4C 20 35 2E 33 00 82 32 30 30 38 3A 30 32 3A CL 5.3.‚2008:02:
00094B120 32 33 20 30 37 3A 35 34 3A 34 38 00 64 00 00 00 23 07:54:48.d...
00094B130 64 00 00 00 0F 00 9A 82 05 00 01 00 00 00 E2 01 d.....š‚......â.
00094B140 00 00 9D 82 05 00 01 00 00 00 EA 01 00 00 27 88 ..‚......ê...'ˆ
00094B150 03 00 01 00 00 00 64 00 3F FB 00 90 07 00 04 00 ......d.?û.....
00094B160 00 00 30 32 32 30 03 90 02 00 14 00 00 00 F2 01 ..0220.......ò.
00094B170 00 00 04 90 02 00 14 00 00 00 06 02 00 00 01 91 ..............‘
00094B180 07 00 04 00 00 00 01 02 03 00 04 92 0A 00 01 00 ...........’....
00094B190 00 00 1A 02 00 00 07 92 03 00 01 00 00 00 02 00 .......’........
00094B1A0 79 6A 08 92 03 00 01 00 00 00 02 00 CA FF 09 92 yj.’........Êÿ.’
00094B1B0 03 00 01 00 00 00 00 00 49 6D 00 A0 07 00 04 00 ........Im. ....
00094B1C0 00 00 30 31 30 30 01 A0 03 00 01 00 00 00 01 00 ..0100. ........
00094B1D0 88 B4 02 A0 04 00 01 00 00 00 C8 04 00 00 03 A0 ˆ´. ......È.... 
00094B1E0 04 00 01 00 00 00 60 06 00 00 00 00 00 00 01 00 ......`.........
00094B1F0 00 00 28 00 00 00 1C 00 00 00 0A 00 00 00 32 30 ..(...........20




but i am able to read data in buffer only


Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F

00094B000 FF D8 FF E1 11 B4 45 78 69 66


but when i write data using foolowing code it write full data

value = WriteFile(
hFile, // handle to file
buffer, // data buffer
20*512, // number of bytes to write
nbytes, // number of bytes written
NULL // overlapped buffer
);



where is i am doing mistake and how to do it

plese help me
QuestionRe: How to read footer at a particular sector using C++/VC++ Pin
David Crow10-Jun-09 4:29
David Crow10-Jun-09 4:29 
AnswerRe: How to read footer at a particular sector using C++/VC++ Pin
«_Superman_»10-Jun-09 5:24
professional«_Superman_»10-Jun-09 5:24 
AnswerRe: How to read footer at a particular sector using C++/VC++ Pin
Randor 10-Jun-09 6:26
professional Randor 10-Jun-09 6:26 
GeneralRe: How to read footer at a particular sector using C++/VC++ Pin
Shiv Murti Pal26-Jun-09 0:13
Shiv Murti Pal26-Jun-09 0:13 
QuestionCRichEditDoc in normal SDI application Pin
Tomas(cz)10-Jun-09 2:06
Tomas(cz)10-Jun-09 2:06 
QuestionCWebBrowser2, only one on one dialog? Pin
includeh1010-Jun-09 2:03
includeh1010-Jun-09 2:03 
AnswerRe: CWebBrowser2, only one on one dialog? Pin
_AnsHUMAN_ 10-Jun-09 2:12
_AnsHUMAN_ 10-Jun-09 2:12 
GeneralRe: CWebBrowser2, only one on one dialog? Pin
includeh1010-Jun-09 3:01
includeh1010-Jun-09 3:01 
QuestionEntering OnPaint too many times Pin
transoft10-Jun-09 2:00
transoft10-Jun-09 2:00 
AnswerRe: Entering OnPaint too many times Pin
includeh1010-Jun-09 2:09
includeh1010-Jun-09 2:09 
GeneralRe: Entering OnPaint too many times Pin
transoft10-Jun-09 3:53
transoft10-Jun-09 3:53 
GeneralRe: Entering OnPaint too many times Pin
Alan Balkany10-Jun-09 4:13
Alan Balkany10-Jun-09 4:13 
QuestionHide EXE from Process of Task Manager using C++ Pin
tns_ranjith10-Jun-09 1:57
tns_ranjith10-Jun-09 1:57 
AnswerRe: Hide EXE from Process of Task Manager using C++ Pin
includeh1010-Jun-09 2:10
includeh1010-Jun-09 2:10 
AnswerRe: Hide EXE from Process of Task Manager using C++ Pin
Rajesh R Subramanian10-Jun-09 2:12
professionalRajesh R Subramanian10-Jun-09 2:12 
AnswerRe: Hide EXE from Process of Task Manager using C++ Pin
_AnsHUMAN_ 10-Jun-09 2:29
_AnsHUMAN_ 10-Jun-09 2:29 
QuestionRe: Hide EXE from Process of Task Manager using C++ Pin
«_Superman_»10-Jun-09 5:26
professional«_Superman_»10-Jun-09 5:26 

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.