vba6

Is this pointer type watertight?

北城以北 提交于 2021-01-28 07:56:06
问题 I'm trying to design a custom type that can be used in APIs which need window handles or other kinds of pointers, and which will work for all systems VBA can run on. Here's what I've got: #If (Win64 = 1) And (VBA7 = 0) Then Public Type LongLong '64-bit systems pre-VBA7 wouldn't have had LongLong LoPart As Long HiPart As Long End Type #End If Public Type Pointer 'could alternatively make a LongPtr type for pre VBA7 systems only #If VBA7 Then Address As LongPtr 'should always be correct right?