Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

This program has performed an illegal operation and will be shut down??

Posted on 2003-03-26
2
Medium Priority
?
857 Views
Last Modified: 2012-05-04
Hi, I'm buiding an application to get data from a device. this device using auto comm mode (send data everytime). I could open the port, and get the data properly good. but when i closed the port(through close icon on right top form), sometimes but almost appear this error "an error occured that said the progam has performed an illegal operation and will be shut down".
but if i closed through command button (just unload me code inside it) it never get the same error.
I'm using an activeX Exe program to communicate with device.
I create an instance to the activeX Exe and kill it when unload form.

this below is the detail of error cause :
DRGABCOMM caused an invalid page fault in
module KERNEL32.DLL at 017f:bff7b9a6.
Registers:
EAX=00000000 CS=017f EIP=bff7b9a6 EFLGS=00000246
EBX=004164d0 SS=0187 ESP=0063fb60 EBP=0063fb7c
ECX=0041624c DS=0187 ESI=004164d0 FS=5d57
EDX=0107003c ES=0187 EDI=00000000 GS=0000
Bytes at CS:EIP:
ff 76 04 e8 13 89 ff ff 5e c2 04 00 56 8b 74 24
Stack dump:
0041624c 21c193a3 004164d0 00000000 0041624c 00000001 0041624c 0063fba0 21c1963c 0063fb94 0063fbb8 00008c28 0063fc04 00000000 0000002d 00000000

please help me to solve this prob..
thank you


Liung 012
0
Comment
Question by:liung012
2 Comments
 
LVL 3

Accepted Solution

by:
n_narayanan earned 150 total points
ID: 8218018
Whatever you have written to unload the code (in the command button event) put the same in the following two events,

form_queryunload()

also put the same in

form_terminate() event

Regards

Narayanan
0
 

Author Comment

by:liung012
ID: 8237449
hi, Narayanan..
I found it. i've already did same as your suggestion
This's your points.

thanks..
Liung012
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question