|
Do you mean code your own installation program? Seems to be re-inventing the wheel to me but if that is what you want to do, then this [^]might give you a starting off point.
If what you really want is a free program that will create a setup for you then this [^]might be what you are looking for.
If a wizard fails to cast an enchantment correctly, is that a mis-spelling?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
How will I be able to know the complete path of the tasks on the task manager that are running under windows 2000 and above?
Using CreateToolHelp32Snapshot, Process32First and Process32Next displays the information of a file that are running on your taskbar. Windows ME and below displays the complete path of the source exe file which allows you to get to the source and do something about it like checking its CRC but Windows NT, XP only displays the filename without its complete path. How will I be able to know the complete path of the exe file that are running on the taskbar? Thanx in advance
|
|
|
|
|
benjnp wrote:
...but Windows NT, XP only displays the filename without its complete path.
Are you referring to the szExePath member of the MODULEENTRY32 structure? If not, you should be.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
its can be accessed through .szExeFile
hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if(hProcessSnap != INVALID_HANDLE_VALUE)
{
pe32.dwSize = sizeof( PROCESSENTRY32 );
if(Process32First( hProcessSnap, &pe32 ))
{
do
{
cout << pe32.szExeFile << endl; // displays the exe filename...
//in NT and XP, filename alone while in winME and below, Complete path
}while(Process32Next(hProcessSnap, &pe32));
}
CloseHandle( hProcessSnap );
}
|
|
|
|
|
benjnp wrote:
cout << pe32.szExeFile << endl; // displays the exe filename...
//in NT and XP, filename alone while in winME and below, Complete path
I'm full aware of this, which is why I suggested using the MODULEENTRY32 structure. It will provide you with the full path.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Ok, sorry. Thank you so much
|
|
|
|
|
Looking for a way to detect whether or not my VC++ code is being run from a debugger (or attached to by the debugger). I need to detect this programatically, from withing the code being debugged.
This would be regardless of compile mode (i.e. debug or release)
Thanks in advance,
Michael Levesque
-- modified at 14:23 Monday 10th October, 2005
|
|
|
|
|
Never mind.... found it:
IsDebuggerPresent();
M
|
|
|
|
|
Does anyone have a clue how to update the current window you are in, the GUI that is built with Visual Studio.net MFC foundation class. The problem is I have a timer function that triggers and can take a minute or so to complete. Everything works fine unless I open say calculator, then close it. There is a hole in the GUI until the timer function completes. Is there a way of updating the window while inside the timer function. I am somewhat new to using Windows and MFC and I was wrong in assuming Windows handles it for you. I thought the purpose of using MFC was it would handle all this for you.
-- modified at 14:01 Monday 10th October, 2005
|
|
|
|
|
This would be better asked in the VC++ forum...not the Lounge.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
tis not the lounge
|
|
|
|
|
This was in the Lounge when I saw it. Chris must have moved it.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
The screen will not update because the thread that is doing your calculation is busy and this is the same thread that draws your screen. You can solve this problem in several ways. One way is to do your calculation in a second thread.
A second way is to use PumpMessage as in the following article:
http://www.codeproject.com/threads/TemplatedLengthyOperation.asp[^]
John
-- modified at 14:07 Monday 10th October, 2005
|
|
|
|
|
Folks
What is the right way to handle this warning:
warning C4018: '>=' : signed/unsigned mismatch
I am comparing the out of two functions, both of which aren't mine, and one returns int and the other returns unsigned. I know they both return positive integers practically - so whats the way to get rid of this compiler warning?
Thanks!
|
|
|
|
|
If you are certain that there will not be any range problems, you can cast one of the variables to the other's type.
if( DWORD( iValue ) >= dwValue ) <br />
if( iValue >= int( dwValue ) )
This will not work correctly if one of the variables contains a value that has the high bit set (e.g. a 32-bit integer value greater than 2,147,483,647).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
|
Hello,
Please help to get thumbnail image from CImage object and save on drive in ATL project. I have :
CImage Chart;
Chart.Attach(hBit);
How to resize Chart? How to save it?
Regards,
Leonid
|
|
|
|
|
Anonymous wrote:
How to resize Chart?
CImage::StretchBlt()
Anonymous wrote:
How to save it?
HRESULT CImage::Save(
IStream* pStream,
REFGUID guidFileType
) const throw();
HRESULT CImage::Save(
LPCTSTR pszFileName,
REFGUID guidFileType= GUID_NULL
) const throw();
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello,
I am trying to write a filter which reads an XML file, applies some modifications, and then writes the result to a file. I am using the MSXML lib and visual studio 6.0.
The solution I have found is to read the XML file (SAXXMLReader), apply the modifications (SAXXMLFilter), and then writes the result to a file (MXXMLWriter). Finding examples and docs about this is not easy.
For know, I found an example about connecting the reader to the writer and one about connecting a "contentHandler" to the reader. But I did not found much about how to put a content handler in between the reader and the writer.
All I found by now about the SAXXMLFilter, is :
http://msdn.microsoft.com/msdnmag/issues/1100/xml/
which is in VB, and tranlating is not an easy step for me, as I am a newby in the Windows coding.
Is there a best way that using a filter ? Is there an already implemented XMLFilter to which I could just plug "myContentHandler" and send the result to the MXXMLWriter ? Does anyone knows where I could find an example in c++ with a SAXXMLFilter ?
Thanks in advance for the help.
Regards,
Pedro_
|
|
|
|
|
Hi all,
I would like to ask you how I can get number of disks connected to the PC.
HDD can be connected to the system over USB or directly on the motherboard.
For example:
system HDD and one HDD connected over USB are 2 HDDs.
Thanks for your help.
Petr
|
|
|
|
|
|
Wouldn't that get, as the name suggests, the Logical drives?
So if you had only one hard drive but in 3 partitions, you'd get the wrong result (3 instead of 1)?.
Also, this returns a bitmask of available logical drives I think, so for it to work you'd need to mask off bits 0 & 1 (drives A & B which are usually FDD), and count up the number of set bits.
How to get the number of physical drives? Not sure. Hmm. Where's my MSDN cd?
|
|
|
|
|
|
icabod wrote:
Wouldn't that get, as the name suggests, the Logical drives?
yes. but it might be sufficient for whatever the original poster is trying to do.
and it seems to me that wanting to know the number of logical drives is more likely than wanting to know the number of physical drives.
icabod wrote:
so for it to work you'd need to mask off bits 0 & 1 (drives A & B which are usually FDD), and count up the number of set bits
but that's pretty easy.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
To get the number of physical, not logical, drives in the system, you simply need to use the Win32_DiskDrive class.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|