comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Simple way to generate event-log messages?         


Author: pete
Date: Feb 4, 2008 10:16

Hi folks --

I have a DLL that wants to report maybe eight or ten events in the
Application event log. Is there a simple, straightforward way to do
that? MSDN has it in

http://msdn2.microsoft.com/en-us/library/aa385769(VS.85).aspx

that I need to use something called a message compiler (mc), then use
rc to further compile that, and then link the output .res file to make
a whole 'nother DLL.

What's a better way? Ideally, I'd like to end up with these event
messages as part of my DLL. I see that many (maybe all) apps hold
their event messages internal to the DLL/EXE, but how to do it?

I've modified my registry key
"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog\
\Application\\SPMAgent" (where SPMAgent is my application) to point to
SPMAgent.dll, but Event Agent naturally complains.

Thanks!

-- Pete
1 Comment
  How to simulate a clicking a control object?         


Author: MC
Date: Feb 4, 2008 07:10

I have a program that loads another exe (which I do not have source).

The other exe has two control objects (normal buttons). I want my program to
click the other control. I know the window handle and ctrl id. When I do:

SendMessage(hwnd,WM_COMMAND,ctrl_id,0)

or same with PostMessage I get no action in the window.
What am I missing or how should I do it? I'd prefer SendMessage or PostMessage.
1 Comment
  get access to screen buffer         


Author: R2
Date: Feb 4, 2008 03:08

Hi All,
I want to collect changes(changes in terms of rectangle that
recently updated by any event) made on desktop screen. is there any
screen buffer maintain to record this changes? is there any way to
collect these changes made to desktop screen?

Ravi.
1 Comment
  InitiateSystemShutdown blocked on "Windows is shutting down"         


Author: didier_cimo
Date: Feb 4, 2008 02:45

I have a huge problem using the InitiateSystemShutdown API.

The returned value is normal (nonzero), but the shutdown stops without
any reason. A message "Windows is shutting down..." is displayed on
the screen. The reboot continues normally only when somebody hits the
keyboard or moves the mouse. This is very embarrassing for an
automatic reboot !

Code used : InitiateSystemShutdown (lpMachineName => null, lpMessage
=> "something...", dwTimeout => 0, bForceAppsClosed => TRUE,
bRebootAfterShutdown => TRUE)

I could observe very long hangs, more than 1 day ! The same problem
appeared on many PC's, all equiped with Windows XP Pro 5.01.2600 (SP2)
and the same hardware (see below).

When the problem appears, the process that have called the
InitiateSystemShutdown API is still alive, and the activity over
existing IP sockets continues normally. It's a console process,
launched a long time before (6 months for example). Nobody is logged
on the computer.
Show full article (1.73Kb)
3 Comments
  getusername winxp vs win2k         


Author: madhu.vallamreddy
Date: Feb 4, 2008 02:19

Hi
GetUserName API in win2000 returns the username in the exact case in
which
user was created
where as in case of windows xp it returns the in a case that user has
keyed
in during log in to the machine.

Can you tell me how can i get this XP behaviour in Win2000
1 Comment