|
If you are using that many threads you may want to reconsider your design. This is one of the many reasons you don't see too many Netware servers around anymore. It was common to see millions of threads during primitive indexing tasks while you waited (sometimes hours) for the nightly index clean ups to finish up on Netware Servers. It was a terrible philosophy to create a thread for every little chore or socket.
If you do a search for IO Completion Ports or IOCP here on code project, you'll find some good information on why you want to limit the thread count to be more in line with the number of processing units the machine has to offer.
I hope that helps.
|
|
|
|
|
I am using the following to load a dll in a Visual C++ 2003 project.
LoadLibrary(_T"mydll.dll"));
mydll.dll is generated by a project within the solution although I have to copy it into the exe's location (or change the filepath string) to get it to load. What I want to know is:
1) Is there some kind of mechanism in Visual Studio which can reference the dll via the dll project instead of the filesystem and
2) consequently, what do I need to do to debug code that is executing from that dll project?
I hope I have worded this well enough to get what I'm trying to do across...
|
|
|
|
|
Klempie wrote: 1) Is there some kind of mechanism in Visual Studio which can reference the dll via the dll project instead of the filesystem and
I dont know what do you mean by this..
But
Klempie wrote: 2) consequently, what do I need to do to debug code that is executing from that dll project?
This can be done.
Steps
1. Put break points in the code that you want to debug.
2. Press F5(debug) on your dll project.
3. It will ask you the executable path
4. Browse and specify the path of the exe which uses this dll.
5. Now perform the action on exe that invokes dll functionality.
I hope that makes sense.
Regards,
Sandip.
|
|
|
|
|
Thanks guys. This helped with problem number 2.
|
|
|
|
|
If you want to debug your dll file you can use of breakpoints(and F5) when you will be calling dlls functions of your project use of F5.
|
|
|
|
|
Hi,
I have developed a window based application which is able to fetch the IPAddress but i want the url name of the IPAddress fetched.Can any one tell me how to do it.
The Server is sending the IPAddress.
Thanks In Advance.
Dhiraj Kumar Saini
|
|
|
|
|
Use the Windows socket function getnameinfo().
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
|
|
I thought this was the Visual C++ / MFC forum....
Aren't jokes better placed in the lounge?
|
|
|
|
|
Hi all
Once again i am asking same question how can i remove .What happen in this code when usb drive is blank then this type of out put come
ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ .
plz help me
BOOL CUSBDlg::FileList()
{
CString acb="";
//Get Logical Drives
DWORD dwDrives=GetLogicalDrives();
if(0==dwDrives)
{
return FALSE;
}
DWORD dwCount=0;
char chDriveLabel='C';
char szRootpath[5]={0,0,0,0,0};
while(dwDrives !=0)
{
if ((dwDrives & 1) != 0)
{
sprintf(szRootpath,"%c:\\",chDriveLabel);
//removable drive
if(DRIVE_REMOVABLE==GetDriveType(szRootpath))
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
//Removable dirve lable
// AfxMessageBox(szRootpath);
m_ListCountries.AddString(szRootpath);
HTREEITEM hRoot1 = m_tree.InsertItem(szRootpath, 0, 0);
//* represent search all files and directories
szRootpath[3]='*';
hFind=FindFirstFile(szRootpath, &FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
// return TRUE;
}
// List all the files in the directory .
do
{
//ignore the sub directories
if( _tcscmp( FindFileData.cFileName, _T(".") ) && _tcscmp( FindFileData.cFileName, _T("..") ) )
{
m_ListCountries.AddString(FindFileData.cFileName);
}
}while (FindNextFile(hFind, &FindFileData) != 0);
CFileFind finder;
FindClose(hFind);
}
}
dwDrives = dwDrives >> 1;//next drive
chDriveLabel++;
}
return true;
}
|
|
|
|
|
Hello,
please try using memset before calling FindFirstFile and FindNextFile for FindFileData structure, something like this:
memset( FindFileData, 0, sizeof( FindFileData ) );
hFind=FindFirstFile(szRootpath, &FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
}
do
{
if( _tcscmp( FindFileData.cFileName, _T(".") ) && _tcscmp( FindFileData.cFileName, _T("..") ) )
{
m_ListCountries.AddString(FindFileData.cFileName);
}
memset( FindFileData, 0, sizeof( FindFileData ) );
}while (FindNextFile(hFind, &FindFileData) != 0);
CFileFind finder;
FindClose(hFind);
Best regards,
Mihai Moga
|
|
|
|
|
Thx'x it is working...just i want to say greate work for me becouse i havn't found solution of this problem..
Can i ask you some different question related to USB Device..
|
|
|
|
|
Sure, you can ask me, but I do not known too much about USB. You may consider starting a new thread for this ...
|
|
|
|
|
ok no problem i ask here..
[code]How can i show message when any one copy the file or folde from USB Device or Paste the file or folder in USB Device[/code]. Plz help me..
|
|
|
|
|
Mihai Moga wrote: please try using memset before calling FindFirstFile and FindNextFile for FindFileData structure...
Setting that structure to 0 is not necessary.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
vcprog wrote: Once again i am asking same question...
And you've been given the answer three times already. Why do you refuse to comply?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
ok DavidCrow
Can you give me some pice of code..
Plz help me
Thx,s in advance
|
|
|
|
|
NewVC++ wrote: Plz help me
Do you see anything wrong with this?
if (INVALID_HANDLE_VALUE == hFind)
{
}
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
Can i convert WIN32_FIND_DATA FindFileData into string?If yes then how?
Plz help me
|
|
|
|
|
Uh ? What do you mean exactly ?
|
|
|
|
|
You can't convert the structure itself to a string. You can, however, convert its members to a string.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
What do you need? do you want to convert size or time of a file to string?
|
|
|
|
|
probably you want to send the structure over socket or some thing similar
if this is correct then you can try.
char str[SIZE];
memcpy(str,&FindFileData,sizeof(WIN32_FIND_DATA));
I hope this makes sense.
Regards,
Sandip.
|
|
|
|
|
Hi All
How can i delete tree item.Plz help me
|
|
|
|