search for: file_attribute_normal

Displaying 20 results from an estimated 30 matches for "file_attribute_normal".

2016 Feb 09
2
Compilation failure using mingw-w64 and gcc-5.3.0
...ecode.c &&\ mv -f $depbase.Tpo $depbase.Po decode.c: In function 'DecoderSession_destroy': decode.c:270:5: error: unknown type name 'HANDLE' HANDLE fh = CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ^ decode.c:270:17: warning: implicit declaration of function 'CreateFile_utf8' [-Wimplicit-function-declaration] HANDLE fh = CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);...
2016 Feb 08
2
Compilation failure using mingw-w64 and gcc-5.3.0
Hello, Upon compiling the flac tree today, after many successful compilations over the last few weeks, a new error is appearing before compilation bails out. This is a cross-compilation using gcc-5.3.0 running on GNU/Linux, with the objects being built for a mingw-w64-x86_64 host. Among other things, the compiler is looking for windows_unicode_filenames.h but it isn't there. Also, I'm
2004 Aug 06
2
Please 30 second to look a my code
...der[WAVEHEADER]; HANDLE WaveFile; HANDLE SpeexFile; DWORD NrOfBytesRead, NrOfBytesWritten; char nrBytes = 0; int nbBytes = 0; int bit_rate, frame_size, test=0; bool first=true; WaveFile = CreateFile(_T("\\Temp\\tempsound.wav"), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); SpeexFile = CreateFile(_T("\\Temp\\tempsound.spx"), GENERIC_WRITE, 0, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); speex_bits_init(&bits); //init encoded bits buffer state = speex_encoder_init(&speex_nb_mode); //Init encoder in narrowband mode speex_encoder_...
2013 Apr 20
1
One tiny Windows Unicode patch
...44 --- a/src/share/grabbag/file.c +++ b/src/share/grabbag/file.c @@ -127,8 +127,8 @@ FLAC__bool grabbag__file_are_same(const char *f1, const char *f2) BY_HANDLE_FILE_INFORMATION info1, info2; HANDLE h1, h2; BOOL ok = 1; - h1 = CreateFile(f1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - h2 = CreateFile(f2, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + h1 = CreateFile_utf8(f1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + h2 = CreateFile_utf8(f2, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,...
2004 Aug 06
0
Please 30 second to look a my code
...exFile; > > DWORD NrOfBytesRead, NrOfBytesWritten; > > char nrBytes = 0; > int nbBytes = 0; > int bit_rate, frame_size, test=0; > bool first=true; > > WaveFile = CreateFile(_T("\\Temp\\tempsound.wav"), GENERIC_READ, 0, > NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); > SpeexFile = CreateFile(_T("\\Temp\\tempsound.spx"), GENERIC_WRITE, 0, > NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); > > speex_bits_init(&bits); //init encoded bits buffer > state = speex_encoder_init(&speex_nb_mode); //Init encoder in > na...
2011 Jun 20
2
How do i get file attributes using samba.
...in Windows share using samba. /* FileAttributesField */ #define FILE_ATTRIBUTE_READONLY???????? 0x001L #define FILE_ATTRIBUTE_HIDDEN?????????? 0x002L #define FILE_ATTRIBUTE_SYSTEM?????????? 0x004L #define FILE_ATTRIBUTE_DIRECTORY??????? 0x010L #define FILE_ATTRIBUTE_ARCHIVE????????? 0x020L #define FILE_ATTRIBUTE_NORMAL?????????? 0x080L #define FILE_ATTRIBUTE_TEMPORARY??????? 0x100L #define FILE_ATTRIBUTE_SPARSE?????????? 0x200L #define FILE_ATTRIBUTE_REPARSE_POINT??? 0x400L #define FILE_ATTRIBUTE_COMPRESSED?????? 0x800L #define FILE_ATTRIBUTE_OFFLINE????????? 0x1000L #define FILE_ATTRIBUTE_NONINDEXED?????? 0x2000...
2014 Sep 26
4
Patch to add buffering to decoding too
..._mode && !d->test_only && d->format != FORMAT_RAW) { +#ifdef _WIN32 + if(strcmp(outfilename, "-") && d->total_samples > 0) { + HANDLE fh = CreateFile_utf8(outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(fh != INVALID_HANDLE_VALUE) { + if (GetFileType(fh) == FILE_TYPE_DISK) { + LARGE_INTEGER size; + size.QuadPart = d->total_samples * d->channels * ((d->bps+7)/8) + 512; + if(d->foreign_metadata) { + size_t i; + for(i = d->format==FORMAT_RF64?2:1...
2014 Sep 27
0
Patch to add buffering to decoding too
...>fout && d->fout != stdout) { +#ifdef _WIN32 + if(!error_occurred) { + FLAC__off_t written_size = ftello(d->fout); + if(written_size > 0) { + HANDLE fh = CreateFile_utf8(d->outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(fh != INVALID_HANDLE_VALUE) { + if(GetFileType(fh) == FILE_TYPE_DISK) { + LARGE_INTEGER size; + size.QuadPart = written_size; + if(SetFilePointerEx(fh, size, NULL, FILE_CURRENT)) /* correct the file size */ + SetEndOfFile(fh); + } + CloseHandle(fh);...
2010 Mar 25
4
CreateFile \\\\.\\x: non-root
Hello, I have a usb data aquisition device interfaced by mass storage protocol. I open it like: hEcgDrive=CreateFile("\\\\.\\g:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_OVERLAPPED, NULL); for communication I use DeviceIoControl(hEcgDrive, IOCTL_SCSI_PASS_THROUGH_DIRECT, .... with a 'custom' scsi operation code as wrapper. On Wine-1.1.30. under UHU linux (2.6.23.9-1) the program can open t...
2011 Sep 03
1
Patch to build hivex lib on Windows
Hi I'm just posting this here in case someone is interested in building hivex on Windows (mingw32). The attached patch allows building the lib but not the tools (hivexsh etc..) as there are some more problems to solve. In short terms, this patch replaces file i/o functions and mmap(), munmap() with their win32api pendants. cu -- Unix _IS_ user friendly - it's just selective about
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com> Here are the patches that I've got queued up based on the very helpful feedback I received from people testing Syslinux 5.00-pre9. Unless anyone has any concerns these will make it into Syslinux 5.00-pre10. Matt Fleming (9): pxe: Don't call open_config() from the pxe core ldlinux: Print a warning if no config file is found
2003 Apr 10
0
Bug in Samba v2.2.8a with Windows API GetFileAttributes ?
....h> #include <iostream.h> int main (int argc, char** argv) { if (argc != 2) { cout << "Usage: test <pathname>" << endl; return 1; } const char* pn = argv[1]; DWORD rc = GetFileAttributes(pn); if (0xFFFFFFFF != rc && (rc & (FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY)) && !(rc & (FILE_ATTRIBUTE_DIRECTORY))) { cout << " SUCCESS: pathname [" << pn << "] is a file! rc=" << hex << rc << endl; return 0; } else { cout <...
2003 Sep 24
0
CreateFile for EXE images vs other files
This question isn't directly Samba related, but Samba has helped me figure out part of the problem. When I CreateFile on an existing file like so: CreateFile(FileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); Samba shows that I have the file opened with this type of lock DENY_NONE 0x20089 RDONLY When the file is locked in this manner, I am unable to rename the file. However, Windows launches executables over Samba shares with the lock: DENY_WRITE 0x20 RDONLY I have tried to mim...
2008 Mar 06
4
dot matrix POS parallel printer problems
I have a application that writes to the LPT1 directly, in wine there is a lot of missing characters in the printout, in the console printing to /dev/lp0 works ok. I'm using puppy linux. Any help welcome. Thank you
2010 Jan 07
2
[Announce] Samba 3.5.0rc1 Available for Download
...ba.org> * BUG 6837: Fix "Too many open files" when trying to access large number of files with Windows 7. * BUG 6939: Fix long filenames when "mangling method" is set to "hash". * BUG 7020: Fix smbd using 2G memory. * Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned attributes by protocol level. * Vector correctly through reply_openerror() (which uses the same logic). * Fix bugs with the full Windows ACL support. o Kai Blin <kai at samba.org> * Add a few missing gettext calls to the 'net' command....
2010 Jan 07
2
[Announce] Samba 3.5.0rc1 Available for Download
...ba.org> * BUG 6837: Fix "Too many open files" when trying to access large number of files with Windows 7. * BUG 6939: Fix long filenames when "mangling method" is set to "hash". * BUG 7020: Fix smbd using 2G memory. * Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned attributes by protocol level. * Vector correctly through reply_openerror() (which uses the same logic). * Fix bugs with the full Windows ACL support. o Kai Blin <kai at samba.org> * Add a few missing gettext calls to the 'net' command....
2014 Sep 26
0
Patch to add buffering to decoding too
..._mode && !d->test_only && d->format != FORMAT_RAW) { +#ifdef _WIN32 + if(strcmp(outfilename, "-") && d->total_samples > 0) { + HANDLE fh = CreateFile_utf8(outfilename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(fh != INVALID_HANDLE_VALUE) { + if (GetFileType(fh) == FILE_TYPE_DISK) { + LARGE_INTEGER size, pos; + + size.QuadPart = d->total_samples * d->channels * ((d->bps+7)/8) + 512; + if(d->foreign_metadata) { + size_t i; + for(i = d->format==FORMAT_R...
2014 Sep 26
3
Patch to add buffering to decoding too
Can you please wrap the setvbuf in _WIN32 IFDEFs too? Currently memory usage of FLAC decoding is about 1MB, so this patch is increasing memory usage tenfold, also for platforms that do not need this. It is a non-problem on my system anyway. Op 26-09-14 om 10:36 schreef Janne Hyv?rinen: > I made some changes to the previous patch. I don't know why I > originally didn't put the
2014 Sep 25
2
Patch to add buffering to decoding too
Decoding flac files is also prone to producing fragmented files. NTFS has the ability to completely avoid fragmentation if it is told the file size before hand, but that would require using special Windows-only functions. Increasing the write buffer from the default 512 bytes to 10 MB already reduces the problem tremendously. -------------- next part -------------- diff --git
2007 Feb 05
0
[SAMBA-SECURITY] CVE-2007-0452: Potential DoS against smbd in Samba 3.0.6 - 3.0.23d
...*conn, char *fname, uint32 dirtype, BOOL bad_path, BOOL check_is_at_open) +NTSTATUS can_delete(connection_struct *conn, char *fname, uint32 dirtype, BOOL bad_path, BOOL check_is_at_open, BOOL can_defer) { SMB_STRUCT_STAT sbuf; uint32 fattr; @@ -1938,7 +1938,7 @@ FILE_OPEN, 0, FILE_ATTRIBUTE_NORMAL, - 0, + can_defer ? 0 : INTERNAL_OPEN_ONLY, NULL); if (!fsp) { @@ -1960,7 +1960,7 @@ code. ****************************************************************************/ -NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype, char *name, BOOL has_wild) +NTSTATUS u...