7

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.

3 Answers 3

13
+50

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

2
  • I tried what you suggested, but i keep getting an System.IO.Excetopn - Access Denied error "TI1000" error code, i searched for the error but had no luck. I used visual studio command prombet.
    – ykh
    Jan 6, 2013 at 9:23
  • You should try to run tlbmp as an administrator with UAC disabled. Jan 6, 2013 at 10:46
2

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.

0
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.