Solved

Using DLL that is not strong-name-key in a DLL that must be strong-name-key

Posted on 2004-09-08
10
862 Views
Last Modified: 2008-02-01
Hi,

I am writing a DLL in VB.NET. This DLL will be used in computers that have the .NET framework installed, therefore need to be strong-name-key (or not?).
In this DLL I need to use a DLL, that apperently is not strong-name-key: when I try to compile my dll with the reference to the other DLL I get the error:
Unable to emit assembly: Referenced assembly 'Interop.DSOBJECTSLib' does not have a strong name

How do I use the other dll in my dll, or how do I distribute my dll if it is not strong-name-key?
0
Comment
Question by:kerenkalif
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 5

Accepted Solution

by:
thenrich earned 500 total points
ID: 12005470
Maybe try unreferencing the dll and late bind to it. Get a pointer to it using GetObject() or CreateObject() and Dim your dll-pointer to the object as 'Object'. Kind'a a hack but it should work.

Is the other dll a .NET dll or a COM dll?
0
 

Author Comment

by:kerenkalif
ID: 12005639
Hi,

I don't know what type is the other dll, I got it as is...
Anyway, if I don't do any reference to the dll, when I try to do CreateObject, it doen't recognize it...

I tried to do:
Dim ds = CreateObject("dsobjects.DSOBJECTSLib")
Dim z_DsCommand As ds.DSCommand

But it doesn't recognize the command...

Can you please show me a code example? The dll name is dsobjects and I need to use an object named DSOBJECTSLib.


Thanks,
KerenK
0
 
LVL 5

Expert Comment

by:thenrich
ID: 12005663
Is it a regestered COM dll?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:thenrich
ID: 12005684
If it's regestered look in the registry under HKEY_CLASSES_ROOT for the name and try the CreateObject on that name.
0
 

Author Comment

by:kerenkalif
ID: 12006222
I don't see the class in the registry...
0
 

Author Comment

by:kerenkalif
ID: 12006716
There are 2 class in the dll: DSCommand and DSoaifCtrl. The second one does appear in the registry and it does work as you suggested, but the first one doesn't appear in the registry...
0
 
LVL 5

Expert Comment

by:thenrich
ID: 12006756
will your application work with just the first one regesterd?
0
 

Author Comment

by:kerenkalif
ID: 12006894
partly ,beacuse I need the other one as well...
how come the first one is not registered? can I do something about it?
0
 
LVL 5

Expert Comment

by:thenrich
ID: 12009179
You can try re-registering it.
at the Start > run command prompt
regsvr32 C:\dllPathHere.dll
0
 

Author Comment

by:kerenkalif
ID: 12013435
Many-many thanks for the answers and for the patience all along :-)))
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Write to a printer using vb.net 9 61
Help with opening combobox using VB.NET. 3 38
Groupbox Control ? 2 29
Copying from a network share 3 26
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question