Click here to Skip to main content
15,921,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Do you see the same results??? Pin
LongRange.Shooter11-Aug-04 5:43
LongRange.Shooter11-Aug-04 5:43 
GeneralDirectX Pin
rafQ11-Aug-04 2:29
rafQ11-Aug-04 2:29 
GeneralUrgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 2:24
shambho11-Aug-04 2:24 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
LongRange.Shooter11-Aug-04 3:22
LongRange.Shooter11-Aug-04 3:22 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 18:21
shambho11-Aug-04 18:21 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
Nick Parker11-Aug-04 3:42
protectorNick Parker11-Aug-04 3:42 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 18:31
shambho11-Aug-04 18:31 
GeneralCommit a Outllook Message automatically using the user32.dll - Problems with the right wNotifiyCode Pin
Member 7812311-Aug-04 1:51
Member 7812311-Aug-04 1:51 
Hello,

I'm working on a Mapi Agent using C#.
Everything works fine despite the fact I've to commit the nice Outlook Message
which is shown after Installing the Security Update for Microsoft if you try to send mails from other interfaces.

See the Knowledge Base Articel :
http://support.microsoft.com/default.aspx?scid=kb;en-us;263073
WD2000: Warning Message: "A Program Is Trying to Access ..." When You Send Mail Merge to E-mail After You Apply Outlook Security Update

and Information for Developers :
OL98: Developer Information About the Outlook E-mail Security Update
http://support.microsoft.com/default.aspx?scid=kb;EN-US;262700

The Problem is that I've to commit this windows automatically - because this agent should run by itself.
I already find out that I've to use the user32.dll with their functions FindWindow and SendMessage,
and that you have to use Spy++ to find out the WindowClass and the wParam and lParam in hex formate.
Indeed I'm right now at the point that I can find the window, and can send messages - WM_Command.
But the wNotifyCode is wrong, I've to send a BN_Clicked WM_Command but with my routine I send a Code 0 (send from a menue) to the Window
although I got the right hex codes.

So now my question : how can I send a BN_Clicked Message to the window?
Is there any other opportunity to commit the windows with "Yes"?

I'm grateful for any advice.

Here are some code snippets :
----------------------------------------------------------------------------------
The class for the user32.dll Import and their functions :
----------------------------------------------------------------------------------

public class Win32
{

public const int WM_COMMAND = 0x111;


[DllImport("User32.dll")]
public static extern int FindWindow(string strClassName, string strWindowName);

[DllImport("User32.dll")]
public static extern int FindWindowEx(int hwndParent, int hwndChildAfter, string strClassName, string strWindowName);


[DllImport("User32.dll")]
public static extern Int32 SendMessage(
int hWnd, // handle to destination window
int Msg, // message
int wParam, // first message parameter
[MarshalAs(UnmanagedType.LPStr)] string lParam); // second message parameter

[DllImport("User32.dll")]
public static extern Int32 SendMessage(
int hWnd, // handle to destination window
int Msg, // message
int wParam, // first message parameter
int lParam); // second message parameter

}

----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
The Main Routine with the calling routines :
----------------------------------------------------------------------------------
System.Int32 iHandle
// Finding the window :
iHandle = Win32.FindWindow("#32770", "Microsoft Office Outlook");
// Send a Message
Win32.SendMessage(iHandle, Win32.WM_COMMAND, 0x000012A6, 0)
----------------------------------------------------------------------------------

********************
There are only ten types of people in the world.
Those who understandy binary and those who do not
GeneralDataBase Problem Pin
ahegeg@hotmail.com11-Aug-04 1:47
sussahegeg@hotmail.com11-Aug-04 1:47 
GeneralRe: DataBase Problem Pin
VenkatFor.NET11-Aug-04 7:07
VenkatFor.NET11-Aug-04 7:07 
GeneralProblem verifying a signed XML document Pin
pelos11-Aug-04 1:15
pelos11-Aug-04 1:15 
GeneralJodoveepn article printing controls on a form Pin
robmays11-Aug-04 1:07
robmays11-Aug-04 1:07 
QuestionHow to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 0:20
sachinkalse11-Aug-04 0:20 
AnswerRe: How to access the object associated with tree nodes tag property? Pin
Nick Parker11-Aug-04 2:59
protectorNick Parker11-Aug-04 2:59 
GeneralRe: How to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 14:55
sachinkalse11-Aug-04 14:55 
GeneralRe: How to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 16:30
sachinkalse11-Aug-04 16:30 
GeneralPointers,Classes,Objects... II Pin
Tambi Ashmoz11-Aug-04 0:15
Tambi Ashmoz11-Aug-04 0:15 
GeneralRe: Pointers,Classes,Objects... II Pin
Werdna11-Aug-04 13:45
Werdna11-Aug-04 13:45 
GeneralRe: Pointers,Classes,Objects... II Pin
Tambi Ashmoz11-Aug-04 18:54
Tambi Ashmoz11-Aug-04 18:54 
GeneralRe: Pointers,Classes,Objects... II Pin
Werdna12-Aug-04 2:26
Werdna12-Aug-04 2:26 
GeneralCreating the Spyware Pin
softp_vc10-Aug-04 23:35
softp_vc10-Aug-04 23:35 
GeneralRe: Creating the Spyware Pin
Colin Angus Mackay11-Aug-04 0:52
Colin Angus Mackay11-Aug-04 0:52 
GeneralRe: Creating the Spyware Pin
exhaulted11-Aug-04 1:21
exhaulted11-Aug-04 1:21 
GeneralRe: Creating the Spyware Pin
softp_vc11-Aug-04 1:35
softp_vc11-Aug-04 1:35 
GeneralRe: Creating the Spyware Pin
exhaulted11-Aug-04 1:56
exhaulted11-Aug-04 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.