Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Does anyone know where to get the API of all the possible functions of Win32::OLE? It seems to me many methods are unknown to me until I happen to see a tutorial that uses it. Thank you. ginger

Replies are listed 'Best First'.
Re: API of all the functions of Win32::OLE
by jmcnamara (Monsignor) on Sep 14, 2002 at 21:21 UTC

    The Win32::OLE API is documented in the Win32::OLE man page or in the html pages that come with ActivePerl.

    However, from your previous post it appears that what you are looking for is not the Win32::OLE API but the API of the COM objects that you are trying to interface to.

    These APIs are generally provided as a class hierarchy in the help files of the relevant COM objects. You can also use the object browsers available from within VBA, VB and VC++. Alternatively ActivePerl provides a very useful html interface to all of the registered type libraries on its parent system. Look for the OLE Browser on the main page of the AcivePerl help.

    When you find a method or property that you wish to use you can translate it into Perl and use Win32::OLE to access it.

    --
    John.

Re: API of all the functions of Win32::OLE
by Solo (Deacon) on Sep 14, 2002 at 21:59 UTC
    Check out the Win32::OLE - Type Library Browser by Jan Dubois. ActivePerl includes an option for installing it. While I couldn't find a separate link to the Win32::OLE browser, I did stumble across some of ActiveState's documentation work for MS. I refuse to post links to MSDN because they change monthly. However, I was able to find the document in a google search with "Taking Advantage of Windows 2000 and the .NET Platform". This article, written by Jan Dubois and David Ascher in June 2002, has some excellent info for running Perl, Python, Tcl and PHP on the Win32 platform, including how to use COM/OLE scripting components.

    Now, if you'll excuse me, I feel the need to take a shower.

    --
    May the Source be with you.

    You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.

Re: API of all the functions of Win32::OLE
by hiseldl (Priest) on Sep 14, 2002 at 23:09 UTC
    Definitely look at the Win32::OLE pod, as mentioned by blaze and jmcnamara.

    Also, you can find some very useful Win32 information at Roth Consulting Perl/Win32 Programming. You may want to check out their Win32::API::Prototype extention too. Here's an example:

    use Win32::API::Prototype; @Days = qw( Sun Mon Tue Wed Thu Fri Sat ); ApiLink( 'kernel32.dll', 'void GetLocalTime( LPSYSTEM lpSystemTim +e )' ) || die; $lpSystemTime = pack( "S8", 0,0,0,0,0,0,0,0 ); # This function does not return any value GetLocalTime( $lpSystemTime ); @Time{ year, month, dow, day, hour, min, sec, mil } = unpack( "S*" +, $lpSystemTime ); printf( "The time is: %d:%02d:%02d %s %04d.%02d.%02d\n", $Time{hou +r}, $Time{min}, $Time{sec}, $Days[$Time{dow}], $Time{year}, $Time{mon +th}, $Time{day} );
    If you're a C/C++ win32 programmer, which you probably are, this should make sense.

    --
    hiseldl
    "Act better than you feel"

Re: API of all the functions of Win32::OLE
by blaze (Friar) on Sep 14, 2002 at 20:09 UTC
    Have you tried CPAN?