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: MacOS 9 PEF code fragment loading sample code



On Jul 31, 2004, at 10:25 AM, Marc Stibane wrote:
Normally, it works as expected. But when the user disables the Security Manager with "Extensions On/Off", my plug-in doesn't get loaded (it doesn't show up in the panels popup in the print dialog). If I comment out the two calls KCAdd... and KCFind... the linker will dead strip the KeychainLib - and the resulting plug-in will show up in the print dialog.

If the user is disabling system extensions that are part of the operating system, they might expect some things to break.

It seems I cannot link it to KeychainLib directly.

Weak-link against KeychainLib. This means that if it's not present, any symbols in it will resolve to the null symbol rather than cause an error on load. You can then test if any symbols imported from that library have the value kUnresolvedCFragSymbolAddress, and if they do handle the case in your code where the user disabled the extension.

If you're using CodeWarrior, you can bring up the inspector for a library to determine how it's linked.

-- Chris

--
Chris Hanson <email@hidden>
http://www.livejournal.com/users/chanson/
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >MacOS 9 PEF code fragment loading sample code (From: Marc Stibane <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.