Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet another C0xC0000005
Message
De
17/12/1998 17:09:53
 
 
À
17/12/1998 16:49:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00167591
Message ID:
00168707
Vues:
33
>>>This one fails only as Foxpro runtime is closed down on one app only, which uses an ActiveX component. Others are fine.
>>>
>>>(Ed - I didn't mention the ocx did I. It's a Socket/X from Mabry - no reason to beleive there's a problem with the control.)
>>
>>The fact that other VFP6 applications on the same machine shut down safely makes the DCOM answer suspect; if it were the generic DCOM error, all VFP6 applications that started up with the screen disabled and were shut down after showing a window would C0000005 out. So something other than the DCOM problem may be causing this particular error for you.
>>
>>Does the application fail with the C0000005 error if the form containing the Mabry ActiveX control is never instantiated? If not, then something going on in that particular form may be causing the failure.
>>
>>Does the application fail in the same way if you shut down via different methods (invoking shutdown by clicking the close button on the main window vs selecting an exit oiption from a menu or toolbar)?
>>
>>Posting your ON SHUTDOWN procedure and the Destroy Event and Release Method code might help here if you suspect code in the form or VFP termination.
>>
>>Ed
>
>Hi Again Ed..
>The main program is simple...
>
>**************************************************
>do form camtech
>read events
>**************************************************
>
>The form it calls is as follows. It's purely a test program of the Mabry control.
>
>**************************************************
>*-- Form: frmcamtech (c:\dev\harris\web\forms\camtech.scx)
>*-- ParentClass: form
>*-- BaseClass: form
>*
>DEFINE CLASS frmcamtech AS form
>
>
> Top = 0
> Left = 0
> Height = 337
> Width = 428
> DoCreate = .T.
> Caption = "Camtech Test System"
> Name = "frmCamTech"
>
>
> ADD OBJECT olesocket1 AS olecontrol WITH ;
> Top = 30, ;
> Left = 354, ;
> Height = 100, ;
> Width = 100, ;
> Name = "oleSocket1"
>
>
> ADD OBJECT edtsend AS editbox WITH ;
> Height = 108, ;
> Left = 12, ;
> Top = 78, ;
> Width = 318, ;
> Name = "edtSend"
>
>
> ADD OBJECT edtreceive AS editbox WITH ;
> Height = 102, ;
> Left = 12, ;
> Top = 216, ;
> Width = 318, ;
> Name = "edtReceive"
>
>
> ADD OBJECT command1 AS commandbutton WITH ;
> Top = 78, ;
> Left = 336, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "\> Name = "Command1"
>
>
> ADD OBJECT label3 AS label WITH ;
> Caption = "Data to Send", ;
> Height = 17, ;
> Left = 18, ;
> Top = 60, ;
> Width = 114, ;
> Name = "Label3"
>
>
> ADD OBJECT label4 AS label WITH ;
> Caption = "Received Data", ;
> Height = 17, ;
> Left = 18, ;
> Top = 198, ;
> Width = 114, ;
> Name = "Label4"
>
>
> ADD OBJECT command2 AS commandbutton WITH ;
> Top = 114, ;
> Left = 336, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Re-init", ;
> Name = "Command2"
>
>
> ADD OBJECT command3 AS commandbutton WITH ;
> Top = 288, ;
> Left = 336, ;
> Height = 27, ;
> Width = 84, ;
> Caption = "Clear", ;
> Name = "Command3"
>
>
> ADD OBJECT label1 AS label WITH ;
> Caption = "Label1", ;
> Height = 17, ;
> Left = 24, ;
> Top = 6, ;
> Width = 168, ;
> Name = "Label1"
>
>
> ADD OBJECT label2 AS label WITH ;
> Caption = "Label1", ;
> Height = 17, ;
> Left = 24, ;
> Top = 24, ;
> Width = 168, ;
> Name = "Label2"
>
>
> ADD OBJECT label5 AS label WITH ;
> Caption = "Label5", ;
> Height = 17, ;
> Left = 174, ;
> Top = 54, ;
> Width = 132, ;
> Name = "Label5"
>
>
> PROCEDURE QueryUnload
> thisform.olesocket1.close

Humor me and add:
                thisform.RemoveObject('Olesocket1')
                _screen.visible = .f.
It shouldn't be necessary, and shouldn't make a difference

> clear events
> ENDPROC
>
>
> PROCEDURE Init
> with ThisForm.oleSocket1
> .Create
> .Connect
> endwith
> ENDPROC
>
>
> PROCEDURE olesocket1.Receive
> *** ActiveX Control Event ***
> LPARAMETERS errorcode
> LOCAL t
> * Receive data available, get it
> t = this.ReceiveBuffer
>
> thisform.edtReceive.value= t
> ENDPROC
>
>
> PROCEDURE olesocket1.Send
> *** ActiveX Control Event ***
> LPARAMETERS errorcode
> if vartype(errorcode) = 'N'
> wait window ltrim(str(errorcode))
> endif
> ENDPROC
>
>
> PROCEDURE olesocket1.Init
> this.reUseAddressEnabled= .T.
> ENDPROC
>
>
> PROCEDURE edtsend.Init
> this.value= 'message.type=capture' + CHR(13)+CHR(10) ;
> + 'merchant.identifier=ht' + CHR(13)+CHR(10) ;
> + 'merchant.ordernumber=200123' + CHR(13)+CHR(10) ;
> + 'card.PAN=5313280856026330' + CHR(13)+CHR(10) ;
> + 'card.expiryYear=00' + CHR(13)+CHR(10) ;
> + 'card.expiryMonth=04' + CHR(13)+CHR(10) ;
> + 'capture.amount=5700' + CHR(13)+CHR(10) ;
> + 'cardholder.ip=192.168.91.12' + CHR(13)+CHR(10) ;
> + 'message.end' + CHR(13)+CHR(10)
>
> ENDPROC
>
>
> PROCEDURE command1.Click
> with thisform
> .oleSocket1.sendBuffer= .edtSend.value
> .oleSocket1.send
> endwith
> ENDPROC
>
>
> PROCEDURE command2.Click
> thisform.edtSend.init()
> ENDPROC
>
>
> PROCEDURE command3.Click
> thisform.edtReceive.value= ''
> ENDPROC
>
>
> PROCEDURE label1.Init
> this.caption= thisform.olesocket1.localaddress
> ENDPROC
>
>
> PROCEDURE label2.Init
> this.caption= ltrim(str(thisform.olesocket1.localport))
> ENDPROC
>
>
> PROCEDURE label5.Init
> this.caption= iif(thisform.olesocket1.reUseAddressEnabled, 'ReuseEnabled', 'Not enabled')
> ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: frmcamtech
>**************************************************
>
>I'm not on site anymore so I can't test it any further at the moment.
>Thanks for your patience.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform