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

Carbon CFM callbacks for CFNetServices


  • Subject: Carbon CFM callbacks for CFNetServices
  • From: "Dean Dauger" <email@hidden>
  • Date: Mon, 20 May 2002 11:37:41 -0700

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.

  • Follow-Ups:
    • Re: Carbon CFM callbacks for CFNetServices
      • From: Kris Amico <email@hidden>
  • Prev by Date: Re: Using CFNetwork on 10.1
  • Next by Date: [ANN] Developer for rent
  • Previous by thread: Re: Using CFNetwork on 10.1
  • Next by thread: Re: Carbon CFM callbacks for CFNetServices
  • Index(es):
    • Date
    • Thread