|
Thanx
|
|
|
|
|
Alternatively to an index you could give each socket (incoming connections) a status value. Something like UNCONNECTED, ACTIVE, DEAD... and cleanup in your server code all dead sockets from time to time. This has the advantage of handling TCP close properly (e.g. you can disconnect a socket and wait until the other side has received all pending data and closes its end).
Hope it helps.
M
|
|
|
|
|
Cool thanks!
You should maybe post your reply to cgb143 as well
Cheers,
Mark
|
|
|
|
|
Didn't I do that?
/Mark (aka Moak)
|
|
|
|
|
Hi,
I want to create a MPEG movie from a set of bitmaps(500+). How can I do this? Which technology should I use for this(DiretX etc)
Regards,
Hemant.
|
|
|
|
|
If you are prepared to save in AVI or WMV format instead of MPEG, there is a lot more information on CodeProject. CodeProject does not have much on MPEGs, probably because the format is not supported directly by MS.
When I wanted to save an AVI file, this article www.codeproject.com/bitmap/createmovie.asp[^] was very useful.
|
|
|
|
|
The Windows Media Format SDK works pretty well.
There is an MPEG 4 codec available as well as full WMA/WMV support.
Windows Media Downloads[^]
Mark
|
|
|
|
|
Hi,
Thanks for reply.
I just searched the MSDN for Windows Media format SDK. But says about only ASF format.
Here is para from MSDN SDK introduction
"The Microsoft® Windows Media® Format 9 Series Software Development Kit (SDK) enables developers to create applications that manipulate digital media stored in files conforming to the Advanced Systems Format (ASF) file structure"
It says nothing about MPEG. Is it still possible to use Windows Media format SDK.
Regards,
Hemant.
|
|
|
|
|
Yeah sorry support is limited....here's what the SDK says...
The Windows Media Audio and Video Codec Interfaces also enable access to some legacy
codecs, including Windows Media Video 7 and 8, Windows Media Screen 7, the older Microsoft
MPEG-4 codecs, and the Microsoft ISO MPEG-4 codecs.
Note This documentation does not cover these legacy codecs; it only covers the Windows
Media 9 Series and later codecs.
For older codecs, use the same procedures as when using the Windows Media 9 Series codecs,
however, remember that not all features are supported in all codecs. In addition, the MPEG-4
codecs are not supported in the video encoder DMO.
The codec is there but I've never tried actually writing a MPG/MPEG file with it though.
I suppose it writes an ASF format file compressed MPEG-4.
I do know it works - I use it extensively (for Windows Media).
I don't know of any FREE mpeg writers that don't violate someone's license.
MPEG Licensing[^]
Mark
|
|
|
|
|
You can make your movie file with avi and if you want to use it you can see MSDN for it I saw a good example on MSDN and also you can find examples on codeproject
|
|
|
|
|
Hello, I have to store a DATE type into the Registry. The problem is, i shall only use certain functions. One of these sets a Dword into the Registry. But when I load the value from Registry, the correct date wont be displayed. What did I do wrong ?
|
|
|
|
|
Checker2003 wrote: What did I do wrong ?
Without seing any code, it is impossible to answer...
|
|
|
|
|
Checker2003 wrote: What did I do wrong ?
You need to store it as REG_BINARY .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have to ask different, can I convert a DATE into a DWORD, or do I have to use REG_BINARY as my good fellow told before ?
Thank you
|
|
|
|
|
A DWORD is long enough that you could write code to shove a date in there, I would think. If you're going to define your own format, then it's up to you what that is going to be.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: A DWORD is long enough that you could write code to shove a date in there, I would think.
Yep, DWORD is "32-bit unsigned integer" (not a double as the OP supposed):
20061016 < UINT_MAX (4294967295)
|
|
|
|
|
Since a DATE is actually just a double , you could potentially lose 99% of a day. In other words, if your DATE value was 39006.999988 (one second shy of midnight), storing that as a DWORD would only store the 39006 part, thus losing almost 24 hours. Make sense?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
A DATE is an '8-byte floating-point number'.
Time starts midnight, Jan.01 1900.
It is manipulated via the MFC class COleDateTime.
There are 2 time structures (i know of) that can fit in a DWORD:
1. __time32_t structure (obtained by _time32()).
Time starts midnight, Jan.01, 1970.
Resolution to the nearest second.
2. Packed MS-DOS date/time structures as used by DosDateTimeToFileTime()/FileTimeToDosDateTime().
Time starts midnight, Jan.01, 1980.
Resolution to the nearest 2 seconds.
So, either:
1. Write DATE as a binary object to the registry (suggested).
2. Write conversion routines to convert from DATE to either __time32_t or MS-DOS date/time structures (e.g. DATE -> COleDateTime.GetAsSystemTime() -> SystemTimeToFileTime() -> FileTimeToDosDateTime()).
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi all,
Could someone please guide me in the right direction? I'm looking for a function that performs the same action as the GlobalMemoryStatus() but instead of memory, hard drive status i.e. virtual memory, swap memory and so.
Thanx
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: ...hard drive status i.e. virtual memory, swap memory and so.
The performance counters have this information.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you for your reply David.
I assume that you are talking about the Windows Task Manager Performance counters. The thing is I was looking for a function that would provide these values to me, for reasons not worth mentioning. So the question remains, does such a function exists?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: I assume that you are talking about the Windows Task Manager Performance counters.
Never heard of 'em. I was referring to these. There are a few examples at the bottom of this article.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanx David I'll check it out....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
You can find performance on examples of MSDN.
|
|
|
|
|
Hello,
i try to use regular expression from boost in my project, i read on www.boost.org that the boost regex works only
with VS .Net 2005!
Is there any information about this here?
If this work with VS6(C++ 6) a litle code snippet can by helpful!
regards
break;
|
|
|
|