How to use labview real-time module to catch .txt file in D disk ?
I would like to use myRIO project.
In case you are trying to open a file on your PC, as suggested by #Khachik,
I'd recommend reading this white paper: Best Practices for Target File IO with LabVIEW Real-Time. The best solution to your problem depends on what you are trying to achieve.
An option could be to transfer your file to the target using FTP and then read it from your code, taking care of properly formattig the path depending on the Real Time operating system you have.
Related
I made a small program (App.exe) by (Visual Basic Language) that replaces some files, and a place those files in my preject recoures
the problem is when i build the program i can decompressing the App.exe and see those files like a archive with any decompressing software like a WinRAR or 7-zip, and me i don't want that, this is a image from my computer, someone can help me, thanks in advance
You may use ConfuserEx obfuscator (Google it to get that). After encrypting the app with it, it'll be almost impossible to decompile it or get its raw files (resources) even after extraction.
Simply drag and drop your application into it:
Use Compressing packer:
And finally protect it:
And you're good to go.
I have a very simple yet crucial question:
There is a labview file (VI) that it contains some VIs related to a Tektronix oscilloscope and a motor driver. I have downloaded the drivers and VIs of these hardwares from their company website and added them to the labview file. Now here is the problem; each time that I open that labview file it starts to search for all the related VIs again.How can I solve this problem so there is no need to redo this procedure every time.
thanks
Saving the VIs after the first time LabVIEW searches for dependencies should solve this. It's recreating the links, which will be saved with the VIs save, so just make sure you have write access on all files, and you're fine.
I am facing problem while generating CAB file. I want to customize the INF file generation depending upon what components I choose to package. At present, we need to modify the INF file manually to include/exclude the components. I would just like to know, is there any programmatic interface where I will give the paths of the components to be packaged and it will give me INF file. This file I will provide to cabwiz.exe to generate the CAB archive. I am searching this type of solution because I want to avoid VS installation on non-developer's machine.
Thanks,
Omky
I'm not aware of any "programmatic interface for INF generation", but that said, it would be pretty trivial to create one. The INF format is pretty straightforward with not a lot of sections or options, and many of which you can safely ignore.
I created a tool some time back that generated an INF that would parse a desktop file/directory tree and generate an INFo that would replicate the same tree on the device with the same files. Basically you'd build the tree on the PC that you wanted on the device and the tool would read what you had, build an INF and then package it (I'd actually post the code, but I can't find it offhand). It took maybe an hour to write.
Can a file already in use be cloned in VB.NET?
Is it possible to load a file into memory even if that file is already in use by another program?
It should be possible, but only if the other application doesn't have the file open with a file share mode of None or "exclusive" Write (FileShare.None or FileShare.Write in .NET)
Here is a list of possible windows file sharing modes. It is for C++, but the same principles apply across the board since file sharing is an operating system level concept.
For .NET, the same principles apply. See the FileShare enumeration (although the discussion from the link above is more useful to understand what types of file locks are involved with the different types of file share modes)
If the other program is .NET it depends how it opened the file. If it opened it with FileShare.None then you will be out of luck, otherwise it is possible.
When I can't open a file in notepad/ultra-edit because an application has locked the file, I can copy the locked file and the copy opens without any problem.
Maybe the same strategy can be used in c# code?
I'd like to be able to track file read/writes of specific program invocations. No information about the actual transactions is required, just the file names involved.
Is there a cross platform solution to this?
What are various platform specific methods?
On Linux I know there's strace/ptrace (if there are faster methods that'd be good too). I think on mac os there's ktrace.
What about Windows?
Also, it would be amazing if it would be possible to block (stall out) file accesses until some later time.
Thanks!
The short answer is no. There are plenty of platform specific solutions which all probably have similar interfaces, but they aren't inherently cross platform since file systems tend to be platform specific.
How do I do it well on each platform?
Again, it will depend on the platform :) For Windows, if you want to track reads/writes in flight, you might have to go with IFS. If you just want to get notified of changes, you can use ReadDirectoryChangesW or the NTFS change journal.
I'd recommend using the NTFS change journal only because it tends to be more reliable.
On Windows you can use the command line tool Handle or the GUI version Process Explorer to see which files a given process has open.
If you're looking for a get this information in your own program you can use the IFS kit from Microsoft to write a file system filter. The file system filter will show all file system operation for all process. File system filters are used in AV software to scan files before they are open or to scan newly created files.
As long as your program launches the processes you want to monitor, you can write a debugger and then you'll be notified every time a process starts or exits. When a process starts, you can inject a DLL to hook the CreateFile system calls for each individual process. The hook can then use a pipe or a socket to report file activity to the debugger.