How to convert a %Stream.GlobalBinary into a byte array to pass to a DLL
We need to know how to pass a certain value, which in the .NET world is described as a byte array (i.e. byte[])
Background:
We have various libraries that were created in .NET 4.5 that are registered for COM interom, an example that we have is as follows:
.NET Signature:
public static byte[] CreateQrCode(string content, int width, int height, string imageFormat)
.NET utilisation:
byte[] image = Writer.CreateQrCode("http://redacted/", 100, 100, "png");
Intersystems utilisation:
do streamQrCode.CopyFrom(objGenerator.CreateQrCode("http://redacted/",100,100,"png"))
PROBLEM: We need to know what object to pass from Intersystems that the .NET DLL will receive it as a byte[] (i.e. byte array). The two values that we don't know how to pass are howtopassthis1 and howtopassthis2
.NET Signature:
byte[] DrawImage(byte[] backgroundImage, byte[] imageToDraw, float x, float y, float width, float height, string imageFormat)
.NET Utilisation:
byte[] resultingimage = Writer.DrawImage(backgroundimage, smallimage, 1400, 600, 600, 300, "png");
Intersystems Utilisation:
do streamNewImage.CopyFrom(objGenerator.DrawImage(howtopassthis1, howtopassthis2, 1400, 600, 600, 300, "png"))
Can anyone help us pass howtopassthis1 and howtopassthis2?