Inside VC++ Example fails in Release mode.
Jody Baudoin -- jabaudoin@halnet.com
Thursday, August 08, 1996
Environment: VC++ 4.2, Win-95, Win-NT 4.0 BETA 2, WIN-NT 3.51 sp3.
> Hi there!
Hi.
>
> I tried to execute a Sample out of 'Kruglinsky - Inside Visual C++':
> example Ex087B but it didn't work!
>
> IT'S REALY IMPORTANT (NOT ONLY FOR ME!)
>
The same thing happened to me. However it was a different example,
and it only fails in Release build mode.
I can run ex24d.exe (debug build) off the CD-ROM with success.
Excel comes up, and a BOOK1 spread sheet comes up.
I can build the program myself and run that ex24d.exe also.
HOWEVER, I cannot run a Release build of the ex24d. :-(.
It CRASHES for me.
I had used this example program to develop a DATA INTO EXCEL and
back program. It does not work in release mode. The Excel
program comes up, but not the little grid frame called book1.
I have code available on request. The .GetCount() after an AttachDispatch
produces a wild number in Release mode, but 0 in debug mode.
So, does anyone know of a ftp or WWW site for Kruglinski's book that
may have updates and examples fixes, as per new MFC version and so forth?
Regards,
Jody Baudoin (jabaudoin@halnet.com)
Mike Blaszczak -- mikeblas@nwlink.com
Sunday, August 11, 1996
[Mini-digest: 2 responses]
At 09:32 AM 8/8/96 -0500, Jody Baudoin wrote:
>> I tried to execute a Sample out of 'Kruglinsky - Inside Visual C++':
>> example Ex087B but it didn't work!
> The same thing happened to me. However it was a different example,
> and it only fails in Release build mode.
> I can run ex24d.exe (debug build) off the CD-ROM with success.
> Excel comes up, and a BOOK1 spread sheet comes up.
Which versions of the Kruglinski book are you using? "Inside Visual C++"
has shipped three different editions--aimed at Visual C++ 1.0,
Visual C++ 1.5, and Visual C++ 4.0, respectively.
If you can provide this background information, it would be useful
for me to give David Kruglinski your notes face-to-face the next time
he drops by to ask questions.
> So, does anyone know of a ftp or WWW site for Kruglinski's book that
> may have updates and examples fixes, as per new MFC version and so forth?
You could start digging around at http://www.microsoft.com/mspress, I think.
I don't hang around there, so I don't know if they have updates or not,
but I'd expect they should provide some mechanism for feedback.
.B ekiM
http://www.nwlink.com/~mikeblas <--- trip report central
1995 Honda VFR750F (Serial number 00050!)
1987 Yamaha FZ700 (damaged) AMA, HRC, VFROC
These words are my own: I do not speak for Microsoft.
-----From: rwagner
Environment: VC++ 4.1, Win-95, Win-NT 3.51.1057, SP3, July '96 MSDN
I've reproduced this not only in Kruglinski. When I tried a release build on
my own (original) MFC-based programs as well, the same thing happened!!!!
Needless to say, a NUMBER OF eyes are on this problem.
[Moderator's note: I'm confused. Are you talking about a specific
problem, or just a general inability to write programs that work
correctly when recompiled. This is not uncommon, but it almost always
turns out to be the fault of the programmer. The most common causes
are using ASSERT when you mean VERIFY and overstepping the bounds of
an array. I have yet to hear of a case where this was not the programmer's
fault. Would you care to share source for one of your programs that
fails?]
LeRoy Baxter -- lbaxter@cinfo.com
Tuesday, August 13, 1996
[Mini-digest: 2 responses]
I had two programs that compiled, linked and ran under VC++4.1 but failed to link
under VC++4.2. The problem was a define that was duplicated in my code and
in MFC -- HOWEVER, this was not a case of improperly assigning a number to a
define that later was used by the framework -- apparently, the Resource editor
re-numbered some of my defines causing the collision (it was a string id). It
showed up in Release mode but not Debug because of using Static lib Vs
shared lib.
-----From: jabaudoin@halnet.com (Jody Baudoin)
> Which versions of the Kruglinski book are you using? "Inside Visual C++"
> has shipped three different editions--aimed at Visual C++ 1.0,
> Visual C++ 1.5, and Visual C++ 4.0, respectively.
Inside Visual C++ 4.0, concerning Realease builds of ex24d.exe
Ex24d.exe is an example of how to control Excel from Visual C++.
It seems to be ASSERT related. For those interested in
Excel control, Microsoft's has an example called XLCLIENT.exe,
that has proven a useful example.
Regards,
jabaudoin@halnet.com
> .B ekiM
> http://www.nwlink.com/~mikeblas <--- trip report central
| Вернуться в корень Архива
|