Print Screen - 64 bit version.

pr2-eugin

Super Moderator
Local time
Today, 17:28
Joined
Nov 30, 2011
Messages
8,494
Hello,

I have been using olepro32.dll to Save the Clipboard item to a BMP file, using the AltPrintScreen method.. This works on a 32-bit environment.. However, some of my users (on the server) use a 64-bit version.. For which I was unable to add this reference (do not know why).

I tried registering the DLL on the server, but I cannot add the reference. It kept popping up with the error, "Can't add reference to the specified file".

So I had to give up on it and searched for a another method.. This function again worked amazing on a 32-bit version.. When tried on a 64-bit, it came up with
Error : 429, ActiveX component can't create object.

LOCATION OF OTHER THREAD : http://www.vbforums.com/showthread.php?585616-clipboard-activex-for-vba-vbs-etc

I have asked the OP, of the thread to see if he could look into, for which he has agreed to. But I was just wondering if someone on here, has any code that will Capture the Active Screen and save it as a BMP file?

Thank you for any help/advice offered.
 
Only for info: You are aware of that there are 2 version of regsvr32.exe?
  • 64-bit versionen er %systemroot%\System32\regsvr32.exe.
  • 32-bit versionen er %systemroot%\SysWoW64\regsvr32.exe.
 
Thanks for the reply JBH, Under the 64-bit environment I registered the (olepro32.dll) DLL under %systemroot%\SysWoW64.. And added the Reference from there.. For which I go the information "Can't add reference", so I declared the function.. as..
Code:
Private Declare PtrSafe Function OleCreatePictureIndirect Lib  "C:\Windows\SysWoW64\olepro32.dll" (PicDesc As uPicDesc, RefIID As GUID,  ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long
For which it said (during run time)
Error 42: Cannot find file olepro32.dll
Is this not the other way around?
  • (32-Bit)64-bit versionen er %systemroot%\System32\regsvr32.exe.
  • (64-Bit)32-bit versionen er %systemroot%\SysWoW64\regsvr32.exe.
 
Is this not the other way around?
Quote:
Originally Posted by JHB



  • (32-Bit)64-bit versionen er %systemroot%\System32\regsvr32.exe.
  • (64-Bit)32-bit versionen er %systemroot%\SysWoW64\regsvr32.exe.
No. :D (logical yes, but NO, NO - Microsoft tells the same in both English and Danish http://support.microsoft.com/kb/282747)
 
:banghead:

Well now am a bit confused.. This is what I did, I first registered the olepro32.dll under the SysWoW64, as it is a 32 bit dll file, onto the 64 bit machine.. And then tried to add the reference, It screamed it cannot add it.. So I declared it, with the path, it still failed to find it..

So what should I do now? I even (though it sounds lame), copied the file to System32 folder and registered it there, and tried the same, same old thing happens.. I am not sure what to do.. The Clipboard.DLL seems good, as I do not have to worry about code.. Just a library reference.. Still does not work with 64 bit..
 
I'll try to registered it when I come home, (Windows 8), only to see if I'm able to do it, (I'm not running 64 bit at the moment).
 
Sorry, we did get guest yesterday, I'll try it today.
 
Paul,

You had info in this post

Have things changed, or is it just that you are now getting into to use 64 bit?

You may try PM to Pat Hartman -- she seems to be using ( or not using) and aware of some of the details.
 
Sorry, we did get guest yesterday, I'll try it today.
Thank you JHB.. I have been working on it, read through several instructions and finally landed on this site, which lead me to change the library reference from olepro32.dll to oleaut32.dll, it works wonders now..

Paul,

You had info in this post

Have things changed, or is it just that you are now getting into to use 64 bit?

You may try PM to Pat Hartman -- she seems to be using ( or not using) and aware of some of the details.
Thank you jdraw.. :) I have been using the two version side by side, but this was a new functionality that I needed, which again worked in 32 bit, and referencing the same DLL file on a 64 bit did not work out.. So was not sure what to do.. So researched on it and found that the file that should have been referenced was oleaut32.dll..

What confuses me is that the file olepro32.dll, is statically linked to oleaut32.dll, which means that it should be loaded when this library is loaded on to the project, but for some reason it did not..

INFO : http://www.win7dll.info/olepro32_dll.html

However, using this file seems to have sorted this issue. Am happy.. :D

I have put up this complete into the code repository, which is under moderation.. I will add the link to the full code, once it is approved.
 
You got it at last, fine. :)
 

Users who are viewing this thread

Back
Top Bottom