Re: CFSocket library
Re: CFSocket library
- Subject: Re: CFSocket library
- From: Quinn <email@hidden>
- Date: Mon, 12 Jul 2004 15:01:21 +0100
At 16:29 -0600 3/7/04, Ryan Joseph wrote:
I'm making an attempt to convert CFSocket.h to pascal so I may use
these functions under my prefered language, but can not seem locate
the library in which the code is kept. I'm not sure if I could even
link this library in a carbon-pascal project but I would like to
check it out anyhow.
There are three steps here.
1. headers -- Creating a Pascal interface from a C header is your problem (-:
2. libraries -- I presume you're using the CodeWarrior Pascal
compiler? If so, you won't be able to link directly with the CF
libraries because these functions are only available to Mach-O
programs and CW Pascal produces CFM binaries. You'll need to use one
of the two techniques shown in the sample CallMachOFramework to hook
up with the library at runtime.
<
http://developer.apple.com/samplecode/CallMachOFramework/CallMachOFramework.html>
I'd definitely recommend the more complex approach (CFMLateImport) in
this case because you'll be importing a bunch of functions.
3. callbacks -- When you install callbacks (for example, to be
notified when data has arrived on the socket), you'll have to do
special things to manage the runtime architecture switch, akin to a
routine descriptor on traditional Mac OS. The CFM_MachO_CFM sample
shows how to do this.
<
http://developer.apple.com/samplecode/CFM_MachO_CFM/CFM_MachO_CFM.html>
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.