Add Explorer Shell Context Menu for jpegfile in 64-bit OS? - contextmenu

How do you add windows explorer shell context menu to 64-bit OS like this example here Simple Context Menu for jpg files?
Why doesn't adding the registry key HKEY_CLASSES_ROOT\jpegfile\shell\Simple Context Menu\command\path to exe work like it does in 32-bit? People have told me it's because you can't access 32-bit exe but I'm pointing it to a 64-bit exe? Can you not do this in 64-bit OS? Why is it so simple in 32-bit??
Found this user here on stackoverflow with same problem but no solution.
Can you not simply add it like you do in 32-bit OS?

Related

Delphi OpenPictureDialog behave different on different app

I'm using Delphi 10.1 on Windows 10
When I run the OpenPictureDialog.Execute command
on some app it's open File Explorer with a preview area and on others without.
I have exactly the same properties on both cases.
What can cause the difference?
Thanks Sorin
function GetOpenFileName; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameA; external commdlg32 name 'GetOpenFileNameA';
function GetOpenFileNameW; external commdlg32 name 'GetOpenFileNameW';
In older versions on Delphi it used a Windows API function in comdlg32.dll to open a file. I would think it is the same in newer versions. What you see in terms of preview etc. is down to Windows settings.
The dialog shows to the user will be consistent with other file open dialogs they see on their system.

Folder-opening GUI with Lua for all OSes

I'm working on an application in Lua and I wish to have the user be able to open a directory in the OS's GUI so they can edit it's contents. I don't care to track any changes made; basically I just want to open a new process. For Windows, I just use os.execute to open a Explorer window; however, I am uncertain how to do something similar for other operating systems. What are the Lua-callable equivalents for Explorer in other systems? I don't mind having to use an external library.
In Mac OS X you can do os.execute("open ~") to open a Finder window with your home directory.
Back when I used Linux, I wrote a version of open that used nautilus ~ to open the home directory in the file browser in Gnome. I'm not sure the file browser is still called nautilus or what is the equivalent in other Linux distributions.

Excel 2010 32-bit mscomctl.ocx reference missing

I have a book with macro and forms in it.
when i open the book a run time error appears and when i look in vba
tools-> reference
Microsoft Windows Common Tools is not referenced and
the reference file path is C:\Windows\SysWow64\MSCOMCTL.OCX
OS: Windows 7 SP 1 32-bit
Microsoft Excel 2010 32-bit
Other info:
The book/file is something I didn't create in my unit, its something i received
Some file work properly but some wont (those file have the same codes inside)
Does anyone knows how to fix this problem? and possible reasons why this occur?
I think this is what solves your problem:
http://social.technet.microsoft.com/Forums/office/en-US/5b241f09-6c76-4320-b302-4cb8224eab7f/controls-from-mscomctlocx-can-no-longer-be-used-in-excel-2010-32bit:
Run CMD under administrator mode
run "REGSVR32 MSCOMCTL.OCX" without the quote

Delphi 6 Exe on Vista: Problems with GetWindowText

I have an exe file compiled with Delphi 6 under Windows XP that uses a combination of EnumWindows and GetWindowText to find a window (not belonging to the exe itself) with a specific title.
The behaviour is as expected under Windows XP. On Vista computers however, it doesn't seem to work.
As the mentioned Delphi version doesn't run on Vista, I cannot change and test this directly.
However, I will try to create a modified exe on the XP computer that outputs some additional data and copy it to the Vista computer.
I would just like to ask whether anybody has any information whether there are specific problems known with exe files compiled with Delphi 6 running on Vista regarding EnumWindows/GetWindowText.
The exe uses EnumWindows and GetWindowText to find the handle of a certain window in order to then parse the title of that window in a timer event. The window title is the application name plus the name of the file opened in that application (if any file is opened). The Delphi exe analyses/uses this file name, does something with it and behaves in a certain way.
On Vista the expected behaviour does not appear, thus I presume that the window handle is not found cause GetWindowText does somehow not return the text. Another reason of course could be that EnumWindows does not work properly and the window handle of the window that the exe is looking for is never send to the EnumWindowsProc.
Assuming that there has been no change in window title from XP to Vista, there's not much that can go wrong here. I'd hazard a guess that the problem is due to UIPI. This is part of the security enhancements of Vista and it means that processes can only send messages to other processes that have equal or lower integrity level. Is this other process running elevated?
Other than that your best bet is to run this under the debugger. Delphi 6 most certainly does run on Vista. It was written before UAC and so doesn't get on well with having no rights to write to its install directory. So, install it to somewhere in your user profile or C:\Delphi6 – basically anywhere that standard users have write access.
Finally, don't fall into the trap of running Delphi elevated. This will confound the UIPI issue if indeed that is an issue here.
Good luck!

Why can't my program find its DLLs on Vista 64?

I recently got a new laptop. Unfortunately, it came with Vista. It's been one big hassle getting it to work, and the comp has hardware components for which there are no XP drivers, so I can't "upgrade" to an OS that actually works. I've mostly gotten things working, but one particularly odd problem has me stumped.
I installed Delphi and tried to build a project. It compiled, but wouldn't run. "This application failed to start because sdl.dll was not found." Fair enough. So I grabbed SDL.dll and put it in the C:\windows\system32 folder. (Using Vista 64-bit Home Premium. This is a 32-bit dll, though, so I put it in the 32 folder instead of the 64 one.)
Hit Run again. Same problem. But why? That's where it goes, right? And C:\windows\system32 is in the system path. Anyone know why it can't link to the DLL?
(And yes, I know that I can work around the problem by putting the DLL in the same folder as the .exe. I'm currently doing that as a workaround. It's a bad idea in the long term, though, because I have a handful of different projects that all require SDL.)
That is not a Vista problem, but a 64 bit Windows problem: The name System32 is really confusing, but this is actually the folder where the systems (64 bit) DLLs reside.
So on any 64 bit version of Windows...
... all 64 bit system DLLs are located in C:\Windows\System32.
... all 32 bit system DLLs are located in C:\Windows\SysWOW64.
The name comes from Windows on Windows 64 (WOW64) which is the name of the translation layer allowing 32 bit applications to use the native 64 bit system resources.
Raymond Chen recently addressed the basic reason behind why 32-bit system directories are weird on 64-bit Windows. The first paragraph of the entry is really the key to understanding the reason behind segregated 32-bit directories:
On 64-bit Windows, 32-bit programs run
in an emulation layer...If a 32-bit
program tries to look at the system,
it will see a 32-bit system.
I think you'd have to have separate directories to keep these things all separate and working. The seemingly counter-intuitive name of SysWOW64 for the directory where the files reside is makes more sense when you consider that WOW64 means Windows On Windows 64-bit, which is what the emulater that's mentioned above is called.

Resources