|
Jacob Anawalt wrote:
Will that make my blocking calls in the worker thread not affect the rest of the system?
I have never seen blocking calls effect the whole system, at least not if the thread have a low priority.
Are you running Win9x or NT/2k/XP?
Jacob Anawalt wrote:
While the transfer is happening, for about half of the time the computer is very responsive. The other half of the time it can be a few seconds or longer before the system responds. It jumps between the two states of responsiveness without any apparent pattern. Sometimes it will be very response although the worker thread is transferring a lot of data. Othertimes it will be unresponsive during the same condition.
I have no idea why this is happening, I have never seen anything like that. But, I always use NT/Win2k, and they handle threads a lot better that Win9x systems...
Another option would be to move away from the blocking socket, and use a async socket instead...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Is there any freeware libraries for a media player (MP3, MPEG, AVI etc...) that does not need windows media player installed on the clients computer. Something like a third party dll containing MP3 decoder stuff. It will be used as an extra 'bonus' part of another program so it doesnt have to be too complex!
Ive already looked at the Audio/Video section of codeproject and nothing will do the job.
Any thoughts?
.NET or not .NET? MFC is the question......
|
|
|
|
|
Oddly enough the sample that exists on CP is under an example for skinable apps. But there is full source here somewhere for playing mp3s, it's just used in the context of an app that is skanable, like Winamp.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
There are lots of free decoder libraries, check out sites like www.sourceforge.net
Stephen Caldwell
Blackfission, CEO
http://blackfission.myip.org:81
|
|
|
|
|
I use installshield for microsoft vc++6.0 to make a install programe. No error during setup, but when run the application program,it appear the warning dialog "Failed to create the empty document" in chinese -- i have a chinese version windows 98 in my computer. But it can run correctly in a PC installed VC++6.0. Can you tell me why? How can i solve this mistake? if it's because some dll files failed to install in the system , how can i find which dll file should i install?
thanks
zhaohanqing
Zhao hanqing
|
|
|
|
|
Check the versions of MFC..dlls on the computer with no VS. This can cause a problem
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Does anyone know how to get a list of all the thread handles in a process on Windows NT4.0? On Windows 2000 and Windows XP the toolhelp32 api can be used, but this is not available on Windows NT 4.0.
Also the process status helper library (PSAPI) has a function to enumerate all processes, but not all threads.
Note, I am interested in the thread handles, not the thread ids as I don't know of a way to get a thread handle if you know a thread id (that works on Windows NT 4.0).
Cheers
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
Correct me if i'm wrong here i'm a beginner.
Doesn't VC++ 6 have some tools for looking at threads etc... I've been playing around with them myself, however u may be looking for something a bit more techy than them.
I hope this will either ring a few bells in your or other visitors heads as to the matter.
.NET or not .NET? MFC is the question......
|
|
|
|
|
Use the Spy....
But if you want it prgramatically, for each process, you need to open new enumprocess for each process. The process are a tree, and pspi show you every level, you need to open every process for see if you have more sub process...
Best Regards....
Today is Friday!!! and Party!!!
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hello everyone,
I thought of posting this in the operating system forum, but it has so little traffic I thought the question would be overlooked.
On Windows XP and Windows 2000 you can use:
HANDLE hThread;
DWORD dwProcessId;
dwProcessId = GetCurrentProcessID();
hThread = OpenThread(..., dwProcessId);
to get a handle to a thread if you know its thread id.
How do I do this on Windows NT 4.0? The OpenThread() function
does not exist in kernel32.dll on Windows NT 4.0.
Hoping someone can help. Kernel mode device driver solutions
are valid, I'll consider any method to get this info.
Stephen Kellett
--
C++/Java/Win NT/Unix variants
Memory leaks/corruptions/performance/system problems. UK based.
Problems with RSI/WRULD? Contact me for advice.
|
|
|
|
|
MSDN says:
Windows NT 4.0 and earlier, Windows 95/98/Me: There is no way to get the thread handle from the thread identifier. If the handles were made available this way, the owning process could fail because another process unexpectedly performed an operation on one of its threads, such as suspending it, resuming it, adjusting its priority, or terminating it. Instead, you must request the handle from the thread creator or the thread itself.
A thread can use the GetCurrentThread function to retrieve a pseudo handle to its own thread object. This pseudo handle is valid only for the calling process; it cannot be inherited or duplicated for use by other processes. To get the real handle to the thread, given a pseudo handle, use the DuplicateHandle function.
|
|
|
|
|
I would like to implement a resizable dialog box with controls in the dialog box resizing along with the dialog borders. I tried adding guides and margins in the Microsoft Dialog Editor, but these margins do not seem to resize along with the dialog borders. Can anyone let me know how I can resize items along dialog borders?
Thanks in advance.
|
|
|
|
|
|
Hey,
First off if this is a really silly question then please excuse me but this is my first attempt at writing an application in c++.
I am trying to write a c++ program that can access a SQL Server database through ODBC/ADO(I don't care how just want it to work). I get c2059 error : 'constant'on the following line:
hr = m_pConnection->Open(_bstr_t(L"driver={sql server};SERVER=(local);Database=loggy;"),_bstr_t(L"sa"),_bstr_t(L"choices"),adModeUnknown);
Every command run after this complains about not being a member of _connection. I am using #import to import the msado15.dll whcih seems to be the best way(after many surfing hours). I would apreciate it if any one could help me. I think I have just put some code in the wrong place or something.
Thank you in advance
Regards
Adam
-------
Like you will ever visit my sites...
www.ufowatch.com - Seen a UFO then report it here or view over 500 different reports.
www.clubpages.co.uk - Taking the Bournemouth club scene through the millenium
|
|
|
|
|
I have lost the Admin password to a VSS database. Without this I can no longer run the SS Admin tool. Does anyone have an idea of how to recover for this situation?
Thanks.
Chris Meech
|
|
|
|
|
After a couple of hours searching through Google, I hit this great link.
http://groups.google.com/groups?q=VSS+ADMIN+PASSWORD&selm=93v9ll%24ldt%241%40nnrp1.deja.com&rnum=6
It gives a procedure for removing the password requirement for Admin. You use a hex editor to replace some values in the database's um.dat file and presto, you can now start the Admin utility without being prompted for a password.
Hope this helps out someone else.
Chris Meech
|
|
|
|
|
In a Document/View supported application,
Can i do this.........
CMyDoc::OnFileOpen()
{
...
...
..code
}
CMyView::OnFileOpen()
{
...
...
..another code
}
CMainFrame::OnFileOpen()
{
..
...
...
codes
}
will these code generate on error
|
|
|
|
|
Hi,
i think you will get an error something like function already exits....
regards ( new in vc++ )
Sonu
|
|
|
|
|
Maverick wrote:
will these code generate on error
No you will not get an error
But all three won't get called
Nish [anony posting from a net cafe]
|
|
|
|
|
Nish [I am not logged in] wrote:
No you will not get an error
Please Explain to me why you will not get an error.
Best regards
Sonu
|
|
|
|
|
This is simple. The function "OnFileOpen" is local to three different classes, namely CMyView, CMyFrame and CMyDoc. You would get an error if they were declared as global.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
ahh.....
Got it thanx for the information....
regards
Sonu
|
|
|
|
|
If you have command handlers in view, frame and documents, then the framework will call the one in view only. If there is no handler in your view class, then the framework will try to dispatch the command in your frame class.
This might be more clear if you look in the MFC source code (in "winfrm.h", MFC7), where the message is actually dispatched.
BOOL CFrameWnd::OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo)
{
CPushRoutingFrame push(this);
CView* pView = GetActiveView();
if (pView != NULL && pView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
if (CWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
CWinApp* pApp = AfxGetApp();
if (pApp != NULL && pApp->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
return FALSE;
}
Hope this helps.
Regards.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Hello again everyone, and Happy New Year.
I'm relatively new to VC++ so I'll try to explain this the best I can. Here's my situation... I have an SDI app where the MainFrm is CSplitterWnd'ed into several different views. I have one view that is a "keypad" (CView) with a bitmap that resembles a standard keyboard numpad. If the user presses any numpad buttons, I want that view to "see" and process those window messages. The following snippet is how I'm trying to do it, but it doesn't seem to receive any messages. What am I missing??
// ==================================================================
void CMainFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
ASSERT( GetActiveDocument() );
CClocksterDoc* pDoc = static_cast<cclocksterdoc*>(GetActiveDocument());
int iQty = 0;
switch(nChar)
{
case VK_NUMPAD1: iQty = OES_KEY_01; break;
case VK_NUMPAD2: iQty = OES_KEY_02; break;
case VK_NUMPAD3: iQty = OES_KEY_03; break;
......
}
if( iQty > 0 )
{
pDoc->DoPurchaseRequest( iQty );
}
CFrameWnd::OnKeyDown(nChar, nRepCnt, nFlags);
}
// ==================================================================
I hope explained this well enough.
Thanks...
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
It's the view that receives key-down messages and not your CFrameWnd derived window
Nish
p.s. from cafe. so anony post
|
|
|
|