|
thank you for your replay,I get it.
多线程脑袋
|
|
|
|
|
|
I have a DWORD value 1619.
Corresponding error message to this value is :
"This installation package could not be opened. verify that the package exists and that you
can access it, or contact the application vendor to verify that this is a valid windows installer
package"
Is there a way (an API) which I could use to get the error message (as a string) by providing the DWORD value ?
Thanks in advance
|
|
|
|
|
Sometimes documentation [^] helps.
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]
|
|
|
|
|
i have an application where i have to connect 3 deivce on TCP/IP. I would receive data from any of the device when it requested from the PC.
Could any one help me on how to proceed about this requirement. I read few literature on Multi threading but i am not sure how to implement multithreading in VC++.
|
|
|
|
|
diptipanchal wrote: Could any one help me on how to proceed about this requirement
Yes, I can.
diptipanchal wrote: I read few literature on Multi threading but i am not sure how to implement multithreading in VC++.
SO what is the problem now? Didn't you understand the mechanism for multithreading ie how to start the threads and keep on collecting data for each one of them.
Have you started to write some code and can you show it?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Here[^] is one of the best article on the subject. There are code snippet and all so it contains everything you need.
|
|
|
|
|
Hello all,
I have a doubt here:
If i have three socket connections does it make it necessary to have them in 3 separate threads(to ensure concurrent reception of data from all three)? Or is it that since the OnReceive() functions of the respective socket class are independent events that are all capable of getting triggered at the same time (as perceived by the application), thus, can exist under one single thread?
|
|
|
|
|
Hi friends,
I'm researching on Timers in Windows and I've read "Timers Tutorial" in codeproject from this link:
"http://www.codeproject.com/KB/system/timers_intro.aspx" but I would like to know:
Do we have any timer with the nanosecond precision or no?
Thanks in advance
|
|
|
|
|
Mohammad Khodaea wrote: Do we have any timer with the nanosecond precision or no?
AFAIK, No
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
I don't think nanosecond precession is possible with windows timers. But i believe with multimedia timers nanosecond precession is possible.
|
|
|
|
|
Mohammad Khodaea wrote: Do we have any timer with the nanosecond precision or no?
No, and anyway Windows is not a real-time operating system so you can't achieve that precision. I'm afraid you'll need to switch to a real-time operating system and I'm even not sure that you'll be able to reach that precision.
|
|
|
|
|
Mohammad Khodaea wrote: Do we have any timer with the nanosecond precision or no?
I think Yes! please check QueryPerformanceCounter
You can find C# code and details here[^]
|
|
|
|
|
see this
visualcsamples.blogspot.com/2009/01/microsoft-visual-c-timer-example.html
i made it...
|
|
|
|
|
Mohammadj wrote: i made it...
What ?
Is that a sample for QueryPerformanceCounter ? Or something related with Nano seconds ?
|
|
|
|
|
i made that example in my blog
|
|
|
|
|
Agreed that you made.. What is that it does?
|
|
|
|
|
press the left button start the timer ( start moving the rect )
press the the right mouse button stop moving
'
and WM_Timer to control moving
|
|
|
|
|
Please read what the OP has queried and then try to answer the query. His query and your answer does not match dear friend.
This is an example for Timer. I appreciate that. but what the OP wants is different.
|
|
|
|
|
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219208304 (LWP 3526)]
0x00ac315a in g_mime_message_get_body () from /usr/lib/libgmime-2.0.so.2
wat does dat mean???
what does the number 0x00ac315a signify..??
|
|
|
|
|
It probably means that you are trying to access that address (read or write) but do not have permission to do so. The best way to solve such issues is to use your debugger to track down the problem. This error is so generic that it is impossible to give you more information.
|
|
|
|
|
how do we use a debugger????
u mean gdb ???
for debugging we have to put debugging symbols in the program??? like ifdef DEBUG ???
|
|
|
|
|
shrims4u wrote: u mean gdb ???
I guess so, I never developped under linux a lot. The debugger let you set breakpoints in your code, inspect the different variables, inspect the call stack. I think you'll need to search a good tutorial on how to use gdb on the web. Without using your debugger you won't be able to good very far. It's not only for your current problem but also for the future. Learn to use your debugger properly and you'll see that it will save you a lot of hassles.
|
|
|
|
|
I am using the below tool tip code for showing a tooltip when mouse is moved over a row in CListBox.
Row in CListBox has a file name, I am showing the path of the file as a tool tip.
m_ExistingMap.Lookup(strText,strTipText);
int nLen = strTipText.GetLength(); // nLen is 120 characters
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, nLen+1 );
else
_mbstowcsz(pTTTW->szText, strTipText, nLen+1 );
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strTipText, nLen+1 );
else
lstrcpyn(pTTTW->szText, strTipText, nLen+1 );
#endif
I am not observing a crash when nLen =80
|
|
|
|
|
If you check out the documentation for the TOOLTIPTEXT[^] structure you will see that szText is defined as 80 chars long, you can't copy the 120 chars long string into the 80 char long buffer.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|