|
PIEBALDconsult wrote: For the last few months I've been driving the system admin nuts by having the email server play Westminster chimes.
Sweet
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have been experimenting and searching for quite a while, and decided to finally throw in the towel and ask for help. My requirement is to enable our user to create an e-mail, containing formatted body text and an attachment, and have that e-mail be created in his/her default e-mail client. In other words, the user clicks a "Send E-mail" button and the e-mail editing window of their default e-mail client pops open with a "ready-to-send" e-mail waiting there, with attachments and all.
After investigating numerous possibilities, I've realized that this is not going to be as easy as I once assumed it would be. We cannot use the old "mailto" trick because we must pass an attachment. We cannot use the "roll your own e-mail editor" solution because v1 of our application allowed (some) users to open their default email client -- but the technique used is extremely unreliable and Outlook-centric...hence the rewrite.
Ideally the solution will be ignorant of the various e-mail clients with which it might interact. I'd prefer not to have some horrid code like:
if (defaultEmailClient.IsOutlook2007)
{
}
else if (defaultEmailClient.IsThunderbird)
{
}
Again, the core issues are:
1) Must create a new e-mail in the user's default e-mail client.
2) Must be able to specify one or more attachments for the e-mail.
3) The code should not have direct knowledge of the exact e-mail client with which it interacts.
Any help/tips/pointers/etc. regarding this seemingly simple problem would be greatly appreciated.
:josh:
My WPF Blog[ ^]
Without a strive for perfection I would be terribly bored.
|
|
|
|
|
Nevermind me, I found the answer right here[^] on CP.
:josh:
My WPF Blog[ ^]
Without a strive for perfection I would be terribly bored.
|
|
|
|
|
how do i convert java.io.FileInputStream to System.IO.Stream
|
|
|
|
|
AFAIK, you can't. There is no conversion from the java.io.FileInputStream type to the System.Io.Stream type. They're not in the same inheritance tree.
Also, the java version doesn't expose any method for getting the underlying file handle, so there's no way to tell a new instance of the Stream class which handle to use.
|
|
|
|
|
Hi All,
I've been googling on Framework64 pretty much all morning, but I have two questions which I've yet to find an answer for (the answer may well have been in what I read, but my ability to comprehend may not)...
1)If I "compile" my .Net application for x64 processors, it tells me that mscorelib.dll and system.data.dll target a different processor. Is there a way to automagically change all references to use the x64 versions, or do I have to do this for each manually?
2)Running an x64 .Net exe on a 32-bit windows machine generates the message "Not a valid Win32 application". This is pretty much what I expected, but leads me to wonder how this fits in to the whole JIT compiling of .Net apps - possibly my understanding is at fault here, but I believed that a .Net exe isn't actually compiled to native code anyway. Does this mean that there are two types of (do they call it PE?) .net IL code, x86 and x64?
3) Ok, so I said only two questions - but this one just occured: are there any recommended practices which dictate not specifying a specific processor type, and letting the target machine determine what to do? Would this even work?
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
martin_hughes wrote: Is there a way to automagically change all references to use the x64 versions, or do I have to do this for each manually?
As far as I know, there isn't anything that automatically does this for you if you explicitly specify the processor architecture for the compiler.
martin_hughes wrote: but I believed that a .Net exe isn't actually compiled to native code anyway.
That is correct. Any .NET application is actually compiled to IL code. When the application runs, the JIT "finishes" the compilation down to native code. As far as I know there aren't two different types of IL, but there are most likely instructions (meta data) in the IL that tell it what architecture it was compiled for.
martin_hughes wrote: are there any recommended practices which dictate not specifying a specific processor type, and letting the target machine determine what to do? Would this even work?
I believe one of the options is "Any CPU" which generates platform independent code that will run as a native 32-bit or native 64-bit application depending on the architecture.
The only issue is that you can't mix "modes", meaning that if you have 3rd party dependencies that aren't available as 64-bit images you will get a runtime error if you compile as a 64-bit application.
|
|
|
|
|
Magic - thanks Scott.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Hi there
i have a asp.net app and i can;t make it work on my machine
IIS is working
SQL server 2000 is on
i have attached the database through visual studio 2003 i have access to it but in thew servers panel i get data source not found
though i can modify my db and i can browse the .aspx files but ofcourse i have no communication with the database,so nothing works...
i 'm fresh to asp and i really need your help
thanks
ninja coding
ninja coding
|
|
|
|
|
You need a basic course in ASP.NET, Your question is very general.
You can start from here http://www.w3schools.com/aspnet/default.asp[^]
there's lot to learn as a beginner.
Any systematic work reflects its significance for a long time. So let's discuss the best...
|
|
|
|
|
Yes i know and thanks for the advice
but i'm not new in programming got lots of experience in php and java
What bothers me is that i can't get it started
i installed Sql server 2000 with the windows Authentication system,also use this in my webConfig file
After a small search i found out i have to set up the app in the iis with the same authentication protocol [thought that this was the solution]
No, i got still the same
So nobody in this great site has ever seen "Data source not found" in their server explorer in visual studio?i do the search ...no results it's always "data source name not found or driver..."
i hate microsoft
Please help
thnks
ninja coding
|
|
|
|
|
To be honest, I never use the server explorer, nor is there any need for you to do so. Your DB communication is in no way related to the server explorer. If you write a proper data layer for your app, then you won't really expect to see any database connectivity within the IDE at all.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
there is no differece between asp.net or vb.net or c# for connection or fatch from data base .. you have missing command objects
dim objcmd as new sqlcommand
|
|
|
|
|
thanks for the reply
could u please explain how will i use this ?
bit confused
thanks
ninja coding
|
|
|
|
|
Hello,
I am using C# ,APS.NET,MYSQL
In my database I have got 4 field PictureFilefile_id type int, PictureFilePictfile_name type varchar, PictureFilefile_size int , file MEDIUMBLOB
I have the following code to fetch the details from database
========================================================================
MySql.Data.MySqlClient.MySqlConnection conn = new MySql.Data.MySqlClient.MySqlConnection();
MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand();
MySql.Data.MySqlClient.MySqlDataReader myData ;
string SQL;
UInt32 FileSize;
byte[] rawData;
FileStream fs;
conn.ConnectionString = CreateConnStr ("127.0.0.1", "dbourwebsite", "root", "root", "3306");
//SQL = "SELECT file_name, file_size, file FROM file";
SQL = "SELECT PictureFilefile_id, PictureFilePictfile_name, PictureFilefile_size, file FROM tblpicturefile where PictureFilefile_id=1";
try
{
conn.Open();
cmd.Connection = conn;
cmd.CommandText = SQL;
myData = cmd.ExecuteReader();
DataTable dtPictureTable = new DataTable();
dtPictureTable.Load(myData);
GridView1.DataSource = dtPictureTable;
GridView1.DataBind();
if (!myData.HasRows)
throw new Exception("There are no BLOBs to fetch");
=======================================================================
In the DESING VIEW
===================
<asp:gridview id="GridView1" runat="server" backcolor="LightGoldenrodYellow" bordercolor="Tan"
="" borderwidth="1px" cellpadding="2" forecolor="Black" gridlines="None" visible="False" autogeneratecolumns="False" width="532px">
<footerstyle backcolor="Tan">
<columns>
<asp:boundfield datafield="PictureFilefile_id" headertext="Image ID">
<headerstyle horizontalalign="Left">
<asp:boundfield datafield="PictureFilePictfile_name" headertext="Name">
<headerstyle horizontalalign="Left">
<asp:imagefield dataalternatetextfield="file" headertext="Piture Image" dataimageurlfield="file">
<headerstyle horizontalalign="Left">
<selectedrowstyle backcolor="DarkSlateBlue" forecolor="GhostWhite">
<pagerstyle backcolor="PaleGoldenrod" forecolor="DarkSlateBlue" horizontalalign="Center">
<headerstyle backcolor="Tan" font-bold="True">
<alternatingrowstyle backcolor="PaleGoldenrod">
================================================================================================
it fetch the details vorrect from database but insetad of image it says Sysytem.Byte[].
can you suggest me ways or tell me where I am wrong
regards
Aditi
|
|
|
|
|
where's code for your image data.
something like
rawData= (byte[])myData["file"];
and you need to take some template column to display that in Grid. You are missing a lil. see this:
http://www.odetocode.com/Articles/172.aspx[^]
Any systematic work reflects its significance for a long time. So let's discuss the best...
|
|
|
|
|
hi aditi
your image datatype u can take binary your problem is solve
have a nice day
|
|
|
|
|
hi every body
how can i build a internet chat service (WAN chat) ?
i have a server and web site but i dont know how can build this project or what algorithm i can use ?
please give me any help about this
|
|
|
|
|
Hi Mohy,
I did some checking. There's a couple ways to approach this. One is to build a basic chat using ASP.NET AJAX. The sample shows a way to start writing asynchronous Web applications using ASP.NET. I think this will show you how to implement the approach you are looking for. Check it out at Basic Chat Using ASP .NET AJAX
Another idea that might be outside the box of what you were thinking of is that you integrate with Microsoft Office Communicator 2007. There's a bunch of features that let you integrate Communicator in Windows and Web applications. You can use the SDK to show presence and embed communication entry points to Communicator in your application. You can download the SDK from Microsoft Office Communicator 2007 SDK.
Hope this helps.
-- bruce
Check out http://blogs.msdn.com/usisvde for the latest information for large and small ISV's.
|
|
|
|
|
I want to get the list of direct interfaces of a class the method Type.GetInterfaces
retrieve all interfaces in the hierarchy and it doesn't accept an BindingFlag parameter like GetMethods.
How can I do it?
|
|
|
|
|
I think you can't do that, because with interfaces there are no real hierarchies as with classes.
If a class implements an interface that extends another interface then the class implements both directly.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Just a note ... you don't inherit Interfaces, you impliment them
An interface is a definition. You impliment definitions, but inherit implimentations.
|
|
|
|
|
Hi all,
I'm now study the vista sidebar programming, and I wanna do sth when my gadget closed or sidebar closed. I found nothing in the .net framework to catch th gadget closed or sidebar closed event, anyone knows how to make this?? Or any idea???
Thanks!!
|
|
|
|
|
You will probably need to look at the Windows Vista (Win32) API and use P/Invoke calls and/or handle the WndProc messages your self.
|
|
|
|
|
I wrote COM object in VC++ 6.0, and I tried to send a meanful exception to client.
So I tried to use IErrorInfo interface.
I implement the interface in such a way:
class ATL_NO_VTABLE CPAMServer :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CPAMServer, &CLSID_PAMServer>,
public IDispatchImpl<IPAMServer, &IID_IPAMServer, &LIBID_PrivilegeAttributesManager>,
public IDispatchImpl<IErrorInfo, &IID_IErrorInfo, &LIBID_PrivilegeAttributesManager>
and in a function of a com object wrote such a code:
CComObject<CPAMServer> *pTemp;
CComObject<CPAMServer>::CreateInstance(&pTemp);
pTemp->AddRef();
SetErrorInfo(0, pTemp);
return -5;
And when I call the method in My .NET code I got a COMException with code -5. The point is that the thrown exception not only doesn't contain the ierrorinfo object, but also it does not in a manner with http://msdn2.microsoft.com/en-us/library/9ztbc5s1.aspx
I also have searched some to change the way of unmarshaling of exceptions using MarshalAs or something like that but nothing has found. Can anyone help me with the method of getting ierrorinfo object in the managed code?
|
|
|
|