Nuri Ismail
Posts
-
Using ON_UPDATE_COMMAND_UI Macro?? -
how to get all handles of processWell I already gave you the link to the documentations of two APIs. The usage of
GetProcessHandleCount
is trivial, documentation says everything you need. ForNtQuerySystemInformation
you can check out this[^] thread, where you will find a sample code that actually retrieves Handle Count, Thread Count, etc. The example code actually uses ZwQuerySystemInformation[^] function but in fact this does not change anything for you, the usage is exactly the same. P.S. If you actually want to know the difference between 'Nt' and "Zw' prefixed native API functions, have a look at this interesting article[^]. :) -
how to get all handles of processIf you want to retrieve the number of opened handles by given process you can use GetProcessHandleCount[^]. Note that minimum supported clients for this function are Windows Vista and Windows XP with SP1. If you want to support older windows versions you can use NtQuerySystemInformation[^]. Look for
SYSTEM_PROCESS_INFORMATION class
and read the documentation carefully before using this function. I hope this helps. -
How i can get the hardware device Driver Information using C# -
How to increase buffer size for CEdit Box in VC6Yes Shilpi, you are right. I also didn't know about the voting system at the beginning but after about a week wandering through the forums I realized how things work. :) Thank you very much! Best Regards, Nuri
-
How to increase buffer size for CEdit Box in VC6Rajesh, I see that this is a trend. Once their problems are solved, the OPs often forget to vote. :rolleyes: Thank you very much for the vote and the support! Best Regards, Nuri
-
How to increase buffer size for CEdit Box in VC6You're welcome! :)
-
How to increase buffer size for CEdit Box in VC6Did you try sending EM_SETLIMITTEXT[^] to your
CEdit
control or calling CEdit::SetLimitText[^]? -
get host name from Ip addressYou can use: - Dns.GetHostEntry[^] - Dns.GetHostByAddress[^] The second method is obsolete and using the first alternative is recommended but you will see these details in documentation. :)
-
ListControl ProblemThere are lots of example that might be useful for you. With a quick search in
CodeProject
archive I found these articles: - Showing the Image file thumbnail view in ListView control using VC++ 6.0[^] - Thumbnails Viewer using ListCtrl[^] - Using thumbnail images in a list control[^] You can find even more articles on this topic. :) -
Rename a folder?An alternative to
SHFileOperation
is using MoveFile[^] or MoveFileEx[^] APIs. These functions can rename either a file or a directory. -
Microsoft Mathematics 4.0Small typo:
OriginalGriff wrote:
Recommended specs: 1GB processor
1 GHz :)
-
Spammer [modified]Marcus, it was not about the article. It was about an advertisement message (about a skin care cream :-D) from the discussion board of the article. This message is now removed and my link become irrelevant, so I decided to delete the link. Regards, Nuri
-
Spammer [modified]Here [link deleted after the removal of the spam message] - some funny advertisement from him. :)
modified on Thursday, January 13, 2011 9:58 AM
-
Spammer -
Populate An Array With Numbers.Here is the problem:
// You are indexing with "limit", which is the size of your array
scanf("%d", &numbers[limit]);
// Change the above line to:
scanf("%d", &numbers[index]);Mike Certini wrote:
What I have discovered is that I have to input a \o for the program to know that it is the end of my input.
This is not true. When you enter the limit-th number the loop will end and the program will exit.
Mike Certini wrote:
Secondly, I have problems with index variable. When I loop one time or when I press enter after inputing a number, my index number advances to 8. My question is why the index does not advance to 2?
Actually it is incremented by 1 after each iteration (
index++
part of yourfor
loop) but you are indexing with wrong variable (I pointed out this problem at the start of my answer). I hope this helps. :) -
HextoCString conversionYou can do this easily using std::ostringstream[^]. Here is a small example for you:
#include <iostream>
#include <string>
#include <iomanip>
#include <sstream>int main()
{
// Test numbers - num1 declared as HEX, num2 as DEC
const unsigned int num1 = 0x1234, num2 = 1234;// We will use std::ostringstream for the conversion std::ostringstream oss; // First num to Hex // "0x" is optional if you don't need it you can use "oss << std::hex << num1;" oss << "0x" << std::hex << num1; std::string strFirstNumHex = oss.str(); // Clear the content of the string buffer for later use oss.str(std::string()); // Second num to Hex // "0x" is optional if you don't need it you can use "oss << std::hex << num2;" oss << "0x" << std::hex << num2; std::string strSecondNumHex = oss.str(); // Clear the content of the string buffer for later use oss.str(std::string()); // First num to Dec oss << std::dec << num1; std::string strFirstNumDec = oss.str(); // Clear the content of the string buffer for later use oss.str(std::string()); // Second num to Dec oss << std::dec << num2; std::string strSecondNumDec = oss.str(); // This line prints: Numbers in HEX: 0x1234, 0x4d2 Numbers in DEC: 4660, 1234 std::cout << "Numbers in HEX: " << strFirstNumHex << ", " << strSecondNumHex << "\\t" << "Numbers in DEC: " << strFirstNumDec << ", " << strSecondNumDec; std::cin.get(); return 0;
}
As you can see from the above example
strFirstNumHex
andstrSecondNumHex
contain hex string representations of the test integers (strFirstNumHex = 0x1234
andstrSecondNumHex = 0x4d2
).strFirstNumDec
andstrSecondNumDec
contain decimal string representations of the test integers. If you don't need the"0x"
prefix for your Hex strings you can remove this prefix from specified lines in above example. I hope this helps. :) NOTE: For clearing the content of the stream buffer I usually use:oss.str("");
, but it messes the formatting of the code block and I changed it tooss.str(s
-
how can find how thread running in my applicationSee here[^]. You can use the code from the link, just need to replace the
printf
call with conditional check - if the process ID matches your own process ID, obtained via GetCurrentProcessId[^]. :)modified on Wednesday, January 5, 2011 6:13 AM
-
Need to pass private member of a Class as a argument to function of another class and get modified therePlease, do not cross-post. You have already posted the same question in Managed C++/CLI[^] forum. Your question has nothing to do with ATL/WTL/STL. Please stick to Managed C++/CLI forum.
-
I wish to complain about certain people gaining MVP statusCongratulations Dave! You well deserved this award! :thumbsup: