473,668 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check for missing dll's

How would you check in an application for missing dll's so that the
application would inform the user what is wrong?
Nov 21 '05 #1
5 2057
Great Handle, thats how I feel most of the time.

LOL
"DazedAndConfus ed" <Ac********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
How would you check in an application for missing dll's so that the
application would inform the user what is wrong?

Nov 21 '05 #2
Hence the name.
"Mr Newbie" <he**@now.com > wrote in message
news:uf******** ******@TK2MSFTN GP12.phx.gbl...
Great Handle, thats how I feel most of the time.

LOL
"DazedAndConfus ed" <Ac********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
How would you check in an application for missing dll's so that the
application would inform the user what is wrong?


Nov 21 '05 #3
Hi,

When you regsvr a file it creates a clsid. This will get the
dll names from the registry. It will add any dll that it cant find to a
listbox lstMissingDll
Imports Microsoft.Win32
Imports System.IO

Public Class Form1
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim rkCLSID As RegistryKey =
Registry.Classe sRoot.OpenSubKe y("CLSID")
Dim strKey As String
Dim strSys32 As String =
Environment.Get FolderPath(Envi ronment.Special Folder.System) & "\"

For Each strKey In rkCLSID.GetSubK eyNames
Try
' only check for dll name if it is a clsid
If strKey.IndexOf( "{") >= 0 Then
Dim strPath As String
Dim rk As RegistryKey = rkCLSID.OpenSub Key(strKey &
"\InprocServer3 2")
Dim strDll As String = rk.GetValue("") .ToString
If strDll.IndexOf( "\") > 0 Then
'gave full path
strPath = strDll
Else
' in system32 directory
strPath = strSys32 & strDll
End If
Dim str As String = """"
strPath = strPath.Replace (str, "")
Trace.WriteLine (strPath)
If Not File.Exists(str Path) Then
' file doesnt exist add to listbox
lstMissingDll.I tems.Add(strPat h)
End If
End If
Catch
End Try
Next
End Sub
End Class
Ken
------------------------
"DazedAndConfus ed" <Ac********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
How would you check in an application for missing dll's so that the
application would inform the user what is wrong?

Nov 21 '05 #4
Nice bit of code Ken
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:ui******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

When you regsvr a file it creates a clsid. This will get the
dll names from the registry. It will add any dll that it cant find to a
listbox lstMissingDll
Imports Microsoft.Win32
Imports System.IO

Public Class Form1
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim rkCLSID As RegistryKey =
Registry.Classe sRoot.OpenSubKe y("CLSID")
Dim strKey As String
Dim strSys32 As String =
Environment.Get FolderPath(Envi ronment.Special Folder.System) & "\"

For Each strKey In rkCLSID.GetSubK eyNames
Try
' only check for dll name if it is a clsid
If strKey.IndexOf( "{") >= 0 Then
Dim strPath As String
Dim rk As RegistryKey = rkCLSID.OpenSub Key(strKey &
"\InprocServer3 2")
Dim strDll As String = rk.GetValue("") .ToString
If strDll.IndexOf( "\") > 0 Then
'gave full path
strPath = strDll
Else
' in system32 directory
strPath = strSys32 & strDll
End If
Dim str As String = """"
strPath = strPath.Replace (str, "")
Trace.WriteLine (strPath)
If Not File.Exists(str Path) Then
' file doesnt exist add to listbox
lstMissingDll.I tems.Add(strPat h)
End If
End If
Catch
End Try
Next
End Sub
End Class
Ken
------------------------
"DazedAndConfus ed" <Ac********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
How would you check in an application for missing dll's so that the
application would inform the user what is wrong?


Nov 21 '05 #5
Wow, that gets ALL missing DLL's, thank you.
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:ui******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

When you regsvr a file it creates a clsid. This will get the
dll names from the registry. It will add any dll that it cant find to a
listbox lstMissingDll
Imports Microsoft.Win32
Imports System.IO

Public Class Form1
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim rkCLSID As RegistryKey =
Registry.Classe sRoot.OpenSubKe y("CLSID")
Dim strKey As String
Dim strSys32 As String =
Environment.Get FolderPath(Envi ronment.Special Folder.System) & "\"

For Each strKey In rkCLSID.GetSubK eyNames
Try
' only check for dll name if it is a clsid
If strKey.IndexOf( "{") >= 0 Then
Dim strPath As String
Dim rk As RegistryKey = rkCLSID.OpenSub Key(strKey &
"\InprocServer3 2")
Dim strDll As String = rk.GetValue("") .ToString
If strDll.IndexOf( "\") > 0 Then
'gave full path
strPath = strDll
Else
' in system32 directory
strPath = strSys32 & strDll
End If
Dim str As String = """"
strPath = strPath.Replace (str, "")
Trace.WriteLine (strPath)
If Not File.Exists(str Path) Then
' file doesnt exist add to listbox
lstMissingDll.I tems.Add(strPat h)
End If
End If
Catch
End Try
Next
End Sub
End Class
Ken
------------------------
"DazedAndConfus ed" <Ac********@yah oo.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
How would you check in an application for missing dll's so that the
application would inform the user what is wrong?


Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3864
by: Dalan | last post by:
After installing an Access 97 Runtime DB on a clean drive, could not perform any OutputTo of HTML or RTF. The error message displayed was: Optional Output To Method - The formats that enable you to output data as rtf, html are missing or incorrectly registered in Windows Registry. Presumingly, missing is a dll, ocx and/or registry entries to enable this function. Does anyone know which ones need to be included to effect the OuputTo?...
3
3518
by: michael | last post by:
I have an object which needs the WithEvents Declaration. But some machines which it is installed on will not have the DLL. Is there an easy way to ignore the Error 'Can't find project or library' which will popup. michael
3
1554
by: Boris | last post by:
I notice the following strange behavior of the applications running under ..NET Framework. Let say I have application MyApp.exe which reference assembly MyAssembly.dll. The MyAssembly.dll is strong named assembly, which is installed in the GAC. I notice that if MyAssembly.dll is not installed in GAC or the different version of MyAssembly.dll is installed in GAC then MyApp.exe starts OK. But as soon as the MyApp.exe app tries to call...
14
1825
by: tshad | last post by:
I am trying to set up a reusable library (business component) that I can use in a bunch of my pages. I built the file and it almost compiles, but I am not sure what I am missing. The vbc command and results are: ************************************************************************ C:\Inetpub\wwwroot\Development>vbc /t:library emailClass.vb
0
1195
by: JohnR | last post by:
Hi all.. my application uses a custom dll which should be in the same directory as the exe file. If the dll file is missing the application immediately aborts with a "Application has generated an exception that could not be handled" exception. I would like to catch the error and display a meaningful message. I tried TRY CATCH in the SUB Main(), I tried ON ERROR in the SUB Main(), I also tried to test for a fileinfo.exists on the dll...
2
10661
by: AMD4me2 | last post by:
Each time I restart computer & run Norton System Works One Button Checkup, it finds same problems: missing program files: i.e.: ....NET\FRAMEWORK\v2.0...cannot access a necessary file, "msvcr80.dll". I have .net framework 1.1, .net framework 1.1 hotfix (KB886903), and .net framework 2.0 installed. I would like to know how to correct the missing (msvcr80.dll) file problem. -- Athlon64x2 3800+(2.55 Ghz@1.49v) MSI K8N Neo4 Platinum SLI,...
3
13199
by: l.green | last post by:
I have recently migrated from MS Access 2000 to MS Access 2003 and am testing all my Access apps. One app uses the Mousehook.dll which I downloaded from the web a few years ago. The .dll is in the same folder as the app and works fine. (This was on a Citrix 2000 terminal server. I verified that it is using the .dll from the local app folder) I converted the db and compiled all my code without errors. When I open this app in Access 2003 ...
5
6857
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network folder. The "check mark" for each item in the control is determined by the boolean value of a custom property field of the file. That value is found using microsoft's dsofile.dll class.
0
8367
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8650
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.