Solved

How to tell if a dll is registered

Posted on 2002-04-30
5
8,710 Views
Last Modified: 2008-10-16
How can I tell for sure if a dll is registered? Without unregistering it to check if it unregisters.
0
Comment
Question by:alaplume
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6981853
You can search for it in the registry.

Anthony
0
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
ID: 6982243
Option Explicit
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal _
   lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
 
Private Sub Form_Click()
   If IsDLLAvailable("SHDOCVW.dll") Then
       MsgBox "OK"
   Else
       Beep
       ' MsgBox ApiErrorText(Err.LastDllError)
       ' for ApiErrorText, see: http://www.mvps.org/vb/index2.html?tips/formatmessage.htm
   End If
End Sub

Function IsDLLAvailable(ByVal DllFilename As String) As Boolean
   Dim hModule As Long
   
   ' attempt to load the module
   hModule = LoadLibrary(DllFilename)
   If hModule > 32 Then
       FreeLibrary hModule ' decrement the DLL usage counter
       IsDLLAvailable = True
   End If
End Function
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6985944
Experts here very much appreciate comments when they have helped you and the results are less than "A" level results.  We all take pride in delivering excellence and appreciate feedback from you anytime we fall short of those expectations so that the "missing" elements or added insights can be added.  Why did you choose to grade less than an "A" here, please?

To add a little more explanation on grading:  The goal on grading is to assess the value given in the question, and to give it the level of quality that will entice others to visit the solution if it served you once the question has migrated to our PAQ.  People are more likely to visit a question in our PAQ that is an A question grade rather than one which is a lower grade.  In addition, the points you give a question remain the same, but the points which flow to the expert are a direct result of the grade assigned.  Example:  100 points at an A grade = 400, B = 300, C=200

Listening further.  If no response will assume the grade was chosen in error and will correct.

Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6987758
Based on review and feedback from other moderators, the grade is changed.

Please see below.

Computer101
E-E Moderator



How Do I Know What Grade to Give?
Although we use an A-D scale here at Experts Exchange, it works differently than, say, school grades.
If one or more Experts' proposals are accepted as answers, they should usually be given an A or B grade,
since they have taken the time to provide you with a working solution. If a possible solution is incomplete
- ask for clarification or details before accepting the answer and grading it. People should not be
given lower grades because of incorrect grammar or because you just accepted their answer or comment
to close the question. Keep in mind, your question and any follow-up comments should be focused so that
there can be a specific answer. The following is a good guideline to follow when grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information
that thoroughly answered your question. An "A" can also be given to any answer that you found informative
or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were
able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the
opportunity to clarify if you have questions about their solutions. If you have given the Expert(s)
ample time to respond to your clarification posts and you have responded to each of their posts providing
requested information; or if the answers, after clarification, lack finality or do not completely address
the issue presented, then a "C" grade is an option. You also have the option here of just asking Community
Support to delete the question.

Remember, the Expert helping you today is probably going to be helping you next time you post a question.
Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support.
0
 

Expert Comment

by:ragmanintx
ID: 23179957
Register DLLs
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now