Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!apple!snorkelwacker!ira.uka.de!smurf!nadia!ananke!kaiser From: kaiser@ananke.stgt.sub.org (Andreas Kaiser) Newsgroups: comp.lang.c Subject: Casting to far proc ptr Message-ID: <28.270D8E32@ananke.stgt.sub.org> Date: 6 Oct 90 07:35:40 GMT Organization: Ananke, Stuttgart, FRG Lines: 15 In a message of , Wm E Davidsen Jr (davidsen@crdos1.crd.ge.COM ) writes: WEDJ> I need to pass to address of a procedure to a called function. The WEDJ> procedure is near static, and I need to cast to far, or assign the WEDJ> address to a far ptr. You cannot call a near function via a far pointer. If you find way to cast the pointer, the called functions parameters will be addressed wrong and a return from the called funtion crashes you program. Near functions in a large model should never be used with function pointers. If you need the pointer, you should strip off the "near" attribute. Gruss, Andreas