473,408 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

DLL won't load VB.NET

seraieis
Good afternoon experts!

I'm having trouble getting a dll to properly load. It loads on my machine, and even though the users who will be using the library have it on their machine, the program will not recognize it.

I'm writing an automation program that interacts with a green screen application. It uses the atmapi32.dll library. The first time I tried to run it on someone's computer, i received the following error:
Expand|Select|Wrap|Line Numbers
  1. System.DllNotFoundException: Unable to load DLL 'atmapi32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  2.  
Thanks to Plater, and his suggestion in another thread to use Process Explorer, I learned the path of the DLL it was trying to use. Thinking myself extremely clever, I hard coded the library directory, to point to a copy of the library in the application's folder but I got this error instread:
Expand|Select|Wrap|Line Numbers
  1. System.DllNotFoundException: Unable to load DLL 'c:\program files\sls\workbook1\atmapi32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I've been down a similar path before, with trying to get the same program to recognize a library, however the that case, the library didn't exist on the users' machines. In this case, the library exists, but the program will not find it, even when I hard code.

Does anyone know how I can fix this? My only other thought would be to find a way to package the library in the install file (which I don't know how to do either).

Thank you in advance!
Nov 10 '08 #1
5 3363
As a follow up, I've tried using gcutil on the users computer, but that doesn't seem to help either.
Nov 11 '08 #2
Plater
7,872 Expert 4TB
This is a bit of a head scratcher, I think gcutil only applies to .NET(managed) DLLs, if the DLL is a COM dll, it gets registered differently I think.
Not sure why it would not allow you to use the dll on other systems.
Maybe the error message is a red herring and its really a security/permissions issue on the system?
Nov 11 '08 #3
I tried going into the application properties and running the analyzer for the security, and it made the application Full Trust. But I got the same error as I did before. Is there a way to see exactly what the function within the DLL is trying to do, so I can see where the exception is being generated from?
Nov 11 '08 #4
I've also tried to use Dependency walker to see if I'm missing a library. It says that MPR.dll has "At least one module has an unresolved import due to a missing export function in a delay-load dependent module." The function missing the export is WNetRestoreConnectionA. I get the same error on my machine (where the program does work) as well as the users, so I don't think that's the issue.

I'm don't know if this will help narrow it down any...
Nov 11 '08 #5
Expand|Select|Wrap|Line Numbers
  1. Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") & ";C:\Program Files\IBM\EHLLAPI")
Figured it out! The PATH variable was missing the directory where the atmapi32 was located.

Thank you all for your help!
Nov 11 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: robert walker | last post by:
hi all, to my webapp named mrf, i have added load-on-startup tag to mrf\WEB-INF\web.xml so i added a snippet like so <servlet> <servlet-name>loadDbProperties</servlet-name>...
7
by: DC Gringo | last post by:
I have a datagrid that won't sort. The event handler is firing and return label text, just not the sort. Here's my Sub Page_Load and Sub DataGrid1_SortCommand: -------------------- Private...
3
by: Lowell | last post by:
Windows XP SP2 + Symantec AV + VS 2003 with .NET Framework 1.1 IIS won't load or run existing ASP.NET applications and VS can't create or load web projects (HTTP/1.1 500 Server Error). Event...
5
by: theyas | last post by:
Windows XP SP2 + Symantec AV + VS 2003 with .NET Framework 1.1 IIS won't load or run existing ASP.NET applications and VS can't create or load web projects (HTTP/1.1 500 Server Error). Event...
5
by: Doug Kent | last post by:
Hi, I am using a STA thread to run a COM object. On a couple of machines the thread runs fine. On another machine the thread won't start, and no exceptions are thrown. This code is running...
3
by: navyliu | last post by:
I have raised a discussion about assembly unloading.But we can't get a final solution. Since we cannot unlaod a assembly,Is there any reference about this indicate that this problem won't make...
1
by: jianxin9 | last post by:
Hi, I have an ajax powered tabs box that has a javascript drop-down search menu in the first tab. When I click on another tab, and go back to the first tab I have to refresh the page to get the...
4
by: kyvl | last post by:
Hi All, I have a problem. Screens won't load. Example ( When I select Games on MSN, it will load the page, but not all the graphics or the buttons to make selections will load. When screens will...
2
by: David Thielen | last post by:
So we have moved our app from .NET version 2.X in IIS6 to a Windows 2008 Server running IIS7. We have copied all files to the Windwardreports\apps directory and that apps directory has been...
2
jamwil
by: jamwil | last post by:
What's up guys. I'm having some issues... I've created a method as part of my lifestreaming class which takes an rss feed, and puts the data into a database... It's fairly simple... Check...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.