Link to home
Start Free TrialLog in
Avatar of dgrrr
dgrrrFlag for United States of America

asked on

Make XP's photo resizer run from within Outlook Express? (read first pls)

If you attach a photo from within windows explorer -- i.e. right-click  on the photo, and choose Send, Mail Recipient -- it runs a convenient little "send pictures via email" photo resizer feature, before then opening an outlgoing Outlook Express message (assuming you have OE as your mail default).

BUT -- if you are using the attach file feature from within Outlook Express to attach a photo (i.e. OE runs first, then you choose photo) -- then you don't get that feature.

Is there a way to change this? (So that OE always asks to resize?)

thanks
Avatar of Mshine
Mshine
Flag of United States of America image

Does it not resize if you right click the image from you
disk drive and select send via email?
ASKER CERTIFIED SOLUTION
Avatar of nobus
nobus
Flag of Belgium image

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
SOLUTION
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
I see some content in "sendmail.dll" that appear to be the registry entries created when the dll is registered, and from my understanding it should have created a StringValue named after a {clsid-number} in the registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved
with "Sendmail Service" as the ValueData, but this doesn't exist in my registry.

The only thing I can think is that this dialog is launched because of some related commands against file associations for typical image types that are capable of being resized.

I'm pretty sure this isn't related to the Windows XP PowerTool "Image Resizer" shell extension
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
that integrates with Windows Explorer offering a new Right-Click menu to resize images, but I could be wrong.  I must check this out.
Here's how to DISABLE the popup image resizer when you send an image to a new email as an attachment using the Send To option:

http://windowsxp.mvps.org/noimgresize.htm
Article by Ramesh Srinivasan.

I think you'll need a VB programmer for the rest.

In case it disappears or is relocated, here's the content of Ramesh's article:

---------------------------------------------------------------------------------------
Disable "Send pictures via E-mail" wizard while using "E-mail this file link" in Common Tasks pane

Published: Oct 23, 2004
Updated : Aug 20, 2005

Send pictures via E-mail and the resize dialog
----------------------------------------------
From pictures folder, if you click E-mail this file link in the Common Tasks pane, the Send Pictures via E-mail dialog appears for most of the image file types. For those who wish to disable this resize image dialog and directly open the email client with the image attachment, you'll need to alter the registry and change the PerceivedType for the particular image file-type to a blank string.

To disable the resize dialog for a particular image file type
-------------------------------------------------------------

Note:
There may be some minor side-effects of using this method, as the PerceivedType string is an important information for the Windows Shell.
 
PerceivedType string helps Windows determine the actual Type for a file. In case of image preview problems or any, after following the method in this article, you can revert the setting by changing the Perceived Type to image.

Alternately, type REGSVR32 SHIMGVW.DLL in Start, Run dialog to regain the functionality.

For JPG file types, open Regedit.exe and navigate to:
  HKEY_CLASSES_ROOT\.JPG
Backup the key by exporting it to a file.
In the right-pane, double-click PerceivedType and assign a blank data to it.
Close Registry Editor.
 
Similarly make changes for the other image file-types if necessary. Resize dialog does not appear and the default E-mail client opens directly with the image attachment.

Related articles
----------------
Why don't the Resize Pictures dialog appear while sending picture to e-mail?
http://www.winxptutor.com/resizeimage.htm

Resize Image files with a right click menu
http://www.winxptutor.com/imgresizer.htm


 
Avatar of dgrrr

ASKER

Mshine  - please reread the post

Nobus - using a photo resizer will be required as a separate step, which I'm hoping to avoid. (In meantime I'm suggesting the resizer for several people)

BillDL - most of your comments seem to be over my head... as you said I might need  a "VB programmer"
And as you know, a lot of it seems relevant to starting email prog from windows explorer, rather than running OE.
  PS -- How do you "see content" inside a dll file? (May require more learning on my part)

Seems like this is a tough one...
dgrrr

Yes, this is a tough one, and if someone with the knowledge of Doug Knox MS MVP (http://www.dougknox.com/) says:
"This occurs when you use the Send To menu to send it to Mail recipient.
I don't believe it does when you manually attach a file in an open message",
then I'm inclined to believe him.
http://www.mcse.ms/showthread.php?t=1671134

That said, however, a skilled Windows programmer would probably be able to figure out the respective function calls and create another "redirection" DLL to show the dialog when you click the "attach" button of Outlook Express.  
 
I am not terribly conversant with Visual Basic or Visual C++ Programming.  Someone who does know about these Programming Languages would no doubt find it a lot easier to give a more defined answer as to whether this was possible or not.  I know enough to get a general grasp of what a Visual Basic script file does, and I have a reasonable idea of how a process can call upon the resources contained inside a DLL file to perform some other action, but I do not know enough to actually sit down and write a VB Script.

That's the reason I suggested that this question would perhaps have been more expertly addressed in the topic areas where Windows Programmers or Visual Basic Programmers deal with programming code on a daily basis.  I had hoped to give you a head start by narrowing down some areas of the registry and the files involved IF you happened to know more than me about programming.

I had started to type out an explanation that explained how certain processes make calls to specific functions in DLL files to perform the desired result, eg. showing a dialog, but I've found a workaround.

Read down to the section in this comment entitled "Informative Only" if you really want to read what I had typed up.  Otherwise just try the workaround that was staring me in the face.

I stated in one of my comments:
>>>
"I'm pretty sure this isn't related to the Windows XP PowerTool "Image Resizer" shell extension
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
that integrates with Windows Explorer offering a new Right-Click menu to resize images, but I could be wrong.  I must check this out.

Well, I DID check it out and it IS NOT the same function.  They use entirely separate files and, although they both integrate in some way with Windows Explorer, they should not be confused.

My workaround, however, USES this PowerToy add-in.

1. Download the "Image Resizer" PowerToy and install it
2. Open a new email in Outlook Express
3. Browse for an image file to attach in the usual way
4. From the "Insert Attachment" dialog (which is really just a miniature display of Windows Explorer) RIGHT-Click the image to be inserted.
5. Choose the "Resize Pictures" option and the PowerToys dialog will show
6. Make sure that the option to "Resize Original Pictures" IS NOT ticked
7. When you choose the desired options and click the "OK" button, the "Insert Attachment" window still stays open and refreshes itself to show a resized copy of the image with (small) in the file name.
8. Insert that image instead.

It's not very elegant, and doesn't have the image preview window, but if you want to use the inbuilt Windows XP one, then the "Send To > 'Mail Recipient'" option is still available from the file list in the "Insert attachment" window.

Try it and I'm sure, like me, you'll wonder why you didn't spot this before ;-)

Now for the technical stuff, seeing as you asked, and seeing as I had already typed it.

Regards

Bill

***** INFORMATIVE ONLY *****

>>> "how do you see the contents inside a dll file?" <<<

There are various utilities that can either extract text-based content out to notepad (peek), view the "functions" as a list (QuickView Plus), or view many of the other "resources" (Resource hacker).  I'll supply download url's for Peek and Resource Hacker, but QuickView Plus is retail.

Just to explain what a DLL file actually is.  It means "Dynamic Link Library" and is generally a way of packaging up a lot of resources into one bundle whereby other DLL's or processes can tap directly into a given resource within it and do something else, depending on what function or resource is being called from it.

DLL's contain a number of different resources, including Bitmap image files, Icons, Menu's, Dialogs, Text-based "strings" used for info or error messages, Registry settings created when a DLL file is "registered", and loads more.

When I mention "registering" a DLL, what I mean is that this is done either during a software installation process, or manually afterwards.  All it does is copy it to (most usually) the C:\Windows\System32 folder and create the registry entries that are actually contained in the DLL file.  These can vary according to what the DLL is designed to do, but it could be that it is used to add extra functionality to the Windows "shell" (eg. provide a new Right-Click menu option).  Registering a DLL file manually is done by running the program file REGSVR32.EXE and telling it the name of the file to register.  If the DLL can be registered manually this way, then it will be, but not all dll's can be.

When a DLL file is "called" by some other process, that process needs to be able to find what is referred to as an "entry point".

Let me give you an example of what I mean by an internal DLL "function".
The file "shell32.dll" is a core Windows file that contains a massive number of resources that make up the Windows "shell".  When I say "shell", I mean Windows Explorer and all of its appearance, functionality, etc.

One of the functions contained inside shell32.dll is named "Control_RunDLL", and this is used to then show what you know as the Control Panel.  The following command issued from your Start Menu's "Run" field will open the Control Panel:

rundll32.exe shell32.dll,Control_RunDLL

So, "RunDLL32.exe" is specifically calling that function from within shell32.dll.  Without the comma and the function name, it will do nothing.  The function "Control_RunDLL" can call up specifically named Control Panel Applets and show them.  An "applet" is just a *.CPL file that contains its own resources similar to a DLL file, or may prefer to have them all contained in a companion DLL file of the same name as the *.CPL file.  So, if I wanted to open the "Desktop Properties" control panel option named "display" (desk.cpl), I would tell the "Control_RunDLL" function inside shell32.dll to call "Desk.cpl".  Try it and see for yourself:

rundll32.exe shell32.dll,Control_RunDLL desk.cpl

Furthermore, if you wanted to open the display properties on a specific Tab, you would name that tab in the command.  They start from Zero as you would see them from Left to Right in the dialog, so the "Screen Saver" tab is No. 1:

rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1

The "send pictures via email" photo resizer feature is contained as resources within C:\Windows\System32\sendmail.dll.

This DLL file seems to be primarily used to Send (things) to either the "Desktop as Shortcut" OR "Mail Recipient", as the "send" part of the DLL's name implies.  It is not working by itself though, because items that show on the "Send To" Menu are files or shortcuts that are physically in the "SendTo" folder which, on an XP system can be different for each user:

C:\Documents and Settings\<UserName>\SendTo\FileName.ext

In the case of the Send To > "Mail Recipient" option from the Right-Click, the file used is named ""Mail Recipient.MAPIMail".
You are just seeing its name "Mail Recipient" on the Right-Click Send To menu because the .MAPIMail extension is hidden.

As you will be aware, the Windows Registry stores "File Associations" for different File Types known under the key HKEY_CLASSES_ROOT\ and may be cross-referenced to other registry keys and values.

For instance, the *.TXT file type defines this type of file as a "textfile" and the associated program that is set to open it is stored under the "textfile" key in the registry.

The *.MAPIMail file type ie. "HKEY_CLASSES_ROOT\.MAPIMail" has, instead of a common name like the "textfile" one for the *.TXT file type, another type of value.  This is a "CLSID", which is an abbreviation for a unique "Class Identifier".

There are literally thousands of unique "Class Identifier" numbers stored in the registry in this type of format:
{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}

It is good way of uniquely identifying settings that then have to be cross-referenced repeatedly to other registry settings.  The Class Identifier for the *.MAPIMail file type is set as the one stated above.

Normally you would be able to find a variety of settings under that CLSID which state what "library" (ie. a DLL) to use and many other settings that govern the behaviour and manner in which this is used within Windows.

As an example, Windows assigns the Class Identifier:
HKEY_CLASSES_ROOT\CLSID\{F1B9284F-E9DC-4e68-9D7E-42362A59F0FD}
to the Media Player function "WMP Add To Playlist Launcher"
and there defiles what file types can bee added to a playlist, the dll to use to show the dialog (wmpshell.dll), and contains further cross-references to other areas of the registry.

The CLSID for the "Mail Recipient.MAPIMail" is stored as:
HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}
Unfortunately there is nothing useful in that registry setting other than telling me what I already know, which is that "sendmail.dll" is assigned as the DLL used by this file type.

So, going back to the example of how to call a specific function within a DLL file, I had hoped that I would be able to discover the function to call just like "Control_RunDLL" was called from within shell32.dll earlier:

RunDLL32 sendmail.dll,Unknown_Function_In_DLL_to_Call
 
What I was saying, in a nutshell, is that I don't know the "function call" required to access the specific resource that makes the sendmail.dll send the file to a new email as an attachment.  I also do not know what command or function intercepts this action to pop up the "resize" option.

Neither do I know the function calls involved when you click the Toolbar Button of Outlook Express (or the menu option) to add an attachment.  If I did, then I might be able to say whether it would be possible to redirect that through the inbuilt XP Image Resizer dialog.

*********** End of Technical Stuff ***********
Thank you dgrrr