alternate-data-stream

NTFS Alternate Data Streams - .NET [closed]

淺唱寂寞╮ 提交于 2019-11-26 10:23:10
How would I create/ delete/ read/ write/ NTFS alternate data streams from .NET? If there is no native .NET support, which Win32 API's would I use? Also, how would I use them, as I don't think this is documented? Not in .NET: http://support.microsoft.com/kb/105763 #include <windows.h> #include <stdio.h> void main( ) { HANDLE hFile, hStream; DWORD dwRet; hFile = CreateFile( "testfile", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, 0, NULL ); if( hFile == INVALID_HANDLE_VALUE ) printf( "Cannot open testfile\n" ); else WriteFile( hFile, "This is testfile", 16, &dwRet, NULL ); hStream =

Unblock File from within .net 4 c#

佐手、 提交于 2019-11-26 07:31:30
问题 Is there a possibility to unblock a file that is downloaded from the internet from within a c# program. Surfing the internet I have learned, that the information is written in an alternative stream of a (NTFS) file that contains the current zone information (value 3 is from the internet and is interpreted as blocked). Is there a managed possiblity to either clear or change the zone information (unblock) of a file or is there a managed copy function that copies the files without the zone

NTFS Alternate Data Streams - .NET [closed]

限于喜欢 提交于 2019-11-26 01:58:34
问题 How would I create/ delete/ read/ write/ NTFS alternate data streams from .NET? If there is no native .NET support, which Win32 API\'s would I use? Also, how would I use them, as I don\'t think this is documented? 回答1: Not in .NET: http://support.microsoft.com/kb/105763 #include <windows.h> #include <stdio.h> void main( ) { HANDLE hFile, hStream; DWORD dwRet; hFile = CreateFile( "testfile", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, 0, NULL ); if( hFile == INVALID_HANDLE_VALUE )