Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFM app calling to BSD sockets interface




Do you use CFSocketCreateWithNative or another function that needs a pointer to callback function ?
In that case, you need to convert your CFM pointer to a Mach-O pointer before passing it.


Tak a look at the CFM_MachO_CFM sample code on Apple Developer Connection :
http://developer.apple.com/samplecode/CFM_MachO_CFM/listing1.html


The MachOFunctionPointerForCFMFunctionPointer function might be what you need.


Hope this helps. Eric


Le 10 mars 06 à 14:34, Paul Chadha a écrit :

Hi Folks -

I'm facing a very strange situation. I have a CFM application which is
trying to use BSD sockets for a client/server communications (the client is
a CFM app and the Server is a Mach-O app).


I'm loading the system framework and binding the function pointers properly
and doing the correct CFM to Mach-O bridge from the Client Side (i.e. CFM).


All of the socket functions I am using are fine (i.e. execute correctly and
I'm getting the expected results), but when I call the "send" or "connect"
functions my client app (which is CFM) based crashes.


What I did was then make a Mach-O bundle which basically does a pass through
to the BSD sockets from my CFM client app. I load that Mach-O bundle from
the CFM client app and everything works.


Is there something that I can't do from the CFM side when using the BSD
sockets interface? Or am i plain wrong in my code?


Thanks & Regards -

Paul Chadha
--
Recosoft Corporation
Osaka, Japan
English URL:www.recosoft.com
Japanese URL:  www.recosoft.com/japan
Phone: +81-6-6443-0015 Fax:+81-6-6443-1458
email: email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/earlotti% 40orkis.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden
References: 
 >CFM app calling to BSD sockets interface (From: Paul Chadha <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.