Hi, its possible pass length as reference? I have function what get BSTRptr (pointer to BSTR struct), so length pointer is BSTRptr - 4. Its possible pass this pointer directly, or its necessary do somethig as...

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, Length As Long)

.....
dim i as long
CopyMemory i, byval BSTRptr - 4, byval 4
.....

... dereference and pass value?