Editting Music Files - audio-player

I have a bunch of music files. I will provide them through a website. I want to make the music files available only to a few music editing softwares. We have Vegas pro and avid in mind.
I would like to know if the following scenario is technologically feasible.
When the user clicks the download button, they receive a virtual file. If the user double clicks the virtual file, then the user downloads the original file. The physical file can only be inserted into pre-designated music editing software. The physical file cannot be moved to other directory besides the directory of the music editing software. This physical file should be destroyed after a certain amount of time.
Is this scenario possible?

Related

Using an Icon across user downloads

So I'm in the final stages of a project I've been working on. I went ahead and created an ICO file for my shortcut but now I'm not sure how to preserve the ICO file as the background.
When I compress the file and send it to someone else, they open it but the shortcut doesn't work, since the shortcut links to a difference space inside their local storage. The ICO is also not preserved- presumably because it is stored locally.
My question is this- what is the best/fastest way to create a shortcut that is persistent across all users computers, without forcing them to make their own? In a perfect world an ICO file could be embedded in a link, but it doesn't look like that's possible. I have no idea how you would go about addressing the issue with the hard drive, since a user's file layout could be different from my own. It seems that this would have to be accomplished programmatically.
I'm not clear on what you mean by "preserve the ICO file as the background".
You could possibly add the ICO file as a resource in you C++ project.
How to add the ICO as a resource will depend on your C++ IDE.
When you create a shortcut to the application it should use the first ICO file it can find in the .exe file.

Create file that the application can edit but the user cannot

I'm making a scored game, and want to save the high scores. I want to save the scores in a file that the program can access (of course), but the scores shouldn't be editable by the user (a read-only file, probably). The problem with a read-only file is that, obviously, it's read only, so I can't write the high scores to it. Is there any way to create a file that can be edited by the application but not by the user, or do I have to encrypt the file in some way?
Note: I prefer the C (stdio.h) method of file writing.
Even encryption won't stop editing of the file by something other than your application.
Can I suggest that one option is to simply store the data in binary format? You then save the complication of implementing an encryption, but still prevent any accidental editing of the file.
You could also make your application set the file to be read-only by all, and then make it writeable only while using it. Again, this won't prevent someone else changing those permissions, but it will prevent accidental editing.
There is an established means of accomplishing this on Unix-like systems, but I don't know how you'd do it on other platforms. The idea is to give the high scores files the group ID of a special group just for this purpose, usually simply called games. The games themselves are then setgid games, so that ordinary users can run games, and the games can edit the high scores files, but users cannot directly write to the high scores files.
More details over on Unix & Linux: https://unix.stackexchange.com/a/59059/14308

OSX- Auto Delete file after x-time

Can we add metadata to unlink/remove a file after x-time automatically. That is system automatically removes that file, if it finds that particular metadata attached with that file
Note- file can be present at any location, and user may move that file anywhere on their system, but based on that metadata file should get deleted(i.e system should call unlink/remove) for that file.
Is there a cocoa/objective-c/c++ api to set such metadata/attributes of a file?
The main point is i am creating an application through which i am providing some trial files to the user, and those files are also usable by other application which recognises them. After trial expiry, i want to delete those files, but user can always move my files to a different location and use them forever, how to protect those files from permanent use?
No, there is no built-in mechanism to auto-delete a file based on some metadata.
You could add the feature yourself, with an accompanying agent that would trawl for files with the metadata and delete them when the time came.
If you are doing this for good housekeeping you can follow #Petesh answer.
If you are doing this because you really want those files gone then no. The user could move the file to a USB stick and remove it, or edit the metadata, etc.
Your earlier question "Completely restricting all types of access to a folder" seems to addressing the same issue and the suggestions are the same as given there - use encryption or implement your own file system.
E.g. have a special "trial file" format which is the same as the ordinary format - which is readable by other apps - but encrypted and includes an expiry date. Your app then decrypts the file, checks the date, and either does its thing or reports to the user the file is out of date.
The system isn't unbreakable, but its a reasonable barrier - easy for you to do, too hard for the average user to break.

Deploying text files in c++

I have encountered a problem when deploying a game I made in C++. I will try and be as specific as possible.I did research this thoroughly on Google and I also asked a former programming teacher and he recommended I post to this site. I created a game in C++ and inside the source folder I had added 3 text files named: "SavedGame1.txt" "SavedGame2.txt" and "SavedGame3.txt". I built a save function that when triggered, it writes the information such as player name, class, hitpoints, mana, etc to the text file so it can be read back later in my continue function. When I run it in Visual Studio (I am using Visual Studio 2010 by the way), it will write to the text file like desired and read back from the text file. After I deploy the game, it will read from the text files if they have data in them before I deploy the game, but the problem is after deployment, it will not write to the text files. This makes my save game function worthless. I found a way around this by creating a directory upon running my deployed game and then creating the save game text files in the directory, but then I face the issue of having to run the game in Admin mode or else it will not write to the text files. Can anyone tell me what I can do to get it to write to the text files so that the user does not have to be in Admin mode to use the save function.
You can do the following:-
1) When you deploy your text files, create a folder under the ApplicationData folder for that specific user.
2) Deploy your text files to this folder
3) Read and write to the files in the above folder when required
The ApplicationData folder stores the application specific data of the user and is always accessible (even for non admin users)
In C++ you get the ApplicationData folder like this (pointing you to another answer on SO: ApplicationData

Monitor file after cut and paste (Windows Shell Extension?)

I'm currently in the idea phase for a small application that requires keeping track of specific, user chosen files.
I want the system to be intuitive, such that a user can change the file name, directory name, or move the file to a new location, and the application would still be able to keep track of the file.
Now, I know that I can monitor directories already, for the majority of these kinds of changes, with windows system calls.
The problem I'd have is finding if/when a file is cut, copied, or pasted somewhere. I've read a little about shell extensions, but they have actually rather confused me (since I haven't had the time to actually read good and long about them yet). Is there a way I could monitor a file for being cut/pasted/copied, so that my application could continue to track the file in it's new location? Would I have to do this through a shell extension?
You can use shortcut objects to track files even if they are renamed or moved.