|
teejayem wrote: I'd like to develop my own software to communicate with this card directly. Does anyone know if it would be possible?
Doesn't the fact that the card is delivered with software for communicating with it answer your question?
You may consider item #2 in the list provided in this post[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
The software is a separate download. All i want to make is a viewer and i don't think i should have to install a 2gb file (that probably expands to 4gb) just to use their viewer.
As far as your item #2 comment, I don't believe that i asked anyone to provide me with any code for my question. I simply asked if there was a way to communicate with the hardware if the drivers were installed on the machine. How much more specific do i need to be?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Does the hardware company offer a 3rd party development. kit ?
|
|
|
|
|
yeah they do however, they only provide video streaming through tcp/ip to a server they provide.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
teejayem wrote: As far as your item #2 comment, I don't believe that i asked anyone to provide me with any code for my question.
No, you did not. But item #2 says "be specific".
teejayem wrote: I simply asked if there was a way to communicate with the hardware if the drivers were installed on the machine. How much more specific do i need to be?
It depends on how specific answer you'd like.
Given the information you've provided so far my answer can only be "yes, it's possible".
Of course you'll need to know "how" to communicate with the card, what protocol it uses and so on. But you didn't provide any info that can be used to guide regarding this. Perhaps you can find it in the documentation for your card.
Somehow I find it hard to believe that you want a simple 'yes' or 'no' to be able to continue your work to the question "if it's possible".
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
If the drivers are installed then you could try out some video capture program to see if it can use those drivers (i think you can try Media Player Classic to open capture devices for input) and if you can then it is possible to write your own progrqm using DirectShow, PROBABLY.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for the info. I'll test this out.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Try DirectX. I think in DirectMedia or DirectShow there are tools to capture, play ...
|
|
|
|
|
HI
I want to insert in between two cells...I.e i want to overwrite a data in cell in excel using excel automation.
Cany anyone suggest me any idea?
thanks
gany
|
|
|
|
|
CodeProject has the magic article's search engine [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
HI All,
I have a ftp server address.I need to connect with ftp server and download the files in tree control with MFC(I need in C++ not VC++).
I need some idea for this.
Pls help me..........
Thanks & Regards
Anitha
|
|
|
|
|
|
I can also suggest to use FTPClientSession class in Poco C++ library. (it does not depend on MFC).
|
|
|
|
|
Also I can advise you to find in Ultimate TCP/IP package (no dependance on MFC). (it is availbe here in CP)
Good luck.
|
|
|
|
|
|
Is it possible to measure the total duration of a certain thread that is spent on its "running" state ? Of ourse between two given absolute time values.
In the past I thought that QueryPerformanceCounter achieves this by querying a counter that is incremented each time that a particular thread spends an addtional CPU cycle.
I found this wrong after a simple test where I measured the time using QPC between a simple ::Sleep operation and found it equal to the exact value passed as parameter to ::Sleep.
Hence the idea is then to take the difference between the absolute time difference and the QPC derived period then deduce the amount of time that the thread has spent on its bloocking state ie eg when it has delagated work to another thread, (WaitForEvent,etc).
Is there any help of any kind ?
Thank you in adavnace.
Ahmed.
|
|
|
|
|
hINTModuleState wrote: I found this wrong after a simple test where I measured the time using QPC between a simple ::Sleep operation and found it equal to the exact value passed as parameter to ::Sleep.
Well, it's wrong but not for the reasons you think since your test doesn't do what you seem to think it does.
::Sleep() is a busy-wait, which means that it's continuously asking "are we there yet" consuming CPU time, or in other words "burning MIPS".
Thus your measurement would be correct; i.e. you thread has in fact been running for the same amount of time as you've instructed it to in the call to ::Sleep() .
To make a thread "sleep" in the sense that it doesn't use any CPU time, or rather as little as possible, you should wait on a waitable timer with a call to e.g. ::WaitForSingleObject() .
What you should use to measure the execution time for a thread is ::GetThreadTimes() , read more here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thank you for this knowledgeable response indeed.
My expectation was that <code>::Sleep</code> triggers a timer before blocking until the thread is again awaiked by an asynchronous call from the system which checks for the clock and the timer values.
::GetThreadTimes has evrything : the blocking-time it provides is much accurate than what the difference I was going to do between the absolute clock period and the one I would have deduced from the two calls to QPC..what it wooud have given to me.
It is exactly becuase of the same scenario that mades akirilov's statement that Sleep is accurate than WM_TIMER a false statement : that of (the scenario [I'm beginning to notice that my langage is not so often understood]) the effect of multithreading. [I expect that running a chess engine on the background affects the observable period that the thread running ::Sleep code is perceiving..]
|
|
|
|
|
hINTModuleState wrote: Thank you for this knowledgeable response indeed.
You are most welcome.
I strongly recommend that you read the two articles I linked to in my response to akirilov if you haven't done so already.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
hINTModuleState wrote: Joseph NewComer again !
So?
Would you rather have I provided a link to Charles Petzold, Mark Russinovich or Matt Petriek instead where they state the same fact?
I think Newcomer's site is a fantastic gold mine of information regarding development for Win32. The information is accessible, pedagogic and easy to understand. It clearly states what to do and what not to do, and usually why which is quite rare.
I've been developing for windows platforms for about 15 years and I've found that following the advices on Newcomer's site, helps a lot of people to stay out of trouble.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: I think Newcomer's site is a fantastic gold mine of information
That is exactly the point !
|
|
|
|
|
hINTModuleState wrote: That is exactly the point !
Enjoy!
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
In the past I thought that QueryPerformanceCounter achieves this by querying a counter that is incremented each time that a particular thread spends an addtional CPU cycle. It measure the CPU cycles from the turning on the PC, not "a particular thread" (this include all other threads).
You received the same result as Sleep, because ... well, Sleep is very accurate, that is why people use it instead of WM_TIMER.
Now to your question ... QueryPerformanceCounter will not do the job.
P.S. I doubt it cost a CPU time, as previously somebody stated, at least not more than WaitForSingleObject.
modified on Monday, November 24, 2008 10:39 AM
|
|
|
|
|
akirilov wrote: Sleep is very accurate, that is why people use it instead of WM_TIMER.
I'm sorry, but you are so incredibly wrong.
Using ::Sleep() is a common mistake and is almost always wrong.
Read more here[^] and here[^] before advising someone on this matter.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|