Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hi,

Posted on 2002-05-06
6
Medium Priority
?
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 total points
ID: 6993819
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses

636 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