Solved

Terminate ActiveX DLL

Posted on 2001-09-10
7
837 Views
Last Modified: 2008-03-10
the function for terminate EXE application is "END"
using this in ActiveX dll I receive the message:
     ?Compile error: Functionality not supported in DLL?
is there another way to do it?
0
Comment
Question by:danyb
  • 5
  • 2
7 Comments
 
LVL 39

Expert Comment

by:appari
ID: 6469937
setting the object variable to nothing will terminate the activex.

Dim acApp As Access.Application
Set acApp = New Access.Application
Set acApp = Nothing

0
 

Author Comment

by:danyb
ID: 6469949
my activeX application contain a FORM.
i'm openning the "from" from it.
i want to close the application from the "form".
how can i do it?
0
 
LVL 39

Expert Comment

by:appari
ID: 6469960
can you post code how you are creating the object and how you are showing the form inside dll?

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 39

Expert Comment

by:appari
ID: 6469964
>>i want to close the application from the "form".
does this mean you want to close calling application?
0
 

Author Comment

by:danyb
ID: 6469979
' activeX dll
-------------------------------------------------------
Implements ICommand
Implements ICreateCommand

Private Sub ICommand_Execute()
    ' Load the Tree form as MODAL
    Tools.Show vbModal
End Sub
------------------------------------------------------
if the form i'm using some other references.
and in the form i'm trying to close the application but...
0
 
LVL 39

Expert Comment

by:appari
ID: 6470020
this is being a dll you cannot use End statement . insted just Unload the form tolls.

and see the topic "Visual Basic Component Shutdown Rules." in MSDN for the rules to follow.

components will be released automatically when they are out of scope.
0
 
LVL 39

Accepted Solution

by:
appari earned 100 total points
ID: 6470023
Summary of Guidelines for Component Shutdown
The following guidelines summarize what you need to remember about component shutdown.

A well-behaved component does not control its own lifetime.


Don?t shut an out-of-process component down forcibly using the End statement.
As a corollary to this, don?t implement a Quit method. Releasing a component by releasing all references to its objects is good programming practice. Educate users of your component by explaining in your Help file that this is the correct way to release your component. Don?t encourage bad programming practices by giving developers a shortcut that could disrupt other clients.

Don?t prolong the life of your component needlessly by keeping a form loaded but hidden when there are no objects using it.


Avoid circular references that artificially prolong the life of your component, such as an object that holds a reference to a form that in turn holds a reference to the object. Circular references are discussed in "Dealing with Circular References," in "General Principles of Component Design."


If your component is a standalone desktop application that also provides objects, remember that the computer user is one of your clients.
Most of the work of being a good component is done for you by Visual Basic. You can go a long way by simply letting it do its job.


--------------------------------------------------------------------------------
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now