Here's another one, making use of a widely known typelib:
Code:Option Explicit 'Reference to: ' ' Visual Basic 6 Virtual Machine Type Library 1.0 by Michel Rutten - Declarations ' and aliases for (undocumented) functions in the VB6 runtime library. ' ' {VBVM6Lib.tlb} ' 'Docs & download: ' ' http://www.xbeat.net/vbspeed/i_VBVM6Lib.html ' Private Sub Main() Dim L() As Long Dim S() As String MsgBox "L: " & CStr(MemLong(ArrPtr(L)) = 0) & vbNewLine _ & "S: " & CStr(MemLong(StrArrPtr(S)) = 0), _ vbOKOnly, _ "Emptiness" ReDim L(1) ReDim S(1, 1) MsgBox "L: " & CStr(MemLong(ArrPtr(L)) = 0) & vbNewLine _ & "S: " & CStr(MemLong(StrArrPtr(S)) = 0), _ vbOKOnly, _ "Emptiness" MsgBox "L: " & CStr(MemWord(MemLong(ArrPtr(L)))) & vbNewLine _ & "S: " & CStr(MemWord(MemLong(StrArrPtr(S)))), _ vbOKOnly, _ "Number of dimensions" End Sub




Reply With Quote