不在.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 testfilen" ); else WriteFile( hFile, "This is testfile", 16, &dwRet, NULL ); hStream = CreateFile( "testfile:stream", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS,0, NULL ); if( hStream == INVALID_HANDLE_VALUE ) printf( "Cannot open testfile:streamn" ); else WriteFile(hStream, "This is testfile:stream", 23, &dwRet, NULL); }


