Run-time error '424' Object required

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nilam2477
    New Member
    • Feb 2008
    • 38

    Run-time error '424' Object required

    I'm invoking COM dll method from VB program.
    COM interface method takes one of the parameter as IUnknown as below

    HRESULT SetMethod([in] long samNumber, [in] IUnknown* List);

    When i try to call this method from VB by passing "null" as the second parameter i get error "424 Object required."
    I dont want to create a new object. Why can't i pass null as the parameter? Is there any other way without creating object? Please help
  • tristanlbailey
    New Member
    • Apr 2007
    • 30

    #2
    Although I don't know of the procedure you are trying to call, since there are only two parameters in it, it is probably going to need data sent to both.

    Objects are usually sent to external DLL procedures in the form of a Long data type. This is a variable that holds a unique handle number to the object, which can be retrieved from another DLL procedure.

    How do you know the procedure requires an object? Do you have documentation on the procedure? Perhaps a better question; what is it that you are trying to achieve, exactly?

    Comment

    Working...