|
-
Oct 25th, 2006, 09:53 AM
#1
Thread Starter
Addicted Member
[RESOLVED] How to detect installed components
Hi everybody ;
I was wondering if there is a method to detect if a DLL or OCX is already exist & registered , also in VB6 how can I detect that the .Net framework is installed & what version (I hope that this is not the wrong forum to ask about that).
-
Oct 25th, 2006, 01:54 PM
#2
Addicted Member
Re: How to detect installed components
-
Oct 25th, 2006, 03:57 PM
#3
Thread Starter
Addicted Member
Re: How to detect installed components
 Originally Posted by Cristian
Thank you , but I guess that it is irrelevant , if I am wrong can anybody explain that foe me. ???
-
Oct 25th, 2006, 06:07 PM
#4
Re: How to detect installed components
For your first question:
Private Declare Function LoadLibrary Lib "kernel32.dll" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 25th, 2006, 06:21 PM
#5
Thread Starter
Addicted Member
Re: How to detect installed components
Do you mean this :
VB Code:
Option Explicit
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Sub cmdCheck_Click()
MsgBox "Exist ??? =" & CheckForComponent("user32.dll")
End Sub
Private Function CheckForComponent(ComPath As String) As Boolean
Dim Ret As Long
Ret = LoadLibrary(ComPath)
FreeLibrary Ret
If Ret = 0 Then
CheckForComponent = False
Else
CheckForComponent = True
End If
End Function
-
Oct 26th, 2006, 05:08 PM
#6
Thread Starter
Addicted Member
Re: How to detect installed components
Sorry : BUMP
1-Is that what you mean by the API (LoadLibrary).
2-If I want to get their versions I need to get their paths , is it possible (via registry for example).
3-About the .Net framework , should I ask in the .Net section (Note that I want to do this in VB6)
Thanks
-
Oct 27th, 2006, 01:18 PM
#7
Thread Starter
Addicted Member
Re: How to detect installed components
OK , I made a topic about detecting the framework : http://www.vbforums.com/showthread.php?t=435124 , it is resolved for that issue , but I still want to know about other questions plz , help
-
Oct 28th, 2006, 10:16 AM
#8
Thread Starter
Addicted Member
Re: How to detect installed components
OK , now my second question is also resolved , coz using APIs to get a file version need full path only for un-registered components.
So the last question Is that what you mean by the API (LoadLibrary) , RobDog888 ?, see post No.5
Please this is the remaining part of my current project
-
Oct 29th, 2006, 05:03 PM
#9
Thread Starter
Addicted Member
Re: How to detect installed components
BUMP
Nudge
Hello
Anybody can answe plz
Last edited by msayed2004; Oct 29th, 2006 at 05:06 PM.
-
Oct 29th, 2006, 05:44 PM
#10
Re: How to detect installed components
Yes, but user32 will exist in all windows based OS' as its a core requirement for windows to run.
The return of LoadLibrary will be non-null if it suceeds and the library exists.
See this definition and two code examples at the bottom of the page for more details and examples of its use.
http://www.allapi.net/apilist/LoadLibrary.shtml
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 29th, 2006, 06:23 PM
#11
Thread Starter
Addicted Member
Re: How to detect installed components
I know that and i have (API Guide) , I just used the (user32.dll) as example.
This means that this topic is RESOLVED & RobDog888 deserves a rate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|