Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: importing a tlb from IDS camera.



Permlink Replies: 4 - Last Post: Mar 29, 2017 8:49 AM Last Post By: al nickels Threads: [ Previous | Next ]
al nickels

Posts: 155
Registered: 7/16/09
importing a tlb from IDS camera.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 27, 2017 8:59 AM
Can somebody provide a hint on importing the type lib for an IDS camera system. I went to component-> import typelib. Am I supposed to add this typelib as a component?
Peter Below

Posts: 1,144
Registered: 12/16/99
Re: importing a tlb from IDS camera.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 27, 2017 11:23 PM   in response to: al nickels in response to: al nickels
al nickels wrote:

Can somebody provide a hint on importing the type lib for an IDS
camera system. I went to component-> import typelib. Am I supposed
to add this typelib as a component?

The type library import creates a unit you can just add to your
project. The importer adds one or more CoClasses for the COM objects
the type library defines (they are usually found directly above the
implementation keyword). These classes act as factories, they have
methods you use to create instances of the COM objects.

You don't need to install such a unit into a IDE design-time package,
unless the COM library implements an ActiveX control, which you want to
drop on a form and configure at design-time. I prefer to do that in
code, at run-time. It avoids all the hassle of component registration
and makes it much easier to port the code to a new Delphi version.

--
Peter Below
TeamB
al nickels

Posts: 155
Registered: 7/16/09
Re: importing a tlb from IDS camera. - oops that should have been activex.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 28, 2017 8:02 AM   in response to: Peter Below in response to: Peter Below
Actually I should be importing an activeX component. The Activex does not appear in the list. Doesn't this mean that it is not registered? Does it matter which version of .net you use to register the activex .dll file? How can I discover the parameters that should be passed when registering?


Peter Below wrote:
al nickels wrote:

Can somebody provide a hint on importing the type lib for an IDS
camera system. I went to component-> import typelib. Am I supposed
to add this typelib as a component?

The type library import creates a unit you can just add to your
project. The importer adds one or more CoClasses for the COM objects
the type library defines (they are usually found directly above the
implementation keyword). These classes act as factories, they have
methods you use to create instances of the COM objects.

You don't need to install such a unit into a IDE design-time package,
unless the COM library implements an ActiveX control, which you want to
drop on a form and configure at design-time. I prefer to do that in
code, at run-time. It avoids all the hassle of component registration
and makes it much easier to port the code to a new Delphi version.

--
Peter Below
TeamB
Peter Below

Posts: 1,144
Registered: 12/16/99
Re: importing a tlb from IDS camera. - oops that should have been activex.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 28, 2017 10:07 AM   in response to: al nickels in response to: al nickels
al nickels wrote:

Actually I should be importing an activeX component. The Activex
does not appear in the list. Doesn't this mean that it is not
registered?

Yes. But you do not need to register it to import it in the IDE. There
is an Add button in the import wizard dialog that allows you to find
the DLL implementing the component and import it that way. But you have
to register the COm library to be able to use it, at least if you
want to use it by CreateCOMObject (which is what the Delphi-generated
code uses internally).

Does it matter which version of .net you use to register
the activex .dll file?

.NET does not come into play at all here. If the control is not
registered you use the Windows command-line program regsvr32 (or
regsrv32, i can never remember <g>) to register the dll. Run the
program from a command window without paramters, it then tells you how
to call it.

How can I discover the parameters that should
be passed when registering?

None, a COM DLL is registered in a standard way, there are no
parameters to pass if you do it via regsvr32.


--
Peter Below
TeamB

al nickels

Posts: 155
Registered: 7/16/09
Re: importing a tlb from IDS camera. - oops that should have been activex.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 29, 2017 8:49 AM   in response to: Peter Below in response to: Peter Below
Thank you for answering these questions. I really appreciate it.

Peter Below wrote:
al nickels wrote:

Actually I should be importing an activeX component. The Activex
does not appear in the list. Doesn't this mean that it is not
registered?

Yes. But you do not need to register it to import it in the IDE. There
is an Add button in the import wizard dialog that allows you to find
the DLL implementing the component and import it that way. But you have
to register the COm library to be able to use it, at least if you
want to use it by CreateCOMObject (which is what the Delphi-generated
code uses internally).

Does it matter which version of .net you use to register
the activex .dll file?

.NET does not come into play at all here. If the control is not
registered you use the Windows command-line program regsvr32 (or
regsrv32, i can never remember <g>) to register the dll. Run the
program from a command window without paramters, it then tells you how
to call it.

How can I discover the parameters that should
be passed when registering?

None, a COM DLL is registered in a standard way, there are no
parameters to pass if you do it via regsvr32.


--
Peter Below
TeamB

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02