Search:
Type: Posts; User: PadexArt
Search:
Search took 0.48 seconds.
-
June 16th, 2009, 05:37 AM
You cannot tell who will get to write first and in most cases you don't care to know either. Besides, allowing multiple users to write data indiscriminately will most likely corrupt your data.
...
-
Depending on who is invoking your callback you need one or two threads in your code.
Either way your callback function should set a result flag ( the result of the connect operation) and set an...
-
It adds complexity but also flexibility. You can choose what protocol to use and when, depending on what your current data ( type and size). And you can combine the two of them to have the ease of...
-
Or even better, have one variable per row. :)
-
You could have both protocols as layers over TCP/IP:
Text protocol
-----------------------------
Binary protocol
-----------------------------
TCP/IP
-
If you plan to use that value further than that delete call is not useless it's a bug. :)
-
My guess is that some of the pointers in the array are not initialized. When creating the array set all the elements to NULL and see if the error still occurs.
-
If the object containing the CStringArray is passed by value you will get this error since the generated copy constuctor in your class will try to invoke the copy constructor of CStringArray.
...
-
C++ remove()
WinAPI DeleteFile()
-
There are tools doing this, see here for more details: http://www.microsoft.com/technet/archive/win98/maintain/reg.mspx?mfr=true
But unless something is broken I would refrain myself from...
-
Another thing you can do is move all the file operations in a different thread. The downside is that you will consume more memory by doing this and, if witting from multiple threads, you might need...
-
STL - Standard Template library. The "standard" C++ library, it should come with any C++ compliant compiler.
MFC - Microsoft Foundation Classes. A Microsoft library which has the main purpose of...
-
Most likely you are using a variable that is not initialized properly or NULL, or an exception was thrown from your code.
Code like m_pRecordset.CreateInstance(__uuidof(Recordset)); should be...
-
yes
No, that is the function you use to start the thread. You need to:
- define a custom message ( user defined message)
- send that message from the worker thread when drawing is required....
-
I don't think any company would be happy to install a software that works around security settings, no matter how legit the reasons are. So documenting what needs to be done is the way to go forward....
-
As long as you pass/store your objects as pointers/references and you invoke virtual functions on those objects, you will get what you need.
-
The code bellow works perfectly well for me:
void CTestCaptureDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
SetCapture();
CDialog::OnLButtonDown(nFlags, point);
}
-
Well, currently that function is called from within your worker thread hence all the problems. Your worker thread should only send a message to the main UI thread requesting itself to draw what is...
-
If you use ATL you can do this through CComObject's CreateInstance :
STDMETHODIMP CMainTestClass::GetSamTest(IAdd **ppRetVal)
{
CComObject<CAddClass>* addObj = NULL;
HRESULT hRes =...
-
No, there are 2 threads: the main UI thread and the worker thread serviced by the UINT CMy123Dlg::ABC(LPVOID pABC) function. As previously stated you cannot do this. Your worker thread should send...
-
Have you read all the suggestions posted above? You really do not need to synchronize your logging features.
Anyways, if you really want to do a synchronization you'll end up slowing down your...
-
A slight variation of what the previous people said: use L when you need UNICODE regardless of the project settings. ( in cases where a function accepts only wide char strings)
-
Yes, that's why I said it's not necessarily true. :) You can get away using a library without a header file, and at times that is the only way you can do things. An example for that is checking if...
-
To add to what laserlight already stated, here is a discussion on what the constructor initialization lists are and why they should be used.
...
-
That's not necessarily true. You can use a dynamic function library ( dll) without a header file but it is not the best/easiest way to do it.
|
Click Here to Expand Forum to Full Width
|