473,545 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I have a client shutdown a win32 COM server?

Hi,

How do I shutdown a win32 COM server?

I am scripting Adobe Illustrator through its COM interface.
The problem is that Illustrator has memory leaks.
And after a few hours of running, Illustrator will start to behave
oddly
until eventually it refuses the create new COM objects.
The solution is to close Illustrator and then restart it.
This is easy if I'm sitting at my desk and can see that it has
crashed.
What I'd like to do is have the client restart the server every 10
minutes
(or when it sees a specific exception).

A COM client will automatically start the COM server if it is
not already running, but I don't know how to shutdown a COM server
that is already running.

So, how do you bounce a COM server?
If anyone has any hints I would appreciate it.

P.S. Note, that I'm pretty sure it's not the client leaking memory
because
if I shutdown the client and restart it with the same Illustrator COM
server
running it will immediately have the same problem. The COM error I get
is an "internal error" exception:
com_error: (-2147352567, 'Exception occurred.', (0, None, 'an
internal error occurred: PARM', None, 0, -2147352577), None)

Yours,
Noah
Jul 18 '05 #1
1 2264
"Noah" <no**@noah.or g> wrote in message
Hi,

How do I shutdown a win32 COM server?


If that does not do it try:
comobject.Quit( )

Bob Gailer
bg*****@alum.rp i.edu
303 442 2625
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1892
by: Allan Bredahl | last post by:
Hi All I am trying to construct an application that is able to cancel a machine shutdown, reboot or logoff. And after performing some stuff to perform the original shutdown order : Shutdown/reboot/logoff. I have tried this : AddHandler Microsoft.Win32.SystemEvents.SessionEnding, AddressOf
5
3700
by: Rich | last post by:
I have a simple, single threaded program in C++ that runs as Idle priority. The program creates some data which needs dumping to file if the computer is shutdown or logged out. At the moment there is almost no Win32 code in it (only a few lines to do the idle priority class). What is the simplest way of programatically detecting the...
4
7358
by: Herbert VON GRÜNENWALD | last post by:
hi everyone, i've made a client/server class in C++ and some other to do the same thing in c#. clients and server works fine, in the two langages, but there is one problem when a c++ client disconnect from the c# server: - the connection is OK - when i send a message from the client to the server, no problems (it is received by the...
6
8744
by: carbon_dragon | last post by:
Ok, so here is the problem. I'm working on a headless server program implemented as a .NET C# Console project. There is a UPS mounted to this server (though not a windows compliant UPS). I can only talk to the UPS over a special device driver. Through this device driver I can detect that the UPS is going to notify Windows 2000 server to...
9
1326
by: diffuser78 | last post by:
My server.py looks like this ---------------------------------------------CODE---------------------------------- #!/usr/bin/env python import socket import sys import os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = ''
2
2073
by: ppuniversal | last post by:
Hi everyone, I have made a client-server code in Linux. The server is running properly and is sitting at its accept() method. But the client is unable to connect to the server. The Server and Client codes are as follows : Filename : Server.cpp #include<sys/types.h> #include<sys/socket.h> #include<netdb.h>
1
1877
by: Miroslav Endys | last post by:
I have two apps. Client and Server (both are windows console apps). Im using Client Socket of this definition AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp and Im using async communication with the Server Socket. I have no opened NetworkStream. In case, I kill my client application (via red cross) the server application...
6
4903
by: 7stud | last post by:
My question pertains to this example: #!/usr/bin/env python import socket, sys, time host = sys.argv textport = sys.argv s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
7
4679
by: Anil | last post by:
I have a Javascript program which runs in the browser and has functions work(), and stop(). It listens to commands from the server to work() and can be interrupted by the server to stop(). I am using XmlHttpRequest to talk to the server. So I use http GET to send a command "ready" to the server, which replies at some point in time by sending...
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7415
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.