I downloaded a zipped archive from Apple that consists of a C++ header file and source. Included in this was a help file. For some reason this help file opens but I cannot read the content. Is there any other documentation outside of a help file for this? For c++ or c#?
If you are on Windows, you probably are looking for the "iTunes COM for Windows SDK".
Get a free ADC login here if you haven't done so already. Once you have done that, you can go to http://connect.apple.com and log in.
Click on "Developer Tools", and somewhere in the massive list of results is "iTunes COM for Windows SDK". Download that, it's just an ordinary zip file, and somewhere in there is a directory named iTunesCOMWindowsSDK. In that directory, there is a iTunesCOM.chm file that contains all the reference material you need.
If this is the help file you already have, you could consider decompiling the chm file using the hh.exe tool that comes with Windows.
It seems the only source for the iTunes COM documentation is now archived on github by https://stackoverflow.com/users/188792/joshkunz
The nice web page is here
http://www.joshkunz.com/iTunesControl/
And the github project is here
https://github.com/Joshkunz/iTunesControl
Solved.. The problem was a Windows Security feature was blocking the compiled help file from opening. I found the solution here:
http://weblog.helpware.net/?p=36
Note: this is not relevant but it feels like this code complements the question nicely - I would have put this in comments but comments don't seem to allow code formatting (d'uh).
Anyway, here is a C# example of how to dump all songs in the library:
dynamic iTunesApplication = Activator.CreateInstance(Type.GetTypeFromProgID("iTunes.Application"));
dynamic mainPlaylist = iTunesApplication.LibraryPlaylist;
for (int i = 1; i <= mainPlaylist.Tracks.Count; i++)
{
dynamic track = mainPlaylist.Tracks.Item(i);
Console.WriteLine(track.Location);
}
Thanks to Hogan for the great pointer to the documentation!
Related
I work for an IT company where we all carry around flash drives that have our most used programs on them.In my spare time I am hoping to create a "main menu" item that is kind of a fun and convenient way to access these files. I am working on creating this using Visual Studio 2013 and using visual C# windows forms. I have come across a snag however that I can't seem to find a workaround for. I am by no means fluent in C#, but I need to have a button on the windows form open a file without specifying what drive it comes from. I understand that I have to specify a path, but as these will be stored on the flash drives of myself and my coworkers I cannot foresee that the path will always begin with E:. Depending on what USB slot the drive is plugged into it could be N: or F: or the like. I have provided an example below:
Using what I currently know I am opening files using this line of code:
System.Diagnostics.Process.Start("C:/Users/Myname/Desktop/Asmodeus/Anti-Virus/Anti-Virus Installers/avast_free_antivirus_setup.exe");
Is there any way possible I can have the file open simply from
System.Diagnostics.Process.Start("Asmodeus/Anti-Virus/Anti-Virus Installers/avast_free_antivirus_setup.exe");
or something of that nature?
Thanks in advance.
There must have been some mis-communication when I asked my question previously. what I am looking to do is open an executable file via a button click on the windows form using a relative path. I am not able to specify the absolute path because the application will be run from a flash drive and therefore will change depending on what USB slot it is currently inserted into.
What I am hoping to accomplish is insert a line of code that will allow me to open an executable file that is located in the \bin\debug folder along with the application itself. I have a picture for clarification but apparently do not have enough reputation to post it. Thank you and sorry for the earlier confusion.
Usually you can just use Environment.GetFolderPath (MSDN) to give you what you need. It doesn't do absolutely everything, but if you need Desktop and the like, that is plenty.
Depending on the target version of .Net, the SpecialFolders exposed are not all there. It may turn out that you need more than they provide, but in your case it doesn't sound like it.
If there is more you need that is not covered in the default, check out this project. I'm sure there are others like it, but it does a little more than the default BCL version, using the API directly. It is at least something to read and learn (and translate from vb.. use an online translator, very quick). I haven't looked at it, but it seems like you are learning this c#/.net thingy, so it might be helpful
This article is about accessing Windows special folders.
These folders include your “Favorites”, “Cookies”, system libraries and the like.
Here is code, including a large number of constant definitions, plus documentation,
allowing access to and creation of these folders.
I've searched through the internet for how to move or copy'n'paste files on an Android device programmatically, but i found nothing up to now. what i wish to do is, that my application copies or moves a SQLite Database from the internal sdcard to the app folder in /data/data/example. i would be pleased if someone could explain my how to do that or give me a link to somewhere it gets explained.
A quick search on Stackoverflow turns out two questions with helpful answers:
How to make a copy of a file in android?
Android file copy
Basically, they suggest to read the contents of one file and write those to another file. You can do the same with monodroid.
I am writing an application in c# that copies files, and I wanted to only copy files according to their tortoise-svn status.. i.e., I would like to divide the files into modified files vs unmodified.
Is there a way to do this? I've been looking at the different .exe files in the svn/bin folder, but haven't found anything. perhaps theres a dll I am overlooking?
Thanks
Talk to svn directly, use svn status.
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.cycle.examine.status
Thanks everyone for your help, it finally works... I got it to work using two methods:
either using a process in c# and calling the SubWCRev.exe (if you put in as a process argument the path of the file you want to check for svn modifications, you should get that detail as an output).
and the other way was adding the SubWCRevCOM.exe as a reference and then using it as so:
using LibSubWCRev;
SubWCRev subCheckMod = new SubWCRev();
subCheckMod.GetWCInfo(#file_to_check, true, true);
if (subCheckMod.HasModifications) {...}
thanks again everyone =]
Since your question is tagged as C#, I would suggest looking for .Net bindings to subversion.
SharpSvn looks like it would meet your needs.
TortoiseProc is used for automation, but you need to study its syntax.
If you wanted to use the exes that come with TortoiseSVN look at SubWCRev.exe.
I need to create a resource file for a .net project (by hand) and compile it using the ResGen.exe tool provided by the .NET framework. I can't find any documentation for this. I need to write the resource file by hand because I'm in a situation where I don't want to download/buy extra tools (like VS) to generate this resource file, and also I feel more productive through the command-line (helps me understand how things really work).
So I need to write a resource file by hand to store an ICON in the executable and use it from within my program. I would also like to use this icon to represent my executable in Windows Explorer.
Any references would be great!
Visual C# Express Edition will do what you want for free. If nothing else you can download that, create the resource file and then use that as a subject for your admirable curiosity about 'how it really works'. This may also save you some time in manual experimentation to get it right the first time around.
These 2 links in conjunction provide information on using that tool to create and embed an icon file, it seems specific to C#. Of course i'm guessing at your full intention, let me know if this points you in the proper direction.
http://www.xtremedotnettalk.com/showthread.php?t=75449
specifically there is a post which states;
I think you should first create a *.resources-File from the Icon with the tool named "Resgen.exe"...
resgen App.ico App.ico.resources
the next step would be compiling...
csc /t:winexe /out:Keygen.exe /res:App.ico.resources /r:Crypto.dll /win32icon:App.ico Keygen.cs AssemblyInfo.cs
I'm sure you were here already.
http://msdn.microsoft.com/en-us/library/ccec7sz1(VS.80).aspx
You should check this link:
http://msdn.microsoft.com/en-us/library/ekyft91f.aspx
It explains what formatter is used and gives some code samples to generate one from code. You could then write a small wrapper app that you can call from the command line. No downloads needed!
I need to extract some bitmaps from an .msstyles file (the Windows XP visual style files) and I'm not sure where to start. I can't seem to find any documentation on how to do it, and the file format seems to be binary and not easily parsed. I have been able to extract the bitmap by itself using:
IntPtr p = LoadLibrary(UxTheme.ThemeName);
Bitmap bmp = Bitmap.FromResource(p, "BITMAP_NAME");
FreeLibrary(p);
However, I also need the information related to the bitmap, like the margin sizes, spacing and number of "images" per bitmap. Does anyone have any experience with this or any links to documentation that I can use?
This site claims the file format is documented though not by Microsoft.
Also found this in the Wine Crossreference.
Hope that helps!
If you want to get files out of a dll directly (remember, msstyles are dlls with another extension), you could have a look at the Anolis Project.
As for actually parsing that stuff you should look at the various tutorials on creating msstyles for information on how the various text resources in that file work.
This codeproject article seems to have exactly what you want, with a little interop involved. A managed wrapper exists and it seems rather good. The .Net WindowsForms also has the functionality built in, you might want to look at the System.Windows.Forms.VisualStyles namespace if you want simplified read only access.
You can open the msstyles using 7-zip, install it, then right click the msstyles > 7-zip, ther's 2 open inside, one as a normal button and the other with a arrow, choose the second one, then select "#"
You're now inside the msstyles, now right click to 1..mst > Open inside
You're inside the actual theme now, now just extract it's resources
Image of the msstyles open (is in spanish tho)