Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:16:27+00:00 2026-06-03T12:16:27+00:00

I’d like to be able to use an alternate data stream to store some

  • 0

I’d like to be able to use an alternate data stream to store some synchronization information for files that are referenced in a database application I’m building.

However, every approach I’ve found on the web has failed in one way or another. Not being experienced at Win32 API programming I’m not sure why the failures are occurring. In some cases the method calls appear to succeed, only no alternate stream is created (i.e., I can’t later read from the alternate file, nor can AlternateStreamViewer see it). In other cases the write succeeds, but the read fails because calling CreateFile() results in an invalid SafeFileHandle.

At this point I’d just like to find some working code. Or be advised that “ya can’t get there from here”. In which case I’ll use another, less attractive option (e.g., encode the sync/reference information in the filename itself, and hope no one ever changes a file name).


I understand the request for what approaches I tried. But there were quite a few (I spent hours on this), and I was really interested in learning about offerings I hadn’t tried.

However, you’re right that it would’ve helped, as it turns out I was using one of the approaches — the Trinet one referred to below — incorrectly. I think the problem was that I hadn’t yet created the “base” file for which I was trying to save an alternate stream.

Here are links to the code bases I tried:

  • St. Croix Skipper
  • DevDump
  • Trinet
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:16:29+00:00Added an answer on June 3, 2026 at 12:16 pm

    I’ve had success on Windows 7 x64 using this library:

    https://github.com/hubkey/Trinet.Core.IO.Ntfs

    I can’t find my old code, and the documentation page I have bookmarked is down at the moment, so I’ll try to post some code when it’s back up if you’re still having problems.

    Edit:
    Apparently it’s as simple as:

    using Trinet.Core.IO.Ntfs;
    
    var fileInfo = new FileInfo(@"C:\path\to\file.dat");
    if (AlternateDataStreamExists("MyStreamName"))
    {
        var alternateStream = fileInfo.GetAlternateDataStream("MyStreamName").OpenRead();
    }
    else
    {
        var alternateStream = fileInfo.GetAlternateDataStream("MyStreamName").OpenWrite();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like to count the length of a string with PHP. The string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.