|
I am writing a utility to help deploy some applications.
This utility is used to check the pre-requisites on a PC before an install will be attempted.
One of these aplications uses MAPI.Session and CDO.Message to recieve emails and send emails via SMTP.
How can I detect if MAPI and CDO are installed on the PC using C#
Thanks for your help
Andy
|
|
|
|
|
Thanks WiB,
I know what MAPI and CDO are but I am trying to find a way of checking they are installed on a PC.
My current testing since posting the question is this - which seems to be working.
protected void CheckMAPI()
{
try
{
Type objMAPIType = Type.GetTypeFromProgID("MAPI.Session",true);
object objMAPI = Activator.CreateInstance(objMAPIType);
if (objMAPI == null)
{
txtMAPIStatus.Text = "MAPI not installed";
}
else
{
txtMAPIStatus.Text = "MAPI Installed";
}
}
catch (Exception e)
{
txtMAPIStatus.Text = "MAPI not installed";
//MessageBox.Show ("Exception - " + e.Message);
}
}
|
|
|
|
|
I am creating a ocx that is a treeview.
I am trying to capture the OnNotify with
NMHDR *phdr = (NMHDR *)lParam;
// Coming from listview?
if( phdr->code == NM_RCLICK )
MessageBox(NULL, "Right click found", "Click", MB_OK);
but i am only getting the calls when the mouse is clicked on the header, same goes for Double click, what am I doing wrong,
any help is really appreciated
shotgun
|
|
|
|
|
I don't understand... looking at your code...
What is "->"????
Why do you have so much multiplication in the code too "*"????
And surely it should be MessageBox.Show("Right Click Found", "Click");
Sorry, Only joking ShotGun, but this is the C# forum...
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Hi All,
How to read file into a structure? The file is created by VC++ 6.0.
For example:
VC++ Code:
struct MyStruct
{
short a;
int b;
char c[20];
short d;
};
CFile aFile;
...
MyStruct aStrcut;
aStruct.a = 1;
...
aFile.Write(&aStruct, sizeof(MyStruct));
I'd like to read the file into the following struct in C#, how? please advice.
[StructLayout(LayoutKind.Sequential, Pack=1)]
struct MyStruct
{
public short a;
public int b;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=20)]
public string c;
public short d;
};
|
|
|
|
|
I'm kind of new to C#, but would like to make at simple monitoring tool for my internet connection - upload/download.
Is it possible to get acces to the Sent/Received on the "Locale Area Conection Status" - dialog?
It would also be nice if I could get a value for the Sending/Receiving speed.
|
|
|
|
|
|
Yes, thank you very much
|
|
|
|
|
Anyone know how to make a control transparent. The TransparentKey property is not available in the control as it is on a form ?
|
|
|
|
|
|
Hi, I'm starting to use Active Directory and I have found many C# examples about the topic but I still cannot find something that helps me setup a development environment for Active Directory
At this point I have a vmware virtual machine running windows 2000 but the Active Directory configuration is causing me some troubles
Anyone knows about a whitepaper or any kind of material that helps me setup a development environment with Active Directory in my laptop?
Thanks
Isaac
|
|
|
|
|
|
Have a look at the latest Dwamish Sample on MSDN. They user AD and have some quite good guidelines and procedures for setting up common development/test/production environments.
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
It's stupid question (no relevance to C#, only relevance is that I want to use icons from MS Word toolbar).
Do you know which DLL in MS Office contains all the icons/bitmaps used by Word or Excel?
I googled for this Dll, but I didn't get it.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
|
Kannan Kalyanaraman wrote:
I suggest you try Resource Explorer [1]
Thx KK. I already have different tools like that. My question was specific to MS Office toolbar resources (icons/bitmaps) in the DLL.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
WiB wrote:
Try Shell32.dll
I already tried that. I want bitmap strip the one Word uses. Anyway I using the tool Kannan provided, it has search option.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
had a look in word.exe?
<a TITLE="See my user info" href=http:
|
|
|
|
|
I am trying to create a rather simple button that has an image on it. Everything is fine except that there is about 2-3 pixels worth of padding at the top of the button that I can't for the life of me get rid of. I've tried setting the image as a background image for the button and that gets rid of the padding but the image doesn't display correctly then. Is there any way to do this without creating my own button class that draws the entire button.. I really don't want to have to draw the button myself, you'd think this wouldn't be so unintuitive..
TIA,
-=- Kevin
|
|
|
|
|
Sorry for the slow response.. I just decided to make due with the few pixels of padding as it's not really worth it to worry about the space right now.. If I have the time to mess with it at a later time I may check back here and see if anyone can help..
Thanks for your reply though,
-=- Kevin
|
|
|
|
|
I have a question on setting clip regions in my custom user control. From the figure below, i have created a region in A, while B is my user control area. How do i set the clipping region so that nothing will be drawn in A? Also, in which event or function do it set it? Thanks alot.
-------------
| |
| ------- |
| | A | |
| | | |
| ------- |
| B |
-------------
Weiye, Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
Thanks for your reply. I tried out your code and manage to create a clipping region in B but A is gone. Is it possible to still see A while anything that is drawn in A and B will not be visible?
Weiye, Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
I am trying to help a friend...young guy who lives over in UK. He is starting to learn C# and I'm helping him. He has a little bit of experience in straight C, but even not too much there to be honest.
He is trying to learn C#, but from what I've worked with him so far he is really struggling more with the OO concept more than the language in general. For a book, he has "Beginning Visual C#" (a wrox book). However, from what he's told me...they don't back up enough for somebody totally unfamiliar with OO concepts.
What would be a good totally beginner C# book that goes into OO pretty well, and even better if they forget about forms for now and just do console program examples. Are there any books like that? All the books I have are a bit more advanced, and aren't suitable for him.
Can anyone give some suggestions?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
|
I just finished Tom Archer's Inside C#[^] and I thought it was a great read. It covered basic OO design concepts, and how they apply to the C# language. Great for beginners, and has enough substance for an intermediate-type guy like myself.
Definitely worth a look...
-Mike Zinni
"No sh*t it's tough. If it wasn't, everybody and their sister would be an engineer and then you wouldn't have a job."
|
|
|
|