Transferring a string to Outlook Express on a W98SE machine

  • Thread starter Thread starter Patrick de Ridder
  • Start date Start date
P

Patrick de Ridder

string message = string.Format( "mailto:{0}?subject={1}&body={2}",
e_address, subject, body );
Process.Start( message );

These lines transfer an email text to Outlook Express.
body is a string in which all \r\n have been replaced by
%0d%0a, which works fine on my XP machine
but the application breaks down on W98SE. It would
appear that the problem lies in the length of the
body string. Because when the string is short
the application does not break down on W98SE.
Is there an explanation for this? Please help.
 
Patrick said:
string message = string.Format( "mailto:{0}?subject={1}&body={2}",
e_address, subject, body );
Process.Start( message );

These lines transfer an email text to Outlook Express.
body is a string in which all \r\n have been replaced by
%0d%0a, which works fine on my XP machine
but the application breaks down on W98SE. It would
appear that the problem lies in the length of the
body string. Because when the string is short
the application does not break down on W98SE.
Is there an explanation for this? Please help.

Invoked this way, Process.Start() uses the ShellExecuteEx() API, passing
in your string in the the lpFile field of the SHELLEXECUTEINFO structure
(I think).

Maybe Win98 has a limitation on the length that is supported for that
string. Also, .NET calls this API on win98 using the MS Layer for
Unicode, which adds Unicode support to Win9x (to a certain degree).
It's possible that this layer is where the limitation might be.

You could verify this by writing a quick-n-dirty Win32 app that calls
ShellExecuteEx directly (and via MS Layer for Unicode) to see if that's
the problem. If it is, then you might not have a choice but to find an
alternate method of providing the message body to Outlook Express, or
limit the length of the message - at least on Win9x.
 
Hi Mikeb,
Thank you for your thorough explanation.
What would an alternative method be
to get a message across to Outlook Express?
Patrick.
 
Patrick said:
Hi Mikeb,
Thank you for your thorough explanation.
What would an alternative method be
to get a message across to Outlook Express?

I'm sorry, but I have no clue on that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top