Link to home
Start Free TrialLog in
Avatar of sapbucket
sapbucket

asked on

How to find public methods for third-party ActiveX control?

I am working with an ActiveX control that was already installed on my system, already used in code, and works great. However, the current usage of the control does not use every method. I now want to know what other methods are available to me.

I am using PERL and do not know the first thing about Visual Studio .NET (which I understand contains ActiveX viewers that may do what I need). I have .NET available to me.

Here a code snippet that I am using (PERL):
#!/usr/bin/perl -w
#use strict;

use Win32::OLE;
$imaging = Win32::OLE->new('IC.ICImagingControl') or die "oops\n";
$imaging->Device("DFK 31F03");
$imaging->VideoFormat("UYVY (640x480)");
$imaging->LiveStart();
$imaging->MemorySnapImage();
$imaging->MemorySaveImage("c:\\ocr\\test.bmp");


The activeX control acts as an interface to a FIREWIRE CAMERA that I have. You can see 6 different methods for the ActiveX control above. I only knew these existed because a previous programmer gave me code showing the methods. However, I know that there are at least 30 different methods for the ActiveX control from the product description. I do not have a password to read the online documentation from the supplier. How do I "see" or "expose" or "view" or "enumerate" the methods the activeX control provides to the programmer?

Thanks!
Avatar of weddell
weddell

I think if you add a reference to the activex control to your solution the methods and properties should then be visible using .net intellisense. So if you write the object name and a dot it should prompt you with the different public methods/properties... maybe create a vb.net application to do it as I know it has a more advanced intellisense
ASKER CERTIFIED SOLUTION
Avatar of RanjeetRain
RanjeetRain

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sapbucket

ASKER

The docs and manuals at the above links are written for VB and C. While the methods are the same, etc., the procedures for initializing the camera interface are different. The examples do not illiustrate the initialization routine: they rely upon autogenerated code specificaly tailored for VB6 or C.

I am trying to implement the ActiveX control using PERL. I have searched through the documentation for an initialization explanation but can't find one.

Basically I thought if I could find out all the methods for the ActiveX I could piece together the init sequence.


Intellisense isn't very good because it lists ALL methods, even those inherited from abstract classes, so the ActiveX specific methods are obfuscated.

What would be cool is a program that shows the whole tree of methods and routines available, in some graphical setting. That way you could see the "big picture" much easier. If you could then highlight a node on the tree it and show a link to the documentation, that would be even better.



So, my question still stands. Is there a way to do it (without using Intellisense)?

Well,

  I was able to solve my problem using the online docs RanjeetRain pointed to.

  Here is what the test script looks like:
#!/usr/bin/perl -w
#use strict;

use Win32::OLE;
$imaging = Win32::OLE->new('IC.ICImagingControl') or die "oops\n";

#--------------------------------
# Use the Dialog to get settings:
#       If we want to change settings we need to use the dialog and and save
#       the state so we can load from file.
#$imaging->ShowDeviceSettingsDialog();
#$imaging->SaveDeviceStateToFile("c:\\ocr\\device_state.xml");
#--------------------------------

$imaging->LoadDeviceStateFromFile("c:\\ocr\\device_state.xml",1);
$imaging->MemorySnapImage();
$imaging->MemorySaveImage("c:\\ocr\\test.bmp");



However, this does not satisfy the general problem of viewing an ActiveX control, outside of Visual Studio Land.



If anyone can answer this in the future I would really appreciate it.