I’m calling a method like this:
SetUpForConnection AddressOf ResultReceived
ResultReceived is a method with one parameter: Data As String
In another class, I have a delegate: DlgReply(Message As String) and a property PDlgReply as DlgReply
And this is SetUpForConnection:
SetUpForConnection(Feedback as ptr)
//some hidden lines
When I compile, I get this error:
ModSearch.CSearch.SetUpForConnection, line 10
External functions cannot use ordinary strings as parameters. Use CString, PString, WString, or CFStringRef instead.
I fairly know pointers can be used for declares, but, in my case, it stays an internal method, so I really want to pass a string (not a PString or a CString).
If I change my definition of the delegate to CString instead (for testing), I don’t get a compile error, but the app crashes when the delegate is invoked.
I’m overlooking something?