• 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: Carbon CFM callbacks for CFNetServices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon CFM callbacks for CFNetServices


  • Subject: Re: Carbon CFM callbacks for CFNetServices
  • From: Kris Amico <email@hidden>
  • Date: Mon, 20 May 2002 12:04:01 -0700

Check out the CFMMachOCFM example. I *believe* it can be found in the Carbon
SDK.

On 5/20/02 11:37 AM, "Dean Dauger" <email@hidden> wrote:

> Hi All,
>
> I'm trying to use CFNetServices from my Carbon CFM app written using CW Pro
> 6 and linked with CarbonLib 1.5. I have trouble with the callbacks,
> specifically the CFNetServiceBrowserClientCallBack passed to
> CFNetServiceBrowserCreate(). The code works while inside a Mach-O command
> line executable, but, the crash occurs when I run the same code from inside
> a Carbon CFM app.
>
> From what I can tell, when CFNetServices attempts to inform me of a new
> registration, the code crashes with an illegal instruction error because
> CFNetServices attempted to call an obscure area of memory rather than my own
> code. (I can tell by using gdb to report the stack info, and I can see that
> the crash occured at an address consistent with that reported by my Carbon
> code, but, according to gdb, my main() and other routines are in a
> completely different part of memory, and the CF code is in yet another
> part.) How do I give CFNetServices the correct procedure pointer?
>
> Thanks!
> Dean
>
> P. S. My speculation is that I need to create the correct UPP for the
> callback, much like how you would use NewModalFilterUPP to pass a filter
> proc to ModalDialog(). I'm jumping through CFBundle-style hoops to call
> CFNetService* routines, and I suspect my proc pointer isn't being
> interpreted properly.
>
> P. P. S. BTW, using CFBundleGetFunctionPointerForName did the trick for
> those CFStringRef extern's! Thanks!
> _______________________________________________
> macnetworkprog mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/macnetworkprog
> Do not post admin requests to the list. They will be ignored.


--
Kris Amico <email@hidden>
Senior Software Engineer
Macintosh Client Software Development
EarthLink, Inc.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Carbon CFM callbacks for CFNetServices (From: "Dean Dauger" <email@hidden>)

  • Prev by Date: [ANN] Developer for rent
  • Next by Date: CFNetwork Website
  • Previous by thread: Carbon CFM callbacks for CFNetServices
  • Next by thread: Re: Carbon CFM callbacks for CFNetServices
  • Index(es):
    • Date
    • Thread