SetTimer strange behavior - bug?

Found a weird problem today and didn't see it in the archives. I was doing a 
SetTimer based on an estimated time and happened to get a very big value 
(c7fffb50). Timer returned immediately which surprised me since that's on the 
order of 39 days. I got curious and did some testing. Even though nElapse is 
an UINT (which should handle ffffffff milliseconds) if I got much above 
6fffffff it blew up. Below that it seemed to run fine (though I didn't wait 
around for 21 days just to check). Anybody seen this before? Any insight into 
what's going on down at the system level? 
0
JimMcGill (16)
6/23/2005 12:20:01 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
477 Views

Similar Articles

[PageSpeed] 54

From the SDK documentation:

uElapse
[in] Specifies the time-out value, in milliseconds.
    Windows NT/2000/XP: If uElapse is greater than 0x7fffffff, the timeout 
is set to 1.
    Windows 2000/XP: If uElapse is less than 10, the timeout is set to 10.
    Windows Server 2003: If uElapse is greater than 0x7fffffff, the timeout 
is set to 0x7fffffff.


"Jim McGill" <JimMcGill@discussions.microsoft.com> wrote in message 
news:CF40647C-2DF9-4003-8D4B-4275ACC8AB33@microsoft.com...
> Found a weird problem today and didn't see it in the archives. I was doing 
> a
> SetTimer based on an estimated time and happened to get a very big value
> (c7fffb50). Timer returned immediately which surprised me since that's on 
> the
> order of 39 days. I got curious and did some testing. Even though nElapse 
> is
> an UINT (which should handle ffffffff milliseconds) if I got much above
> 6fffffff it blew up. Below that it seemed to run fine (though I didn't 
> wait
> around for 21 days just to check). Anybody seen this before? Any insight 
> into
> what's going on down at the system level? 


0
alegr (1131)
6/23/2005 4:53:38 AM
Alexander

Thanks, that makes sense. I assumed it was something like that but I didn't 
find the documentation. Which SDK is that out of? I didn't find it in either 
my VC++ documentation nor searching the MS site.

Jim

0
JimMcGill (16)
6/23/2005 4:00:05 PM
Platform SDK, of February 2003.

"Jim McGill" <JimMcGill@discussions.microsoft.com> wrote in message 
news:F73C00E0-4A7E-451F-8F27-636A78F9F2C7@microsoft.com...
> Alexander
>
> Thanks, that makes sense. I assumed it was something like that but I 
> didn't
> find the documentation. Which SDK is that out of? I didn't find it in 
> either
> my VC++ documentation nor searching the MS site.
>
> Jim
> 


0
alegr (1131)
6/24/2005 3:19:58 AM
Reply:

Similar Artilces:

editbox shows strange characters
Hi I'm confused with the behavior the editbox shows.while i've not defined _UNICODE or _MBCS typing in the editbox in arabic shows strange characters.if i just copy & paste those characters into notepad the characters will look correctly(arabic). What makes me more confused is that with the same application but on another computer you can type arabic letters in the editbox. 1)What should I do so that my program acts normally on all computers? 2)what are probable the different settings on those 2 computers which make my application behave different.(bothh run winXP)? 3)what are the...

really bugging me now guys/send/recieve hanging
please help guys, outlook still hanging at 80-83% what is causing this? I have done everything even re-entering my account details for all of my accounts. Outlook used to whip through the send and recieve process now it slows at 66% then hangs at 80-83%. I cannot work out anything that would be causing this to happen? ...

Bug in DragQueryFile()?
I'm using DragQueryFile() to enumerate the files dropped on my target window, and everything seems to pretty much work fine, except that, if I select n files in an Explorer window and drag them into mine, I get the last file in the list first (i.e., for index 0), and then all the remaining files (1 to n-1) in the correct order. Is this a known problem? Is there a fix? Am I doing something wrong? Thanks. >I'm using DragQueryFile() to enumerate the files dropped on my target window, >and everything seems to pretty much work fine, except that, if I select n >files in an ...

Validation problem: is it a bug?
Hi to all, I've written a simple XML file and I'm trying to validate it using XMLValidatingReader and ValidationEventHandler event. This is my code: Imports System.Xml Imports System.Xml.Schema Module Module1 Dim IsValid As Boolean = True Sub main() Dim filename As String = "Example.xml" Dim TReader As New XmlTextReader(filename) Dim VReader As XmlValidatingReader = New XmlValidatingReader(TReader) VReader.ValidationType = ValidationType.DTD AddHandler VReader.ValidationEventHandler, AddressOf myValidationEventHandler ...

weird Contacts/email bug, but definitely a bug (OL2003)
Don't need any help, just posting this as a bug in the hope it gets fixed sometime. In the Contacts folder (phone list view), I copied Contact A's entry, pasted it, changed the name to Contact B and updated a bunch of contact items like email. All looked totally fine. But then I sent an email to both Contact A and Contact B, and when I received the bcc to myself, the To: box showed Contact B twice. I composed a new email to Contact A and Contact B. The email addressess looked good in the To: line (looked like "John Doe (john@doe.com)" which **looks** right), but ...

Bug in Office Outlook 2007
Hello. There is a bug in Microsoft Office Outlook 2007 (and possibly earlier versions) that can cause Outlook to behave in an unexpected manner. (Not reacting to mouse clicks, etc.) I found this bug while working on a development project and decided to post it here for the purpose of helping out. Here are the steps to reproduce the bug: 1: Create a simple HTM file with the following text: <input type=button value="Close Window" onclick="window.close()"> 2: Save this file to some location. 3: Open Microsoft Outlook 4: Navigate inside outlook using the web toolba...

Sudden new behavior opening a new spreadsheet
I am running Execl 2002 SP2. It has suddenly started opening new sheets in mirror arrangement (Column A on the right and all scrolling controls reversed). What happened. How can I get Excell to open "properly"? Hi goto Tools - Options - International and change the orientation back to normal >-----Original Message----- >I am running Execl 2002 SP2. It has suddenly started >opening new sheets in mirror arrangement (Column A on the >right and all scrolling controls reversed). What >happened. How can I get Excell to open "properly"? >. > ...

How do I change the default paste behavior
I do MUCH copy and past from word documents, and even sometimes html documents. 99.9% of the time, I want the paste to be "plain text" or "match destination formating." Is there any way to make this the default paste behavior instead of "keep source formating?" I don't mind the little paste formating window beign there for the few times when I want the sorce formating to stay, I just don't want to have to click it 99% of the time to get the formating I want when I paste. ...

Strange dialog focus problem
I have 2 dialogs, each with 3 Edit Boxes. Dialog 'A' was derived directly from CDialog. Dialog 'B' is two generations removed from CDialog, ie. CDialog -> 'X' -> 'Y' -> 'B'. Otherwise 'A' and 'B' are identical. When Dialog 'A' is activated, the focus goes directly to Edit Box #1. When Dialog 'B' is activated, no Edit Box has focus. All properties of both dialogs are the same. Neither dialog has overridden the OnInitDialog() method. Why are they behaving differently? If I choose to force focus by overriding OnIni...

Strange thing when copying a range !!
This is a multi-part message in MIME format. ------=_NextPart_000_0056_01CA7D09.53379650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The following code gives me the error " 1004 ..." in the second line Sheets ("MASTER").Select Range("Fall_from_height").Select 'PS : the range exists !! Copy The following code works, but after the Copy instruction it creates an = new workbook !!!!! (i do not want that it creates a new workbook). Sheets ("MASTER").Select Application.G...

new message window scrolling strangely
I'm using Outlook 2007, and have been for about 6 months. I'm experiencing a new problem, and can't figure out why. When i'm composing a long message, the message window scrolls strangely, and displays the top of the window, such that I'm not seeing what I'm typing. Text entry is happening in the right place, but the window display is wrong. I have to continually scroll back down to see what I'm typing, and as soon as the line wraps, it happens again. ugghh This seems to happen whether i'm using HTML, Rich Text, or plain text. And it just started happening rec...

Anyone else see a leap year bug?
We are paid at the end of the month. For February, Money 2004 is doubling our salary and all deductions taken out. This is for budgeting purposes, so my budget definitely doesn't work this month and probably won't for this year! Does anyone else have this problem? I can't seem to get it fixed, even when I changed the next pay date to an earlier date! Thanks.... ...

a strange question about URLDownloadToFile and IE
hey all, i face a strange question about URLDownloadToFile() api function, the funtion always fail to download an URL, but the URL can be opend well in IE, what's more, the function can works well to download the URL after i open the URL on IE, it's really puzzle me. it should be not a question about source code, maybe thing wrong with IE? anybody can help me? thanks. regards, jyan Could be a permission problem. You could try this sample code and see if it works then compare it to yours. I know this one works. http://www.codeproject.com/internet/urldownload.asp Tom "...

Two bugs fixed with SP1
It seems as if two bugs that affected me have been fixed with SP1. 1. Net Worth reports now give correct balance for the date for cash accounts. 2. Citibank Virtual Account Number program no longer causes M2007 to crash when using lifetime planner or when transmitting electronic payments to CheckFree. I wonder if they've introduced new bugs? I guess we'll find out soon. Given that these service packs have been rare in the past, maybe there's been new direction for this program. --ron On Thu, 09 Nov 2006 20:41:41 -0500, Ron Rosenfeld <ronrosenfeld@nospam.org> wrote: ...

Strange Calculation Error in Excel
Hi. I have a table of numbers, and I do some simple Math based on this data. Eg: 4.1 4.1 3.97 4.03 4.15 4.15 4.1 4.1 For the formula "=A4-B4", the answer given is "-0.069999999999999400000000000000" It should be just -0.07. Then I checked the value for A4 & B4, the values are: 4.030000000000000000000000000000 4.100000000000000000000000000000 What's wrong with Excel? How can I correct this error? PS: If anyone wishes to see the original Excel file, please leave your email address here. Thanks! -- Additional information: - I'm using Office XP - ...

Wierd Sheet Tabs Behavior
Excel 2002. My workbook has 37 worksheets. If I go to Tools>Options, View Tab, and check Sheet Tabs, the tabs are shown only on the first 29 sheets. Has anyone else experienced this problem or have a clue as to what's wrong? Thanks. Have you tried: <Format> <Sheet> <Unhide> ? -- HTH, RD ===================================================== Please keep all correspondence within the Group, so all may benefit! ===================================================== <jkend69315@aol.com> wrote in message news:1147960458.572916.212980@38g2000cwa.googlegroups.co...

strange symbol in signature block
=EF=BB=BF The symbol/collection of characters has begun to=20 appear in the signature blocks I've created. I don't put=20 them in the block, but when I "insert" a signature, the=20 characters are visible. I've tried deleting and starting=20 over, but the characters don't disappear. I've tried=20 creating the signatures in Word instead of Outlook. The=20 line spacing is not correct but the characters are gone. =20 All the problems started when I tried to edit the=20 signatures I had already created. Any suggestions? Thanks ...

editbox shows strange chracters Help pls
Hi I'm confused with the behavior the editbox shows.while i've not defined _UNICODE or _MBCS typing in the editbox in arabic shows strange characters.if i just copy & paste those characters into notepad the characters will look correctly(arabic). What makes me more confused is that with the same application but on another computer you can type arabic letters in the editbox. 1)What should I do so that my program acts normally on all computers? 2)what are probable the different settings on those 2 computers which make my application behave different.(bothh run winXP)? 3)what are the...

Behavior of text in cells.....
Normally, when entering text into a cell in a worksheet, the text will flow into the adjoining cell (to the right) and continue until it runs into a non-empty cell. I have created a form whereby I have merged cells in order to create the necessary layout. There is a large area (block) in the form where the cells are (unprotected) so the user can insert a graphic or reformat text sizes as necessary. The problem... when text is entered into one of the merged cells in the unprotected area of the form, the text is disappearing and not flowing to the right. It seems to be stop...

Append Query Fails, MS Access 2000 bug?
I appear to be having a problem with an append query. I created a select query, converted the query to a make table query. The query created the table, NewTable, and inserted the data. I then modified the query again to an append query. The data in NewTable was deleted, then I ran the append query... everything ran fine. I opened NewTable in Design View, saved the table (NO changes were made). I re-ran the append query and it failed: Microsoft Access can't append all the records in the append query. Microsoft Access set 0 field(s) to Null due to a type conversion failure, and i...

VERY Strange IE6 problem...
I tried upgrading IE6 to IE7, then immediately reverted back because of the stupid static button placements. Now, I have a REALLY weird issue - I type an address into IE6's address bar, hit ENTER, then my FIREFOX browser goes to the address I just typed into IE6's address bar!!! If I close Firefox and do the same thing, Firefox will open, then go to the URL I just typed into IE6's address bar. WTF, over??? Are you running WinXP SP2 or SP3? Is Internet Explorer selected as your default Browser in the CUSTOM section of Set Program Access and Computer Defaults? ...

strange bounce message
Hello All- I tried to send a message for a job on craigslist and go the following message back. I have never gotten anything like this. Is it a problem on MY end and how do I resolve it? My reverse PTR records are registered with my ISP, Comcast. Thanks! locoytravieso The following recipient(s) cannot be reached: XXXXXXXXXXXX@craigslist.org on 4/22/2007 11:13 AM There was a SMTP communication problem with the recipient's email server. Please contact your system administrator. <SERVER.XXX.COM #5.5.0 smtp;554 <unknown[MY IP ADDRESS]>: Client ...

Bug report: replacement of anchor.href replaces anchor.innerText a
If anchor.innerText contains the "@" sign, anchor.innerText is replaced with anchor.href here is the example of page that shows the misfunctionality. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <body> <a href="#" onclick="return false;">@@SomeText@@</a> <script type="text/javascript"> var anchors=document.getElementsByTagName('a'); for(var i=anchors.length-1;i>=0;i--) anchors[i]...

strange message in calendar outlook 2007 sp2
Hi A customer of mine sneded out a recuured meeting request On a later time she added a location One of de members get this message. "this meeting request is updated after the message has been send. open a later update or open an item in the calendar" If he opens the item in his agenda the location is not updated Greetings Jurgen ...

Workflow Bug? Emailing Teams?
Hello - Has anyone been able to email teams from workflow? I get the following error: Error: action {C201D886-B674-4411-9BC8-822ED55B918C} failed in step {95703444-1C1E-4679-B8EB-CDBD2A77954D} of process instance {F71E9BC4-1FEF-4D28-80E3-C4933A17433B}. <description>Cannot create activity party of specified object type</description><details>CActivityParty::ValidatePartyObject: partyobjecttypecode should be one of those Contact, Account, Lead, User, Case, Contract, Quote, Order, Invoice</details><file>d:\mscrm\build\3017\src\platform\include\omcore\crm\A ctivity....