[Lazarus] Using a component OBJ file in Lazarus?

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Using a component OBJ file in Lazarus?

Free Pascal - Lazarus mailing list
On Wed, 25 Jul 2018 13:31:08 -0400, Paul Breneman via Lazarus
<[hidden email]> wrote:

>I need to use the *same* security dongle in Lazarus.  I don't want to
>change to a different dongle.

Since Safenet does not provide any new OBJ file nĀ“than the one fpc
cannot use the only path seems to be to somehow convert it using
objconv.
But I have not yet succeeded and have given up because even if it
would be successful the solution relies on a vendor specific driver
for the operating system it will run on.
And we have had lots of problems over the years with their dongle
driver for Windows.

>I'd like a few more details on how to create the object in application code.

Simple:

var
  MyDongle: TMyDongleType;
begin
  MyDongle := TMyDongleType(NIL);
  try
    ....use the dongle functions....
  finally
    MyDongle.Free;
  end;
end;

You can also declare the dongle variable in global scope and use it in
more places.

The NIL argument is needed if the dongle is defined as a component
descendant since it has an owner:

type
  TMyDongle = class(TComponent);


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Using a component OBJ file in Lazarus?

Free Pascal - Lazarus mailing list
On 07/27/2018 02:36 AM, Bo Berglund via Lazarus wrote:
...
> And we have had lots of problems over the years with their dongle
> driver for Windows.

Thankfully we've not experienced that.

Thanks Bo for your comments!

Regards,
Paul
www.ControlPascal.com
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12