I'm using the JEDI .NET support to call methods on a class from a .NET assembly, using the method outlined in the part after "Update", here:

I'm using the JEDI .NET support to call methods on a class from a .NET assembly, using the method outlined in the part after "Update", here:

https://stackoverflow.com/a/2052196/3164070

Except that I'm receiving the error:

EOleException with message 'Method 'MTData.Transport.Tracking.TrackingAPI.SendDriverMessage' not found'

Using ILSpy I can see that the method is public, and I am able to call other methods on the same class. I note that the method has a "default" parameter, and I'm wondering whether that's causing the problem. ILSpy shows the method as:

public DriverMessage SendDriverMessage(int fleetId, int vehicleId, string message, string messageRef, bool replyRequired, string name, string location, string phoneNumber, double latitude, double longitude, DateTime? expiryDate = default(DateTime?))

Any clues as to how to resolve this? Note that the supplier of the assembly is unwilling to modify their assemblies to strongly name them, or to make any of them COM visible
https://stackoverflow.com/a/2052196/3164070

Comments

  1. I can produce an MCE if it helps. It won't be Verifiable against the assemblies I'm using since I'm not allowed to distribute them

    ReplyDelete
  2. Just FYI: I'm one step closer. I no longer receive the "method... not found" error, through the use of the BindingFlags_OptionalParamBinding flag (which I stumbled across while Googling right now).

    Now I receive an AV with an address of 00000000, so presumably there's a rogue nil in my code somewhere..

    ReplyDelete
  3. David Nottage David, you can use this to call a .net assembly like System.Security.Cryptography, or just assemblies that you create and build?

    ReplyDelete
  4. Fernando Rizzato As far as I know you can use the technique for any assemblies. My problem is now I have an AV happening when attempting to call a method, and apparently no way of knowing what it causing it (none of my references are nil; it appears to be emanating from within the .NET code)

    ReplyDelete
  5. David Nottage Thanks! I'll give it a try with something that a customer is requesting here, let's see. I'll post my findings.

    ReplyDelete

Post a Comment