Re: [Linux-NTFS-Dev] Use Libntfs in Windows program?
Development moved to https://sourceforge.net/projects/ntfs-3g/
Brought to you by:
antona,
cha0smaster
From: Christophe G. <gr...@cg...> - 2006-05-24 06:17:31
|
On Tue, 23 May 2006, zgrp unknow wrote: > Hi Christophe, > > Sorry for long delay, I were in exams time at > university.... > > --- Christophe GRENIER <gr...@cg...> > On > > >> If you don't want to use cygwin, the best >> alternative is to use mingw compiler. > > I started my project (already made some parts) using > MSVC++ 6.0, and I know many codes have differences in > compiling from mingw and MSVC++ 6.0. Do you already > tryed to compile in this? > >> TestDisk can be compiled using cygwin or >> using mingw but libntfs doesn't compile with mingw. > > Well, but TestDisk use libntfs not? So you have ported > libntfs to compile into windows (mingw), right? libntfs compiles fine using cygwin, it doesn't with mingw and I think it will compile with MSVC++. I think it's easier to port libntfs to mingw than to MSVC or even easier use cygwin! >> To port libntfs to mingw, you can modify >> include/ntfs/compat.h >> - add the missing declarations, something like >> #ifdef HAVE_WINERROR_H >> #include <winerror.h> >> #endif >> #ifndef EOPNOTSUPP >> #define EOPNOTSUPP WSAEOPNOTSUPP >> #endif >> #ifndef EOVERFLOW >> # define EOVERFLOW E2BIG >> #endif >> - add "compat.h" to libntfs/*.c that need it > > Thank you. I will take a look at your code first. :) > >> But do you really need libntfs to parse the MFT ? > > Well, I just need a library that allow me to open the > harddisk into Windows in low-level > (CreateFile(=93////.//PhysicalDrive0=94, GENERIC_READ, > FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, > OPEN_EXISTING, 0, NULL) or equivalent and parse it). > > Should be good too if it could read (identify the > backup attribute) ADS files in NTFS. :) To list NTFS files, you really need libntfs if you open PhysicalDrive0. But there are Windows functions to list files that doesn't require direct disk access. >> If you only need an example of direct disk access, >> TestDisk has its own implementation of >> ntfs_device_default_io_ops. > > What are you saying is that TestDisk have a > ntfs_device_default_io_ops() function that allow to > read in this low-level windows files? :) > > Have any part of your TestDisk that make a loop though > HardDisk in low level to "list all files" ? If yes, > can you provide me the name of file and function? No, TestDisk uses libntfs for that purpose. Regards, Christophe ----------------------------------------------------------------- ,-~~-.___. ._. / | ' \ | |"""""""""| -=3D GRENIER Christophe =3D- ( ) 0 | | | \_/-, ,----' | | | =3D=3D=3D=3D !_!--v---v--" http://www.cgsecurity.org / \-'~; |""""""""| / __/~| ._-""|| | Email: gr...@cg... =3D( _____|_|____||________| ----------------------------------------------------------------- |