CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Re: SAFEARRAY - how to use

    I'm not sure how you call the function by I believe you must be passing fixed arrays in ServerHandles and Errors. Since these 2 parameters are "out" (Byref) parameters, the runtime engine checks if the parameter is exactly the type that is needed. Dynamic arrays and fixed arrays are different and so type mismatch is generated. Your code should be like this
    Code:
    Dim arrServerHandles() As Long  ' do not use Dim arrServerHandles(100) As Long
    Dim arrErrors() As Long         ' do not use Dim arrErrors(100) As Long
    
    ...
    
    Call <object>.AddItems(<param1>, <param2>, <param3>, arrServerHandles, arrErrors)
    Hope it will help you
    Last edited by rxbagain; March 19th, 2009 at 12:03 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured