[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Vc++ runtime library error

Chris Douce

2/8/2012 5:27:00 PM

Hi all,

We have an application in which we use OCX's (VsFlexGrid and MetaDraw)
and ADO with an access database.
Everything went well until Win7.
On the Win7 systems, we get from time to time an error from
VC++ Runtime Library:
This applications has requested the Runtime to terminate in an unusual
way. There is no application name and just an OK Button.

When I say 'From time to time', I mean I cannot repeat the error and it
comes maybe twice a day or so. Only on Win7, never on XP.


I have an "On Local Error Resume Next" error trapping
But the error doesn't seem to be trapped.

This is the code where I suppose the fault comes from.

On Local Error Resume Next
frm_input_order.MDraw.LoadPicture recTmp.Fields("Pic1"),
PIC_PICTURE, PICTYPE_DEFAULT
frm_input_order.MDraw2.LoadPicture recTmp.Fields("Pic2"),
PIC_PICTURE, PICTYPE_DEFAULT

frm_input_order.MDraw3.Clear

frm_input_order.MDraw3.LoadPicture recTmp.Fields("Pic3"),
PIC_PICTUREIMAGE, PICTYPE_JPGFILE

frm_input_order.MDraw3.Picture = frm_input_order.MDraw3.PictureImage
On Local Error GoTo 0

In fact, the drawings are read from an access database. The field type
for the drawings is 'OLE Object'

I did a lot of searching on Google and found a lot of pages on this
error but none of the solutions did help.

Is there any way of trapping thsi kind of VC++ error?

Thanks in advance

Chris
6 Answers

ralph

2/8/2012 6:49:00 PM

0

On Wed, 08 Feb 2012 18:27:26 +0100, Chris Douce
<chris.douce@skynet.invalid> wrote:

>Hi all,
>
>We have an application in which we use OCX's (VsFlexGrid and MetaDraw)
>and ADO with an access database.
>Everything went well until Win7.
>On the Win7 systems, we get from time to time an error from
>VC++ Runtime Library:
>This applications has requested the Runtime to terminate in an unusual
>way. There is no application name and just an OK Button.
>

Ask for the Hotfix
http://support.microsoft.com...

-ralph

ralph

2/8/2012 6:57:00 PM

0

On Wed, 08 Feb 2012 18:27:26 +0100, Chris Douce
<chris.douce@skynet.invalid> wrote:

>Hi all,
>
>We have an application in which we use OCX's (VsFlexGrid and MetaDraw)
>and ADO with an access database.
>Everything went well until Win7.
>On the Win7 systems, we get from time to time an error from
>VC++ Runtime Library:
>This applications has requested the Runtime to terminate in an unusual
>way. There is no application name and just an OK Button.
>
>When I say 'From time to time', I mean I cannot repeat the error and it
>comes maybe twice a day or so. Only on Win7, never on XP.
>

>
>Is there any way of trapping thsi kind of VC++ error?
>

I doubt there is anyway to 'catch' the error in VB as I doubt the
VBRuntime is even aware an error has occurred.

I appreciate you said the problem doesn't happen on WinXP. Check the
file versions as noted in the article. The Hotfix is for the 7.0
version of those files - NO matter what platform they are installed
on.

-ralph

Chris Douce

2/8/2012 7:19:00 PM

0

Hi Ralph,

Are you sure this hotfix is for Win7?
The article goes about an application error on XP?
And what if the fileversion on Win7 is newer?

The article also state for the /GR an /MD compiler switches.

I compile either to P-Code are Native code with 'Optimze for fast code'
and 'Favor Pentium Pro' checked. Is one of those compiler switches
involved?

Thanks

Chris


On 8/02/2012 19:57, ralph wrote:
> On Wed, 08 Feb 2012 18:27:26 +0100, Chris Douce
> <chris.douce@skynet.invalid> wrote:
>
>> Hi all,
>>
>> We have an application in which we use OCX's (VsFlexGrid and MetaDraw)
>> and ADO with an access database.
>> Everything went well until Win7.
>> On the Win7 systems, we get from time to time an error from
>> VC++ Runtime Library:
>> This applications has requested the Runtime to terminate in an unusual
>> way. There is no application name and just an OK Button.
>>
>> When I say 'From time to time', I mean I cannot repeat the error and it
>> comes maybe twice a day or so. Only on Win7, never on XP.
>>
>
>>
>> Is there any way of trapping thsi kind of VC++ error?
>>
>
> I doubt there is anyway to 'catch' the error in VB as I doubt the
> VBRuntime is even aware an error has occurred.
>
> I appreciate you said the problem doesn't happen on WinXP. Check the
> file versions as noted in the article. The Hotfix is for the 7.0
> version of those files - NO matter what platform they are installed
> on.
>
> -ralph

Chris Douce

2/8/2012 8:27:00 PM

0

On 8/02/2012 20:19, Chris Douce wrote:
> P-Code are Native code

I mean P-Code or Native code

unknown

2/8/2012 8:47:00 PM

0

"Chris Douce" <chris.douce@skynet.invalid> wrote in message
news:jguhs2$80g$1@dont-email.me...
> Hi Ralph,
>
> Are you sure this hotfix is for Win7?
> The article goes about an application error on XP?

Sometimes the same bug affects later versions of Windows without MS saying
so, so it doesn't hurt to try.

> And what if the fileversion on Win7 is newer?

Then try to update the C++ runtimes. Search for the latest VC runtime
redistributable.

> The article also state for the /GR an /MD compiler switches.
>
> I compile either to P-Code are Native code with 'Optimze for fast code'
> and 'Favor Pentium Pro' checked. Is one of those compiler switches
> involved?

No. These switches are for the VC compiler.


Chris Douce

2/8/2012 10:15:00 PM

0

On 8/02/2012 21:47, Farnsworth wrote:
> "Chris Douce"<chris.douce@skynet.invalid> wrote in message
> news:jguhs2$80g$1@dont-email.me...
>> Hi Ralph,
>>
>> Are you sure this hotfix is for Win7?
>> The article goes about an application error on XP?
>
> Sometimes the same bug affects later versions of Windows without MS saying
> so, so it doesn't hurt to try.

I'll try to backup the files and install the hotfix anyway.

>
>> And what if the fileversion on Win7 is newer?
>
> Then try to update the C++ runtimes. Search for the latest VC runtime
> redistributable.

I already did but no change.

>
>> The article also state for the /GR an /MD compiler switches.
>>
>> I compile either to P-Code are Native code with 'Optimze for fast code'
>> and 'Favor Pentium Pro' checked. Is one of those compiler switches
>> involved?
>
> No. These switches are for the VC compiler.
>
>

Thanks so far