dwight C63331

Member since: Saturday, 09 June 2018
Last login: 3 months ago
Profile viewed: 52 views

No Rank
Points: 0

dwight C63331 replied to the topic 'accessing a c++ DLL from Rad Studio 10 Delphi' in the forum. 3 months ago

try creveltcomputer.com/spec.pdf
I really need to get this figured out

Read More...

dwight C63331 replied to the topic 'accessing a c++ DLL from Rad Studio 10 Delphi' in the forum. 3 months ago

attached is the documentation I have for this DLL - if you can show what I am missing I would appreciate it
I have not used a DLL that I did not create before
thanks

Read More...

dwight C63331 created a new topic ' accessing a c++ DLL from Rad Studio 10 Delphi' in the forum. 3 months ago

How do I access a DLL written in C++ that I have no access to modify from a rad 10 Delphi application
I have this info on the DLL
namespace OOP.RNG
{
public sealed class RNGInfernoServiceManager
{
public const long Zero = 0;
public const long OneBillion = 1000000000;

public static readonly RNGInfernoServiceManager
Current = new RNGInfernoServiceManager();

public RNGInfernoServiceManager()

public long[] CreateArrayOfRandomNumbers(uint arraySize = 1,
long min = Zero,
long max = OneBillion);
}
}

namespace SecurityDriven.Inferno
{
public class CryptoRandom : System.Random
{
public CryptoRandom()

public override int Next();
public override int Next(int maxValue);
public override int Next(int minValue, int maxValue);

public override void NextBytes(byte[] buffer);
public void NextBytes(byte[] buffer, int offset, int count);
public byte[] NextBytes(int count);

public override double NextDouble();

public long NextLong();
public long NextLong(long maxValue);
public long NextLong(long minValue, long maxValue);
}
}

and tried this
unit glirng1;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);


private
{ Private declarations }
public
{ Public declarations }
end;
type
trngv = class
rngvs: array[0..2] of integer;
end;

var
Form1: TForm1;

maxOdds: integer;
haswon: boolean;
rngValues: trngv;

procedure RNGInfernoServiceManager(); external 'ooprng.dll';
procedure CryptoRandom(); external 'ooprng.dll' ;
function CreateArrayOfRandomNumbers(a: integer; b:integer; c: integer):trngv; external 'ooprng.dll';

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
close;
end;



procedure TForm1.Button2Click(Sender: TObject);
begin
maxOdds := 25000000;
rngValues := CreateArrayOfRandomNumbers(2, 0, maxOdds);
if (rngValues.rngvs[0] = rngValues.rngvs[1]) then haswon := true else haswon := false;

end;

end.

If I comment out the lines under button2.click the app runs but does nothing
otherwise I get a 0x000007b error
the DLL in in the appropriate directory

Read More...