Can't add a ref. to DLL (wierd error) 
Author Message
 Can't add a ref. to DLL (wierd error)

I have a registered DLL which I use from VB6. I want to write the program in
C# but can't add the dll as a reference. I even tried the tlbimp tool
manually.

I get a cannot convert to .net assembly. Could not load type.

The DLL works fine from VB so I know its registered ok with the OS ?

What do I do ?

C



Wed, 06 Oct 2004 07:11:03 GMT  
 Can't add a ref. to DLL (wierd error)
Hello Craig,

Please make sure your DLL is a COM DLL. Since the tlbimp.exe too can only
import a COM DLL to a assembly. If your DLL is a regular Win32 DLL, and you
want to invoke a function in it, you may use PInvoke. For more information
about PInvoke please see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmx...
ml/vcmg_part2Start.asp

I hope this information is helpful.

Best regards,

Lion Shi, MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------

    Subject: Can't add a ref. to DLL (wierd error)
    Date: Sat, 20 Apr 2002 00:11:03 +0100
    Lines: 13
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

    Newsgroups: microsoft.public.dotnet.languages.csharp
    NNTP-Posting-Host: host217-35-38-50.in-addr.btopenworld.com 217.35.38.50
    Path: cpmsftngxa07!tkmsftngxs01!tkmsftngp01!tkmsftngp04
    Xref: cpmsftngxa07 microsoft.public.dotnet.languages.csharp:55462
    X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

    I have a registered DLL which I use from VB6. I want to write the
program in
    c# but can't add the dll as a reference. I even tried the tlbimp tool
    manually.

    I get a cannot convert to .net assembly. Could not load type.

    The DLL works fine from VB so I know its registered ok with the OS ?

    What do I do ?

    C



Sat, 09 Oct 2004 15:55:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Wierd 'error C2011' with struct

2. wierd wierd error

3. Wrapper classes and 'ref' parameters

4. cant add ref to remote object

5. WebService (Adding Ref from normal App.)

6. Using ClassWizard to Add Classes form DLL's

7. That's Wierd, Menu Objects

8. Cannot pass x as ref or ref out...

9. Wierd Bus Errors...

10. wierd compiler error

11. Wierd cast error

12. Wierd error message after compiling with cc

 

 
Powered by phpBB® Forum Software