VB 4.0 32 Bit Version.dll example needed - use functions in version dll.htm (0/1) 
Author Message
 VB 4.0 32 Bit Version.dll example needed - use functions in version dll.htm (0/1)

        I need a working example of how to use version.dll - I have tried
the code in Microsoft article Q139491, but I always get an error "DLL
function not found" when using it.  Here are the Declares from that
article:

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

Declare Function GetFileVersionInfoSize Lib "Version.dll" Alias _
        "GetFileVersionInfoSizeA" _
        (ByVal lptstrFilename As String, _
        lpdwHandle As Long) As Long

Declare Function VerQueryValue Lib "Version.dll" Alias _
         "VerQueryValueA" _
        (pBlock As Any, _
        ByVal lpSubBlock As String, _
        lplpBuffer As Any, _
        puLen As Long) As Long

Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" _
         (dest As Any, _
        ByVal Source As Long, _
        ByVal length As Long)

Declare Function GetSystemDirectory Lib "kernel32" Alias _
        "GetSystemDirectoryA" _
        (ByVal Path As String, _
        ByVal cbBytes As Long)  As Long

Now here is the offending code snippet:

  Filename = File1.List(File1.ListIndex)
   Directory = Label1(2).Caption
   FullFileName = Label1(2).Caption + "\" + Filename$

   Dim rc                As Long
   Dim lDummy            As Long
   Dim sBuffer()         As Byte
   Dim lBufferLen        As Long
   Dim lVerPointer       As Long
   Dim udtVerBuffer      As VS_FIXEDFILEINFO
   Dim lVerbufferLen     As Long

   '*** Get size ****
   lBufferLen = GetFileVersionInfoSize(FullFileName, lDummy)
   If lBufferLen < 1 Then
      MsgBox "No Version Info available!"
      Exit Sub
   End If

The offending line is the IBufferLen= line.

I'll attache the full article, in HTML format, for anyone interested.  Any
help appreciated!



Mon, 27 Jul 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB 4.0 32 Bit Version.dll example needed - use functions in version dll.htm (1/1)

2. TIME TO WIN 32-Bit DLL for VB 4.0 32-Bit or Higher (VB5)

3. Calling a user-written 32-bit dll from 32-bit vb 4.0

4. Will VB 3.0 DLLs Overwrite VB 4.0 (32 bit) DLLs

5. Version 4 16-bit to Version 4 32-bit

6. CARDS32.DLL needs to be modified for VB 4.0 32 Bit

7. CARDS32.DLL needs to be modified for VB 4.0 32 Bit

8. CARDS32.DLL needs to be modified for VB 4.0 32 Bit

9. CARDS32.DLL needs to be modified for VB 4.0 32 Bit

10. 32 bit version of prnset.dll wanted...please!!

11. seeking 32 bit cards.dll (NT version)

12. 32-bit version of NWCALLS.DLL

 

 
Powered by phpBB® Forum Software