Type INCL_BIN
	
	p As Any Ptr
	
	iLen As Long
	
End Type

ReDim Shared As INCL_BIN inc_bin(0)

Sub addInclude_binary_info(pAny As Any Ptr , iLen As Long) export
	
	if pAny andalso iLen then
	
		Dim iCount As Long = UBound(INC_BIN)
		
		INC_BIN(iCount).p = pAny
		
		INC_BIN(iCount).iLen = iLen
		
		ReDim Preserve As INCL_BIN inc_bin(iCount+1)
	
	endif
	
End Sub

function UBoundIncBin(pBuf as any ptr) as Long Export
	
	Dim iCount As Long = UBound(INC_BIN)
	
	For i As Long = 0 To iCount - 1
		
		If inc_bin(i).p = pBuf Then
			
			Function = inc_bin(i).iLen
			
			Exit For
			
		EndIf
		
	Next
	
End Function