Author Archives: Code Monkey

Even though mouse-move, paint, and timer messages are generated on demand, it’s still possible for one to end up in your queue


We all know that the
generated-on-demand messages like
WM_MOUSE­MOVE,
WM_PAINT,
and WM_TIMER messages
are not posted into the queue when the corresponding event occurs,
but rather are generated by
Get­Message or Peek­Message
when they detect that they are about to conclude that there is
no message to return
and

the generated-on-demand message can be returned
.
When this happens,
the window manager creates the message on the fly,
posts it into the queue,
and hey, how about that,
the
Get­Message or Peek­Message
function now has a message to return!



Note that this auto-generate can happen even though the queue
is not empty,
because the message filters control what messages in the queue
can be returned.
For example,
suppose the message queue contains the following messages:



  • { hwnd1, WM_CLIP­BOARD­UPDATE }
  • { hwnd2, WM_LBUTTON­DOWN }


(Note that the above diagram is not strictly correct,
because the WM_LBUTTON­DOWN message
goes into the input queue, not the message queue,
but the distinction is not important here.)



Suppose you now call
Get­Message(&msg, hwnd1,
WM_MOUSE­FIRST, WM_MOUSE­LAST)
.
None of the messages in the queue satisfy the message filter:
The first message meets the window filter, but the message
is not in range.
The second message meets the message range filter, but
does not meet the window filter.
The Get­Message function is about to give up
and say “I guess I need to wait for a message,”
but before it finally concedes defeat,
it says,
“Hang on there.
I see a note that tells me that I should auto-generate a
WM_MOUSE­MOVE message
for window hwnd1.
And that message satisfies the message filter.
I’ll generate it now!”



The Get­Message function posts the
{ hwnd1, WM_MOUSE­MOVE }
message into the queue
(assigning it the current time as the timestamp),
and then it says,
“Hey, lookie here! A message that satisfies the filter!”
It then removes the message from the queue and returns it.



(Note that this algorithm is conceptual.
It doesn’t actually work this way internally.
In particular, the window manager does not literally talk to itself,
at least not out loud.)



Okay, so in the Get­Message case,
even if the message conceptually goes into the queue,
it comes right back out immediately,
so you never actually observe it there.



Now repeat the exercise with the
Peek­Message function.
As before, the
WM_MOUSE­MOVE message
is posted into the queue with the current time as the timestamp.
If the PM_REMOVE flag is passed,
then the message is removed from the queue and returned,
just like Get­Message.
If the PM_NO­REMOVE flag is passed,
then things get interesting:
The message is returned but not removed from the queue.



You now have a WM_MOUSE­MOVE message
physically residing in the queue!



This is the answer to the puzzle:
If auto-generated messages are generated on demand,
how is it possible for them to end up sitting in your message queue?



I recall a bug investigation from nearly two decades ago which
basically boiled down to this issue:
Somebody PM_NO­REMOVE‘d an auto-generated
message and not only left it in the queue,
but kept generating new ones without processing the old ones.
Eventually, the message queue filled up.



(Note that this is also the answer to the puzzle:
If WM_MOUSE­MOVE is generated on demand,
how can it be possible to retrieve a
WM_MOUSE­MOVE message
with a timestamp different from the current time?)

Imagine Cup TV Episode Ten!

Golnaz visited the United States Imagine Cup Local Finals, Matt Smith is hosting our awards ceremony at Worldwide Finals this July, Facebook is giving an award, Avenade is sponsoring a special Women in Technology dinner this summer, and John found a very special photograph!

John Scott Tynes
Imagine Cup Competition Manager
Microsoft Academic Programs

Architecture applicative Dynamics CRM 2011

Introduction
Microsoft Dynamics CRM (Customer Relationship Management) est une solution permettant de gestion de la relation client en entreprise. Alliant le marketing, la vente (Sales Force Automation) ainsi que le service, cette solution permet la gestion complète de la relation client ainsi que l’automatisation de certain processus.
La solution Dynamics CRM 2011 est disponible Online et en OnPremise. Cet article est spécifique à Dynamics CRM OnPremise.

Cet…(read more)

??????????Windows Azure?????New Relic ????

[??????] Penny Pinching in the Cloud: Enabling New Relic Performance Monitoring on Windows Azure Websites

[??????]  2013-05-02

New Relic view of my Website

?????????????????12??????????????????????????????????????????????????????????????????????????????????

????????????????????????????????

???????Glimpse???????????????????????????????????????????????????New Relic???????????????????????????ASP.NET?Azure???

????????????????????????????New Relic?????????????????????????DDOS’ed?????????????

image

?????????????????????????????Azure???????????????????????????????VM???????????????????????????????????

My site getting beaten on

????????????New Relic??New Relic?????????????????????????????????????????????Azure????????????????????????????????New Relic?????????Hanselminutes.com?????

???Azure?????New Relic

???Azure????? “??”????????????????New Relic?

Adding New Relic to my Azure Portal

????????????????????????????????????????????????????????????????????????????14????????????????

Screenshot (19)

????Add-On???????New Relic????????????????????????

???????????New Relic????????????????????????????????add-on???????????????????????????????New Relic????????????Azure ?????????

Adding New Relic

 

????Azure??????????New Relic????????????????????????New Relic????????????????????????????????????

New Relic within the Azure Dashboard

 

?????????????New Relic?????????????????????????????????????????????????????????????????????????.NET???????????????????????????

????????????????Azure???????New Relic NuGet??

???Azure??????????????????????????????New Relic??????????CLR??????????????????????

????????

  • COR_ENABLE_PROFILING – 1
  • COR_PROFILER -{71DA0A04-7777-4EC6-9643-7D28B46A8A41}
  • COR_PROFILER_PATH – C:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll
  • NEWRELIC_HOME – C:\Home\site\wwwroot\newrelic

???Azure???????????????????????

Azure Website Config with New Relic

 

??????????????????????????????New Relic????????????

??????????Relic

????????NewRelicWindowsAzure Nuget????NuGet Package Manager ????

Install-Package NewRelic.Azure.WebSites

?ASP.NET??????Hanselminutes.com????WebMatrix????????NuGet??????????????????????????????11????

New Relic NuGet Package

 

????????????dll???newrilic.config?????newrelic.config?????????????????????????????Azure??????????????????????????????????????New Relic?????????????

???????????Azure????NewRelic???dll??????????????NuGet???????????jpg????

Publishing the New Relic Agent to Azure

 

????????????????????Hanselminutes ?New Relic???????

Hanselminutes within NewRelic

???????????????????????????????????????????????

Response Time

?????????????????????????????????

Screenshot (45)

????SQL?????????????????…

Screenshot (48)

??????????????????????????????.NET Framework?CLR???

Screenshot (50)

????????????????????

Screenshot (53)

???????????????????Azure??????????????????New Relic????????????4?SQL???????????????????????????ArgumentNullException??????????

??????????????????????????????????????????????????????5????10????????????????? ???????????

?????????????????

Roslyn development environment setup and ramp-up plan

Roslyn Installation

http://www.microsoft.com/en-us/download/details.aspx?id=34685

Ramp-up
You may want to read following links in order to get started.

http://msdn.microsoft.com/en-us/vstudio/hh500769

http://www.codeproject.com/Articles/302595/Roslyn-CTP-Three-Introductory-Projects

Do not forget to look at the installed code samples. These samples are installed along with Roslyn CTP and are located at C:\Users\<username>\Documents\Microsoft Roslyn CTP – September 2012\
…(read more)

[Sample Of May 22nd] Virtual Volume Driver

 

Homepage image
RSS Feed

Sample Download : http://code.msdn.microsoft.com/VirtualVolume-83334efd

This is the Virtvol sample driver.  This version of the driver has been modified to support the driver frameworks. This driver basically creates a nonpaged pool and exposes that as a storage media. User can find the device in the disk manager and format the media to use as FAT or NTFS volume. In addition, Virtvol integrates with Mount Manager, so that it is not necessary for you to assign a drive letter, the system will do this automatically.
image

You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

Windows Server 2012 ?? Windows Media ??????????????

????????????? ??????????Windows Media ???????????Widnows Server 2012 ????????????Widnows Server 2012 ??????????????IIS Media ????????????????????????????Windows Server 2008 ??? Windows Server 2008 R2 ??????????????? Windows Media ????? OS ???????????????????????????IIS Media ???????????Windows Media ???????????????????????????Smooth Streaming ?????????????????????????http://www.iis.net/media ????????

?????????????????

  Windows Media ???? IIS Media ????
Windows Server 2008 Supported Supported
Windows Server 2008 R2 Supported Supported
Windows Server 2012 Not Supported Supported

?Windows Azure???????????????????????

???????????????????????? ????????????????? ?Microsoft Windows Azure?????????????? ??????????????? ????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????? 2 ?? (???????) ??????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????

Windows Azure ???????Web???????????

http://www.windowsazure.com/ja-jp/

??…(read more)

??? Windows Azure ????????????

???????????????????????????????? ????????? Windows Azure ?????????????????????????

???? (Major Region) ??? Japan Region ???Japan East ??? Japan West?2?? Sub Region (??) ?????Windows Azure ?????? ”???? (geo-replication)” ?????????????????????????????????????????????Windows Azure ????????????????????????????????????????????????????????????????????? ?????????????????????

Microsoft News Center > ?Microsoft Windows Azure?????????????? ???????????????
Microsoft News Center > Microsoft to Strengthen its “Microsoft Windows Azure” Business in Japan Will set up Japan Region (??)

Windows Azure Japan Team Blog > Windows Azure ??????????

 

Windows Azure ???????8??????????????24??????????????????????????????

Windows Azure web??? >??????????: ?????? – ????????
Windows Azure website > Windows Azure CDN Node Locations

[MEMO] Windows Azure ?????????????

(1) ?????????????????? [??] ????????? (2) ????? [???] ????????? (3) ?????? [+??] ????????? (4) ???????????????????MS????????????????????? ???????????????? [v] ??????????????????????????????????? ????…(read more)