Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created June 20, 2015 21:00
Show Gist options
  • Save kumatti1/e3efaea90c7a77340794 to your computer and use it in GitHub Desktop.
Save kumatti1/e3efaea90c7a77340794 to your computer and use it in GitHub Desktop.
E_INVALIDARG
Private Declare PtrSafe _
Function InitVariantFromVariantArrayElem Lib "Propsys" ( _
ByRef varIn As Any, _
ByVal iElem As Long, _
ByRef pvar As Variant _
) As Long
Sub hoge()
Dim hr&
Dim arr, Vnt
arr = Array(0&, 1&)
hr = InitVariantFromVariantArrayElem(arr(0), 2, Vnt)
Debug.Print Hex$(hr)
Stop
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment