First: maybe this is an XY-Problem: what I am really trying to solve is a poor-man's protection scheme against spying on our source code. We are using HALCON (an image processing library) in a C# project; The thing is that the HALCON parts are stored as plain source and are compiled/collected by the DLL only at the start of the program when you tell it where the source is. My intention is to have the source in encrypted form on disk and load/decrypt it to a part of memory at the start of the program prior to initialising the DLL. The idea is to deny access to the source through the file system (plugging in an USB stick and copying) - I am aware that this is a rather weak form of protection, if I am missing some obvious and superior way, please report.
I have been looking into RAM-Disks but these don't help in protecting as the application is on 24/7. Memory-based files would be ideal because they are gone when the application closes and should be more or less invisible to the outside world but I have to give the DLL a simple DOS file path (e.g. "C:/HALCON/ourproject") instead of a file stream/descriptor, so the question remains if one can (in Windows!) overlay the file system per process with a transient part residing in RAM.
Edit: I am using the HDevelop-Interface, that is, the HALCON procedures are called via the HDevProcedure objects which invoke a HALCON interpreter for a procedure.