• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: invalid conversion from void* to void**
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invalid conversion from void* to void**


  • Subject: Re: invalid conversion from void* to void**
  • From: "Marc Wan" <email@hidden>
  • Date: Sat, 7 Oct 2006 14:51:22 +0800


  ni hao!

  QueryInterface requires the last parameter to be of type (void **).  You've cast your pointer to a pointer as LPVOID, which is (void *).  I'd just change the cast to either (void **) or (LPVOID *).



  [As an aside, where does one use QueryInterface on a Mac ???]


  marc.


On 10/7/06, Alfred Van Hoek < email@hidden> wrote:
Might be trivial, but what used to compile does not anymore:


Given:

    IOFireWireAVCLibUnitInterface** avcUnit;

   

    // ask for the AVC unit interface
    result = (*interface)->QueryInterface( interface,
    CFUUIDGetUUIDBytes( kIOFireWireAVCLibUnitInterfaceID ),
    (LPVOID)&avcUnit );

The compiler chokes on (LPVOID)&avcUnit. This is how it should be called though, (LPVoid)avcUnit will lead to a crash. Any pointers?

Allfred

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: invalid conversion from void* to void**
      • From: Steve Checkoway <email@hidden>
References: 
 >invalid conversion from void* to void** (From: Alfred Van Hoek <email@hidden>)

  • Prev by Date: Re: OpenGL error
  • Next by Date: Re: invalid conversion from void* to void**
  • Previous by thread: invalid conversion from void* to void**
  • Next by thread: Re: invalid conversion from void* to void**
  • Index(es):
    • Date
    • Thread