Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: Win32::OLE -- translation from vbs to pl

by whumann (Acolyte)
on Aug 28, 2013 at 08:43 UTC ( #1051253=note: print w/replies, xml ) Need Help??

in reply to Re: Win32::OLE -- translation from vbs to pl
in thread Win32::OLE -- translation from vbs to pl

I don't know the Event Viewer too well. I looked at some logs but couldn't find anything related. Probably looked in the wrong place (or didn't know what to look for). Additonal poiters where to look appreciated!

The registry entries, as far as my weak knowledge goes, look o.k.. I also wouldn't exepect a problem here when the vbs works fine.

Dependency Walker reports it can't find GPSVC.DLL and IESHIMS.DLL, but these dependencies are deep down in MGCPCBAUTOMATIONLICENSING.DLL -> ADVAPI32.DLL -> WINTRUST.DLL -> CRYPT32.DLL -> .... Not sure what to make of that.

All three possible values for Win32::OLE->Initialize() don't make a diference.

There's a thread here about someone with problems porting the same code form to C#. I'm not sure if his solution (adding a reference to the appropriate COM object in visual studio) has any perl equivalent.

Any additional ideas available? Thanks, Wolfram

Replies are listed 'Best First'.
Re^3: Win32::OLE -- translation from vbs to pl
by bulk88 (Priest) on Aug 28, 2013 at 23:34 UTC
    You arent using Dependenc Walker the best way. DW has a "Profile" feature. You will have to pick perl.exe, give it command args, and run the perl process in DW. This way all GetProcAddress and LoadLibrary es will be loged. The "The specified module could not be found" message will appear in there probably or its Win32 error code equivelent (0x8******* codes are Native API/COM error codes, not GetLastError codes). What you were looking at in your post was STATIC analysis. You did put the Initialize() before any other Win32::OLE calls except the use right? Worst case, stepping Win32::OLE's XS code is the only way to figure out what happened and what exactly went wrong. I've done it before to Win32::OLE and found a bug in Win32::OLE that already was on OLE's RT page.

    Written on a smart phone so sorry for spelling mistakes.
Re^3: Win32::OLE -- translation from vbs to pl (depends.exe)
by Anonymous Monk on Aug 29, 2013 at 00:42 UTC
    oh yeah, what bulk88 is saying, try using depends.exe like this   depends.exe /c /f:1 /pb /ot:temp.txt ...perl.exe ...
      As I just reported in a separate reply, my code works with a 32bit strawberry perl. The messages I get from depends.exe, called as suggested above, for MGCPCBAutomationLicensing look fairly innocent:
      Loaded "MGCPCBAUTOMATIONLICENSING.DLL" at address 0x00550000 by thread + 7. Successfully hooked module. DllMain(0x00550000, DLL_PROCESS_ATTACH, 0x00000000) in "MGCPCBAUTOMATI +ONLICENSING.DLL" called by thread 7. DllMain(0x00550000, DLL_PROCESS_ATTACH, 0x00000000) in "MGCPCBAUTOMATI +ONLICENSING.DLL" returned 1 (0x1) by thread 7. DllMain(0x00550000, DLL_PROCESS_DETACH, 0x00000000) in "MGCPCBAUTOMATI +ONLICENSING.DLL" called by thread 7. DllMain(0x00550000, DLL_PROCESS_DETACH, 0x00000000) in "MGCPCBAUTOMATI +ONLICENSING.DLL" returned 1 (0x1) by thread 7. Unloaded "MGCPCBAUTOMATIONLICENSING.DLL" at address 0x00550000 by thre +ad 7.
      When I try the same with my default 64bit perl however, I get
      Failure starting the process. The request is not supported (50).
      And I get this even when I just use perl.exe without any args (no program to load).
        Dependency Walker comes in a 32 and 64 bit version, they only understand processes of the same bitness.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1051253]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-06-30 19:05 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (98 votes). Check out past polls.