Stege
March 24th, 2000, 10:13 AM
Folks !
I've encountered a strange problem with a small dialog-based app. I use MSVC++ 6.0 SP3, WinNT 4.0 SP5 and DAO 3.51 (access97)
I wrote a small dialog-app, that is capable of importing a non-replicated database into a replicated database master. In the first place, I distributed the app with dynamic linking to the mfc42.dll but did not ship the dll with the app.
I assumed the correct dll on the target system until I realized, that the tool could be run on a system where this version of the mfc42.dll might not be installed. The user gets an error message like '...could not find ordinal xxxx in mfc42.dll'. (this tool usually goes out together with some other app that ARE installing the correct dll's)
So far, so good.
Now, I switched the linker settings to link the mfc42.dll statically into the application, which he actually did. Since that time I get an 'invalid heap pointer' every time the code tries to concat two string together, no matter of how realizing it. I've tried things like :
CString aString:
aString = "some text : ";
astring += "another text";
or
CString aString;
aString.Format("some text : %s",pOtherText);
// where pOtherText is a (valid) pointer to 'another text'
or
CString aString = "some text : ";
aString = aString + "another text";
I think, I've tried 99% of all ways to concat two strings, but no cigar !
I tested this behaviour on a couple of other machines/platforms, all of them produced the same bug.
I've encountered a strange problem with a small dialog-based app. I use MSVC++ 6.0 SP3, WinNT 4.0 SP5 and DAO 3.51 (access97)
I wrote a small dialog-app, that is capable of importing a non-replicated database into a replicated database master. In the first place, I distributed the app with dynamic linking to the mfc42.dll but did not ship the dll with the app.
I assumed the correct dll on the target system until I realized, that the tool could be run on a system where this version of the mfc42.dll might not be installed. The user gets an error message like '...could not find ordinal xxxx in mfc42.dll'. (this tool usually goes out together with some other app that ARE installing the correct dll's)
So far, so good.
Now, I switched the linker settings to link the mfc42.dll statically into the application, which he actually did. Since that time I get an 'invalid heap pointer' every time the code tries to concat two string together, no matter of how realizing it. I've tried things like :
CString aString:
aString = "some text : ";
astring += "another text";
or
CString aString;
aString.Format("some text : %s",pOtherText);
// where pOtherText is a (valid) pointer to 'another text'
or
CString aString = "some text : ";
aString = aString + "another text";
I think, I've tried 99% of all ways to concat two strings, but no cigar !
I tested this behaviour on a couple of other machines/platforms, all of them produced the same bug.