Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDM (Internet download manager) API using C#?

Tags:

c#

I want to create an application that uses the IDM api, while it's not compiled dll's actually, they are three files created in c++ and their extension are .h, .tlb, .c .

Here is a link for the page: IDM API.

I want to be able to use these files in a C# project, I googled it, and what I have found is that I have to compile these files to a dll to be able to use them.

Please someone take a look at the links and tell me what I can do to use the API, and if it is required to compile these files into a dll please tell me how.

Thanks.

like image 713
ykh Avatar asked Feb 05 '12 15:02

ykh


3 Answers

You should

1) download IDMCOMAPI.zip to your disk

2) extract the IDManTypeInfo.tlb type library from this zip file, somewhere on your disk

3) run The Type Library Importer tool like this:

[C:\Temp]"c:\Program Files\Microsoft SDKs\Windows\\v7.1\Bin\TlbImp.exe" IDManTypeInfo.tlb
Microsoft (R) .NET Framework Type Library to Assembly Converter 3.5.30729.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Type library imported to IDManLib.dll

This will create an IDManLib.dll

4) Now you can reference IDManLib.dll in your project. I have not tested it, but I also suppose you want to ensure your program is compiled with the proper bitness (it depends how the IDM COM Server works). So, I suggest you compile as X86 (not anyCpu, not X64).

like image 165
Simon Mourier Avatar answered Oct 03 '22 00:10

Simon Mourier


The API seems to be a COM object - did you try looking for it in the Add reference dialog? COM objects are registered globally, and judging by that page it should be there if you've run "IDM" on your computer.

like image 28
Matti Virkkunen Avatar answered Oct 03 '22 00:10

Matti Virkkunen


I will answer this question after 1 year from asking it, i am not sure what happened but all i did was adding a reference, i just added the tlb file as a reference and the library was imported. I am sure that i tried this before but it didn't work.

like image 32
ykh Avatar answered Oct 03 '22 00:10

ykh