Click here to Skip to main content
14,739,661 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows CBT Hooks Pin
Richard MacCutchan15-Apr-20 7:05
mveRichard MacCutchan15-Apr-20 7:05 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6415-Apr-20 9:01
professionalRichard Andrew x6415-Apr-20 9:01 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 1:21
Memberleon de boer16-Apr-20 1:21 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6416-Apr-20 3:53
professionalRichard Andrew x6416-Apr-20 3:53 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 5:02
Memberleon de boer16-Apr-20 5:02 
GeneralRe: Windows CBT Hooks Pin
Richard Andrew x6416-Apr-20 7:12
professionalRichard Andrew x6416-Apr-20 7:12 
GeneralRe: Windows CBT Hooks Pin
leon de boer16-Apr-20 7:25
Memberleon de boer16-Apr-20 7:25 
QuestionAccessing HDD drive Pin
_Flaviu14-Apr-20 10:32
Member_Flaviu14-Apr-20 10:32 
How is the way to open a HDD drive with _open function in such a way to read even the boot section of this drive ? Here is the code:

int hd_h = _open(device, O_BINARY | O_RDWR | O_EXCL);


device is provided with
"\\\\?\\E:"


This is the code from ntfs library GitHub - vitalif/ntfs-3g: Fork of git://ntfs-3g.git.sourceforge.net/gitroot/ntfs-3g/ntfs-3g with FIEMAP support patch[^]

Why I am asking that ? Even if _open return 3, further more, the reading of boot section has failed.

Function
ntfs_boot_sector_is_ntfs
say that my boot device is not NTFS:

if (! ntfs_boot_sector_is_ntfs(bs))
{
    errno = EINVAL;
    goto error_exit;
}


BOOL ntfs_boot_sector_is_ntfs(NTFS_BOOT_SECTOR* b)
{
	u32 i;
	BOOL ret = FALSE;
	ntfs_log_debug("Beginning bootsector check.\n");

	ntfs_log_debug("Checking OEMid, NTFS signature.\n");
	if (b->oem_id != const_cpu_to_le64(0x202020205346544eULL))	// "NTFS    "
	{
		ntfs_log_error("NTFS signature is missing.\n");  // <--- my code run by here
		goto not_ntfs;
	}
....


Of course, this debugging session ran as admin mode.
GeneralRe: Accessing HDD drive Pin
Richard MacCutchan14-Apr-20 22:14
mveRichard MacCutchan14-Apr-20 22:14 
GeneralRe: Accessing HDD drive Pin
_Flaviu16-Apr-20 8:23
Member_Flaviu16-Apr-20 8:23 
GeneralRe: Accessing HDD drive Pin
Richard MacCutchan16-Apr-20 10:28
mveRichard MacCutchan16-Apr-20 10:28 
GeneralRe: Accessing HDD drive Pin
Member 798912216-Apr-20 11:57
MemberMember 798912216-Apr-20 11:57 
GeneralRe: Accessing HDD drive Pin
JudyL_MD17-Apr-20 5:48
MemberJudyL_MD17-Apr-20 5:48 
GeneralRe: Accessing HDD drive Pin
_Flaviu19-Apr-20 3:32
Member_Flaviu19-Apr-20 3:32 
GeneralRe: Accessing HDD drive Pin
Richard MacCutchan19-Apr-20 4:01
mveRichard MacCutchan19-Apr-20 4:01 
GeneralRe: Accessing HDD drive Pin
Richard MacCutchan19-Apr-20 4:25
mveRichard MacCutchan19-Apr-20 4:25 
GeneralRe: Accessing HDD drive Pin
_Flaviu19-Apr-20 9:48
Member_Flaviu19-Apr-20 9:48 
GeneralRe: Accessing HDD drive Pin
JudyL_MD19-Apr-20 5:31
MemberJudyL_MD19-Apr-20 5:31 
Questionvoid type Pin
CalinNegru(fearless_)10-Apr-20 23:20
MemberCalinNegru(fearless_)10-Apr-20 23:20 
AnswerRe: void type Pin
Richard MacCutchan10-Apr-20 23:25
mveRichard MacCutchan10-Apr-20 23:25 
GeneralRe: void type Pin
CalinNegru(fearless_)10-Apr-20 23:44
MemberCalinNegru(fearless_)10-Apr-20 23:44 
GeneralRe: void type Pin
Richard MacCutchan11-Apr-20 0:18
mveRichard MacCutchan11-Apr-20 0:18 
GeneralRe: void type Pin
Member 798912211-Apr-20 2:22
MemberMember 798912211-Apr-20 2:22 
GeneralRe: void type Pin
CalinNegru(fearless_)11-Apr-20 11:25
MemberCalinNegru(fearless_)11-Apr-20 11:25 
GeneralRe: void type Pin
Member 798912211-Apr-20 12:36
MemberMember 798912211-Apr-20 12:36 

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.