Solved

Hi,

Posted on 2002-05-06
6
135 Views
Last Modified: 2010-05-02
On a system lots of dll's can be found. On systems that are default not english (like mine, it's dutch) dll's of different languages can be found.

Does anyone know of a way to get the language of each dll? I guess it's an api call or something because under w2k, the properties of a dll knows a tabpage called "version". In here also can be read the language of the dll.

Kind regards,

Ehout
0
Comment
Question by:ehout
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6993786
I wrote a small application like that a short while ago:
http://www.soft-trax.com/www/downloads/OrderDLL.exe

Basically it is something like:
Private Declare Function GetFileVersionInfo Lib "Version.dll" Alias "GetFileVersionInfoA" (ByVal lptstrFilename As String, ByVal dwHandle As Long, ByVal dwLen As Long, lpData As Any) As Long
Private Declare Function GetFileVersionInfoSize Lib "Version.dll" Alias "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As Any, src As Long, ByVal length As Long)
Private Declare Function VerQueryValue Lib "Version.dll" Alias "VerQueryValueA" (pBlock As Any, ByVal lpSubBlock As String, lplpBuffer As Any, puLen As Long) As Long
Private Declare Function VerLanguageName Lib "kernel32" Alias "VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal nSize As Long) As Long

Private Function GetLanguage(ByVal sFile As String) As String
    Dim lDummy As Long
    Dim s as string * 50
    Dim sBuffer() As Byte
    Dim lBufferLen As Long, lVerPointer As Long
    Dim lVerBufferLen As Long
    Dim i As Integer
   
    'Attempt to retrieve version resource
    lBufferLen = GetFileVersionInfoSize(sFile, lDummy)
   
    If lBufferLen > 0 Then
        ReDim sBuffer(lBufferLen)
       
        If GetFileVersionInfo(sFile, 0&, lBufferLen, sBuffer(0)) <> 0 Then
            If VerQueryValue(sBuffer(0), "\VarFileInfo\Translation", lVerPointer, lVerBufferLen) <> 0 Then
                If (lVerBufferLen >= 4) Then
                    CopyMemory i, ByVal lVerPointer, 2
                    Call VerLanguageName(i, s, Len(s))
                    GetLanguage=s
                Else
                    GetLanguage = "N/A"
                End If
            End If
        End If
    End If
End Function
0
 
LVL 3

Author Comment

by:ehout
ID: 6993808
Hi,

Was curious, but the link is invalid?

Kind regards
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6993819
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Author Comment

by:ehout
ID: 6993864
Thanx,

This was very helpful. I have been on the site too, That picture on the background, [quiet, bit shy voice] is that you? [back to normal voice].

However, The app is very basic. Do you provide the source for further development?

Kind regards.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6994235
Nope, that isn't me. I'm just another admirer ;-)

I would provide the source code if you can tell me the goals. If the application can be optimized by you I would be glad to give you the source code and see the eventual result!

CJ
0
 
LVL 3

Author Comment

by:ehout
ID: 6995695
OK, I'll contact you further by mail
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DO Loop not working 4 63
MS Access - Capture pressed key onclick 4 21
VBA filters 2 39
Copy a row 12 53
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

20 Experts available now in Live!

Get 1:1 Help Now