Jump to content
Sign in to follow this  
loki5100

Objective-c Completion handler to Delphi

Recommended Posts

In Objective-c header I have this :

- (void)offerForConstraints:(RTCMediaConstraints *)constraints
          completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp,
                                               NSError *_Nullable error))completionHandler;

That I translate like this:

type

  TWebRTCPeerConnectionOfferForConstraintsCompletionHandler = 
    procedure(sdp: RTCSessionDescription; error: NSError) of object;

procedure offerForConstraints(
  constraints: RTCMediaConstraints; 
  completionHandler: TWebRTCPeerConnectionOfferForConstraintsCompletionHandler); cdecl;

But every time I call offerForConstraints I Have :

Access violation at address 0000000183398910, accessing address 0000000EBA24BEB8

Any idea what going wrong?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×