Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can store the data in an NTFS stream. That way you can get a real path pointing to your data that you can give to your dll in the form of</p> <pre><code>x:\myfile.exe:mystreamname </code></pre> <p>This works precisely like a normal file, however it only works if the file system used is NTFS. This is standard under Windows nowadays, but is of course not an option if you want to support older systems or would like to be able to run this from a usb-stick or similar. Note that any streams present in a file will be lost if the file is sent as an attachment in mail or simply copied from a NTFS partition to a FAT32 partition.</p> <p>I'd say that the most compatible way would be to write your data to an actual file, but you can of course do it one way on NTFS systems and another on FAT systems. I do recommend against it because of the added complexity. The appropriate way would be to distribute your files separately of course, but since you've indicated that you don't want this, you should in that case write it to a temporary file and give the dll the path to that file. Make sure you write the temporary file to the users' temp directory (you can find the path using <a href="http://msdn.microsoft.com/en-us/library/aa364992%28VS.85%29.aspx" rel="nofollow noreferrer">GetTempPath</a> in C/C++).</p> <p>Your other option would be to write a filesystem filter driver, but that is a road that I strongly advise against. That sort of defeats the purpose of using a single file as well...</p> <p>Also, in case you want only a single file for distribution, how about using a zip file or an installer?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload