|
Hi,
I developed my application in VS2008,.Net framework version 3.5 SP1.
Its runs in my machine.But when i run it in another machine its not running.It shows the error
This application has failed to start because the application configuration is incorrect.Reinstalling the application may fix the problem
In that machine VC++6.0 is installed.
How can i avoid this error?
I have to send this applciation to client.I dont know whether they have VS2008
Anu
|
|
|
|
|
|
I have a third-party DLL,which is a regular MFC DLL. When I use LoadLibrary to load it, the handle returned always is NULL.I use dependecy to parser it, which report MSVCR80D.dll and MSJAVA.dll not find. How to resolve this problem.
|
|
|
|
|
Is it failing in your development machine? MSVCR80D.dll is a debug version DLL.
|
|
|
|
|
Yes. I use debug version DLL in my debug enviroment.I debug my code and found LoadLibrary always return NULL. I use the same compiler as the DLL.
|
|
|
|
|
Can you try GetLastError() to see the cause of failure?
|
|
|
|
|
I have use try-catch to catch exception, but no exception throw.
|
|
|
|
|
You can include following code after your LoadLibrary() call to get the error code:
DWORD dwErr = GetLastError();
And check the dwErr value in Visual Studio Error Lookup tool which is available under 'Tools' menu.
|
|
|
|
|
I try it. error no is 126, error openning file.
|
|
|
|
|
It seems as you figured out, the depending DLL is missing. Can you check if everything works fine on Release version?
|
|
|
|
|
|
Dear Rejeesh.T.S, thanks for your help, I have resovled my problem. I reviewed many articles about MSVCR80D.DLL and MSJAVA.DLL lost. These DLLs will be installed in system32 folder if you install VS2005. When I firstly installed VS2008 and then installed VS2005 sencondly, these DLLs would not be installed.So problem appeared. If you installed these IDE in adverse order, problem will not appeared. I copy msvcr80D.dll, msvcm80D.dll and msjava.dll in the system32 folder, problem disappeared. Thank you again.
|
|
|
|
|
Do you have the msjava.dll in your pc?
Nowadays, Microsoft dose not deploy that dll when installing the os, I think.
Check your pc configuration, please.
|
|
|
|
|
Yes,there isn't MSJAVA.DLL in my PC. I place MSVCR80D.DLL in the folder where the target DLL exist, dependens report error opening file(MSJAVA.DLL). How can I resolved this problem when using VS2005.My DLL can't be load both in Release and in Debug.
|
|
|
|
|
Hi all,
Just trying to hardcode a file path into a CString variable but result ignores backslash (I believe it may be interpreted as control character?).
e.x.
CString Path;
Path = "..\dir1\dir2\filename.ext";
result for path is "..dir1dir2filename.ext"
Also, another nagging string issue I have never understood is a compile error I get when I try to concatenate string literals -
Path = "abcd" + "abcd"; //causes a compile error, "cannot add 2 pointers
My compiler (VS 2005) is set to use Multi-Byte Character Set.
I once tried to research unicode v.s. Multi-Byte Character Set and I could not make heads or tails of the significance.
Thanks for any tips.
|
|
|
|
|
al2500 wrote: Path = "..\dir1\dir2\filename.ext";
'\' must be escaped (repeated since it is the escape character) in a string literal, change to
Path = "..\\dir1\\dir2\\filename.ext";
al2500 wrote: Path = "abcd" + "abcd";
'+' is not the concatenation operator for string literals, you should change it to:
Path = "abcd" "abcd";
or
Path = "abcd";
Path += "abcd";
or
Path = CString("abcd") + CString("abcd");
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Path = "abcd";
Path += "abcd";
I think not.
MVP 2010 - are they mad?
|
|
|
|
|
Well, you should ask MS to change the documentation [^], [^] and, above all, persuade the compiler of ...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Apologies, you are, or should be, right. I really need to stay away from MFC questions.
MVP 2010 - are they mad?
|
|
|
|
|
Thanks guys,
I also realized that hardcoding a path(even relative) is stupid and in fact I could not get it to work. I found the following superior method that I had used elsewhere-
char acPath[256];
if ( GetModuleFileName( NULL, acPath, 256 ) != 0) {
* ( strrchr( acPath, '\\' ) + 1 ) = '\0';
}
|
|
|
|
|
al2500 wrote: I once tried to research unicode v.s. Multi-Byte Character Set and I could not make heads or tails of the significance.
Unicode is usually a 16-bit (sometimes 32-bit) encoding of a character set. Multi-byte character sets (e.g. UTF-8) are encodings where each character is represented by one or more bytes. In each character the left most bit(s) of the first byte indicate how many bytes make up each character. In the ASCII set of characters in the range 0x00 to 0x7F each character is one byte long. There is some useful (and well explained) information here[^].
MVP 2010 - are they mad?
|
|
|
|
|
Hi:
I am migrating from VS 6.0 to VS 2008 and I am stuck on this error.
error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'const char [13]' (or there is no acceptable conversion)
It is occurring here:
istream & operator>>(istream &stream,IOwnship &object)
{
//## begin IOwnship::operator>>%.body preserve=yes
char tempStr[80]={0};
UINT16 temp16;
stream >> (ISimObj&)object;
int i;
for( i=0; i<IOwnship::NUM_EXPENDABLE_SLOTS; ++i){
stream >> object.m_expCount[i] >> temp16;
object.m_expType[i] = (ExpendableType)temp16;
}
stream >> temp16; object.m_fuelType = (FuelType)temp16;
for(i=0; i<NUM_FUEL_TANK_TYPES; ++i){
stream >> object.m_fuelQty[i];
}
UINT32 malfID;
UINT16 malfStatus;
UINT16 moreMalfs;
stream >> "Malfunctions";
for(stream >> moreMalfs; moreMalfs; stream >> moreMalfs){
stream >> malfID >> malfStatus;
object.m_malfStatusMap[malfID] = MalfStatusActType(malfStatus);
}
I have included:
#include <iostream>
using namespace std;
This works fine in VS 6.0.. any help would be greatly appreciated
|
|
|
|
|
mlchavez wrote: stream >> "Malfunctions";
You are trying to read from stream into a constant, I don't think this will work; and even if it did it would serve no purpose.
MVP 2010 - are they mad?
|
|
|
|
|
thank you for the speedy reply.
I really appreciate the help 
|
|
|
|
|
I hope it helps to solve your problem.
MVP 2010 - are they mad?
|
|
|
|