Question

I'm working on conversion of whole libraries of iOS into Delphi.

I can convert all functions, records etc..

But when I'm importing CoreMIDI there are CFStringRef constants declared as:

extern const CFStringRef    kMIDIPropertyName;

and many others that I need to import in order to use some of the functions.

I was looking at the internet and I didn't found any straight way how to do it.

Question is - isn't there some way, for example to load the DLL and get list of the parameters and somehow read the value manually?

I don't care about the effort, but I need it working. And it must work under iOS.

Thanks for any tip of suggestion.

Was it helpful?

Solution

You import symbols on iOS by using dlsym. Since dynamic link is not allowed on iOS you do not call dlopen first. Pass RTLD_DEFAULT as the module handle when you call dlsym. Like this

Symbol := dlsym(RTLD_DEFAULT, SymbolName);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top