Solved

Hi,

Posted on 2002-05-06
6
139 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 100 total points
ID: 6993819
0
Industry Leaders: 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy a row 12 69
VB6 - Compare and highlight cell not the same 3 56
Added a column screws up code 5 69
which modules are active in VB6 project? 6 51
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

735 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