|
Friends,
I've installed VS.NET 2005 beta and i developed a simple VC++ console application (ofcourse unmanaged application). When i try to run it in "Debug" mode, a dialog box appears showing message:
This application has failed to start because MFC80UD.DLL was not found. Re-installing the application may fix this problem.
I am not getting this error in release mode.
Can anyone tell me what is the problem ?
|
|
|
|
|
Amjad Shah wrote:
I am not getting this error in release mode.
No, in release mode, your app will use MFC80U.DLL ( the D is at the end of the debug dlls ). You should have this dll, I'd be inclined to reinstall VC and see if it appears. I certainly am using VC2005 without this error.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I have a MDI Application using CListView. I only want to change the font in this view, but the Base Class Member ::SetFont(...) doesn't work decent. It doesn't make any difference whether the facename of the CFont Object is "Arial", "System"...
Is there a possibility to set the font for the CListView and CListCtrl respectively or a single item, subitem?
Thanks and best regards.
|
|
|
|
|
I don't know why you're set font isn't working - you can certainly change the font for the whole control to whatever you want. Check the font is being created correctly and also that you're not destroying the font handle.
To set the font individually for a subitem, see -
http://www.codeproject.com/listctrl/lvcustomdraw.asp
|
|
|
|
|
Thanks - the CFont Object wasn't created correctly, it was valid only inside a member function...
|
|
|
|
|
I am using the xcopy command but never had to deal with a directory path with spaces in the name. Does anyone know how to handle that?
E.g.
xcopy .\MyPatchJ\bin\MyApp.exe c:\Program Files\
That space in "Program Files" screws things up and MyApp.exe never gets copied.
Any assistance is appreciated.
Thanks
|
|
|
|
|
Try putting quotes around the path with the spaces so Program Files looks like "Program Files".
|
|
|
|
|
Alternatively try adding accompanying backspaces
|
|
|
|
|
If the full path looks something like
C:\Program Files\This, Inc\This TV App\TVAPP
do i place quotes around the entire thing like
C:\"Program Files\This, Inc\This TV App\TVAPP"
OR would it be inidvidually like
C:\"Program Files"\"This, Inc"\"This TV App"\TVAPP ??
|
|
|
|
|
|
englobe parameters with ""
xcopy ".\MyPatchJ\bin\MyApp.exe" "c:\Program Files\"
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
ok.. thanks.. i'll try that?
|
|
|
|
|
of course, why wouldn't you ? are you suspecting something ?
of course, don't if you don't want to copy into program files...
i just gave you the tip to work on dos with spaced parameters...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 11:07 Tuesday 6th September, 2005
|
|
|
|
|
You can use quotes as has already been suggested, use the 8.3 format of that folder without quotes, or use CopyFile() instead.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Could someone clear up a possible memory leak for me? In using ADO.NET in MFC Projects it is written:
#pragma push_macro("new")
#undef new
try
{
m_OleDbConnection = new OleDbConnection(
S"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.mdb"
);
m_OleDbConnection->Open(); // Open up the connection
m_OleDb = new OleDbCommand(S"select * from Persons", m_OleDbConnection);
m_Reader = m_OleDb->ExecuteReader();
int count = 0;
while (m_Reader->Read())
{
AddToList(count,m_Reader->get_Item("First Name")->ToString(),
m_Reader->get_Item("Last Name")->ToString(),
m_Reader->get_Item("Phone Number")->ToString()
);
count++;
}
}
catch(Exception *e)
{
AfxMessageBox(CString(e->ToString()));
}
__finally
{
m_Reader->Close();
m_OleDbConnection->Close();
}
#pragma pop_macro("new")
What is bothering me is there is a new with no delete. The most surprising one is m_OleDb which doesn’t even have a close, let alone a delete. I tried adding a close as well as a delete and neither was accepted by the compiler.
I open and close the database hundreds of times, so I wanted to consider leaving it open and then I started to think about the memory leak problem.
Can anyone give me a hint why a memory leak doesn’t seem to play here?
Thanks,
Ilan
|
|
|
|
|
Would it make sense to add the following below the call to ExecuteReader() :
delete m_OleDb; since m_OleDb is not used any more?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
It made so much sense that I already tried it.
The compiler refuses with the error message:
c:\Ilan\ctview\ReadStudy.cpp(1755): error C3841: illegal delete expression: managed type 'System::Data::SqlClient::SqlCommand' does not have a destructor defined
Therefore I wanted to see if anyone had any other ideas.
Thanks,
Ilan
|
|
|
|
|
|
My bad. I've not used .Net so my new/delete suggestion was apparently way off base.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
is there a way in C++ to get the ethernet address of a local machine running any of the MAC OS?
Rola
|
|
|
|
|
Technically, no. C++ knows nothing of IP addresses or the like. The API to obtain that type of information will likely be platform specific. For Windows, the information can be obtained with gethostname() followed by gethostbyname() , neither of which are C++.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Both gethostname() and gethostbyname() are part of the Berkley Sockets package which is the basis for most TCP/IP sockets implementations - so any OS that supports a Berkley Sockets implementation should have these calls.
Steve
|
|
|
|
|
Hi,
I am trying to create AES encryption and decryption separately. For that I have created two programs one does the encryption and one does the decryption. After the encryption, encrypted value is stored inside the database, later it is retrieved and passed as a parameeter to the decryption program.
The problem is that encrption works perfectly, but decryption is not.
here is the corresponding code snippets
ENCRYPTION
*****************************************************************************
pRequest->Write( "Hello from CFX_AES1!" ) ;
LPCSTR lpszVariable = pRequest->GetAttribute("outvar");
LPCSTR lpszEStr = pRequest->GetAttribute("eString");
LPCSTR lpszKey = pRequest->GetAttribute("key");
try
{
CRijndael oRijndael;
oRijndael.MakeKey(lpszKey, CRijndael::sm_chain0, 16, 16);
char szDataIn1[8000];
strcpy(szDataIn1,lpszEStr);
char szDataIn[8000];
char szDataOut[8000];
memset(szDataIn, 0, 8000);
memset(szDataOut, 0, 8000);
// Test ECB
strcpy(szDataIn, szDataIn1);
memset(szDataOut, 0, 8000);
oRijndael.Encrypt(szDataIn, szDataOut, 8000, CRijndael::ECB);
pRequest->SetVariable(lpszVariable,szDataOut);
}
****************************************************************************
DECRYPTION
****************************************************************************
LPCSTR lpszVariable = pRequest->GetAttribute("outvar1") ;
LPCSTR lpszEStr = pRequest->GetAttribute( "dString" );
LPCSTR lpszKey = pRequest->GetAttribute("key");
try
{
CRijndael oRijndael;
char szDataIn[8000];
char szDataOut[8000];
oRijndael.MakeKey(lpszKey, CRijndael::sm_chain0, 16, 16);
strcpy(szDataIn,lpszEStr);
//Test ECB
memset(szDataOut, 0, 8000);
oRijndael.Decrypt(szDataIn,szDataOut,8000, CRijndael::ECB );
pRequest->SetVariable( lpszVariable,szDataOut );
}
****************************************************************************
Thanks in advance,
mustangnet
|
|
|
|
|
Is there a way to use AA with MFC? I've created a skin system for my little app, and now I've added support for irregulary shaped skins, but they don't render quite as nice, I think AA would do the trick.. I don't want to link to DirectX or anything like that, my app needs to stay as small as possible..
Any ideas, thoughts..?
---
http://sprdsoft.cmar-net.org - We Sprd You Softly
Our site features contents and several images. All of this is very weird.
In the end, war is not about who's right, it's about who's left.
|
|
|
|
|
look over the internet for graphics gems books in pdf format and u have there everithing you need...
NG
|
|
|
|