|
I used Visual Studio 6 to create a very simple dialog-based program. In the 'project setting', I have selected to "use MFC as a static library". After 'Release' building, I get the Released version of the EXE file. This 'executiable' does run very well on the PC which I used to develop the program. However, for the PC on which Visual Studio has never been installed, the 'executeable' may not run at all and no error message pops up. But if I install Visual Studio 6 on the PC, the executable file will be able to run. Even if I remove the Visual Studio 6 from the PC right after, the executable still runs. It seems a problem of missing dependancy files.
I downloaded Dependancy Walker to try to find the system files missing. And I tried to manually copy over and register the suspicious missing system files. I am not sure whether I did in a right way, but what I did does not help at all.
Please give me a helping hand if you have any clue to solve it.
|
|
|
|
|
You may need MSVCRT60.dll, which is the C runtime. Did you use any C functions in your code ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian,
Thanks for your reply.
I searched throught the PC where my EXE runs and there is no such a DLL called "MSVCRT60.dll". Instead, I found 3 similar DLLs called "MSVCRT10.dll", "MSVCRT20.dll", "MSVCRT40.dll". Hence it is not due to lack of "MSVCRT60.dll".
I have recreate my program step by step to see what caused the EXE not running. Innitially for the most minimum dialog, after "Release Build", it runs on all computers. But once I add one registered ActiveX control called "Microsoft Common Dialog Control, version 6.0" to my project and place one instance of the control onto my Dialog, the problem appears.
Hence the problem is because of the ActiveX control. I am not sure why this could happen because the Control itself is also from Microsoft Company.
|
|
|
|
|
So I got the dll name wrong.
It's obvious that that active x control then has a dependancy, probably the C run time. Copy the MSVCRT40.dll onto the target computer and see what happens. If that doesn't work, check google to find out what dependancies that dll has.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I got a bitmap in the memory, for example i got an object of CImage class, and i want to copy it to an Image (GDIPLUS), how to make it? I can't understand how can i use the IStream interface...
|
|
|
|
|
Is the image in memory an actual bitmap, or just the byte data ? If it's a bitmap, it would have to have a HBITMAP that you can pass to a constructor. If it's just a memory representation, then one of the bitmap types if you can write is MemoryBitmap. Perhaps you can pass one of those in to a bitmap as well ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I can't find constructor, that have a HBITMAP in input paramters...
The list of available contructirs:
Image();
Image(IN const Image& c);
Image(GpImage* image,Status status);
Image(IStream*,...);
Image(WCHAR*,...);
|
|
|
|
|
It's a static method - Bitmap::FromHBITMAP, I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I posted a question few days back about the port blocking in windows 98. I got a suggestion to use Drivers to achieve the same.Can anyone give links regarding driver development...Especially links regarding how to use DDK to write device drivers so as to filter the ports.Hope I would get help on this.
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
lok for [netsh] command
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi Thnx.. i looked for netsh command.But it is available only in XP and 2000 OS. I need to block ports on a Windows 98 PC.
URagav
Everything can be sacrificed for truth, but truth cannot be sacrificed for anything .
|
|
|
|
|
|
I have a console application c++
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
.
.
.
Is there a way to assign an icon to this app?
any help is greatly appreciated
|
|
|
|
|
Add an icon resource to the executable. The first icon in the executable will be used as the application's icon in windows explorer.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Im using visual C++ 5
in the workspace project I have these folders
-Source Files
-Header Files
-Resource Files (empty)
If right-click to any file, I only get add files.
Can you explain how add the icon resource?
|
|
|
|
|
Create a new resource file (File/New...) and add it to your project like you would any other source file. Then you can add an icon to the resource file. I haven't used VC++5, but it shouldn't be too difficult.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am using the following structure in a console app (C++)
***********************************
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\MyProgram.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
***************************************************
It works great the only problem is that MyProgram.exe (creates bunch of files)takes a long time and it is hard to tell if it completed or not, I have to keep looking at the folder to see if all files are there. How can I display a dialog windows "This process will take few minutes, plese wait" when is completed?
|
|
|
|
|
It's a console app - why don't you output 'please wait for this process to end', and then after waiting for the process to end, put up a message to report you are done ?
In a Windows app, I just create a modeless dialog, and pull it down when the process returns.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I would do the launching of the external application in a background thread so that you can continue to pump messages, and create a modeless (non-modal) window with the "Please Stand By..." message. You would then wait for that background thread to exit (with an appropriate sane timeout, of course).
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!)
|
|
|
|
|
when we execute the visual c++(not .net) then a folder is made named debug and exe is present in that. somebody told me there is anothe way to make the exe present in the release folder i want to know through which option that folder and exe is made in that folder which is compatiblw with win32.
ddd
|
|
|
|
|
If you have no exe in the release folder, you've not built a release version. You must not give anyone your debug version. I assume from your .NET comment that you're using a .NET compatible compiler. Go to build/configuration settings and change the setting to release. Not per project, the one at the top. From memory, that option was somewhere else in VC6, but the same principle applies.
The folder is irrelevant, you can have them build where ever you want. But a release build is the optimised build, linking to release libraries and having no debug dependancies or behaviour.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What is actually your question?
Is it "how to set the project configuration to release mode?"
If thats your question,go to build->Set Active Configuration and choose
the Release option.
if thats not your question,well - i don't understand your question
Regards,
Eli.
|
|
|
|
|
yes my question was exactaly that how to make the release folder which had been made through option u had mentioned, but if i have static linked libraries will it work for that also.
ddd
|
|
|
|
|
i think you must add the DLL.dll,DLL.lib and DLL.exp in your's Project directory.
Regards,
Eli
|
|
|
|
|
Hello everyone:
Nowadays,i want to make a formview,which can popup and fit the client area when a message is sent. howerver, i don't know how to create it use a function like DoModal() of modal dialog .
i am sooooo confused now.is there anyone who can help me?anything will be appreciated ,especially some samples or articles.thankx in advance
|
|
|
|