简体   繁体   中英

IDM (Internet download manager) API using 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.

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).

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM