Solved

Script using custom DLL not working

Posted on 2009-06-30
3
544 Views
Last Modified: 2013-11-10
I have a custom DLL and imported in the script component to use it. Withing the script designer, I can see the method accessing (from Intellisense). But when I run the package, it says that it does not find the method (if try to access the static method) or not able to load "type" I am instantiating it within the script.  
0
Comment
Question by:templeavenue
  • 2
3 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 24751507
You could try late binding
Set oObject = CreateObject("YourDLLProgID")
Call oObject.YourMethod
To enable late binding you need to untick a setting in the editor though
0
 

Author Comment

by:templeavenue
ID: 24756114
Thanks for the reply. But it doesn't work. It will give me exception when I run the package. I need to add more info so that it can be resolved easier.
First, I am modifying existing DLL. In the same DLL, the classes existed before seems to be accessed and accessing the new class is giving me exception. The DLL is being done by different person in the past.
Second, Can you add reference fromt he Script Editor without putting the DLL in the .NET framework folder? I now have to put the DLL in the .NET framework folder as before in order to reference.
Also,  I tested the DLL by testing a small program to the the new class in the DLL.
I hope this would help us.

thanks again!
0
 

Accepted Solution

by:
templeavenue earned 0 total points
ID: 24756801
I figured it out. In the design time, it used the DLL in the .NET framework folder. But run time, it used the DLL registered by GAC(Global Assembly Cache). The DLL must be registered by using gacutil and must be the same .NET version used to created the DLL.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

820 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