View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000903 | SkyChart | 1-Software | public | 11-11-26 01:49 | 12-03-04 19:26 |
| Reporter | Pete Gladstein | Assigned To | Patrick Chevalley | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Platform | Windows | OS | Win 7 64bit | OS Version | SP1 |
| Product Version | 3.4 | ||||
| Summary | 0000903: Deep Sky Planner does not start CdC if it is not running by design | ||||
| Description | This is a feature request. I use Deep Sky Planner (DSP). DSP integrates with CdC, but does not launch it. CdC must be previously launched. Per the author of DSP "DSP does not start CdC if it is not running by design. CdC does not use a system method such as COM to identify itself. Searching the registry for a program name isn't a durable solution so it isn't supported". Would it be possible to enhance CdC to use a System Method (e.g. COM)? Thanks for Listening. | ||||
| Tags | No tags attached. | ||||
|
|
No, COM is not possible because this is Windows specific and CdC is multi-platform Windows-Mac-Linux. The way to start CdC is the same as I use for the Deepsky2000 interface. It is possible to use the same dll as is, it is free of any right. You can get the compiled dll from: http://svn.origo.ethz.ch/wsvn/skychart/trunk/skychart/sample_client/ds2cdc/ds2cdc.dll.zip The VB interface for the dll is describe here: http://svn.origo.ethz.ch/wsvn/skychart/trunk/skychart/sample_client/ds2cdc/VB.txt Simply call CDC_DrawChart, ignoring any parameters after FOV. This will start CdC if necessary and draw the chart. And CDC_CloseChart when you exit your program. You can look at the full source code here: http://svn.origo.ethz.ch/wsvn/skychart/trunk/skychart/sample_client/ds2cdc/ The main unit is: http://svn.origo.ethz.ch/wsvn/skychart/trunk/skychart/sample_client/ds2cdc/ds2cdc1.pas The unit that contain the Windows specific to start the program is: http://svn.origo.ethz.ch/wsvn/skychart/trunk/skychart/sample_client/ds2cdc/Sky_DDE_util.pas (the DDE in name is from CdC V2, it no more do any DDE). Here some explanation on how it work if you prefer to write your own code: - To know if the program is already running use findwindow() for caption 'Skychart' - To know where it is installed read the key HKCU\Software\Astro_PC\Ciel\Install_Dir - To start the program I use ShellExecute but this is also possible with CreateProcess. - When the program is ready to accept command it set the key HKCU\Software\Astro_PC\Ciel\Status\TcpPort with the port it is listening on. This can be different than 3292 if it is already in use by another process. Do this help? |
|
|
Patrick, Phyllis here from Knightware (Deep-Sky Planner). The code samples above helped regarding registry data - thank you. Can I count on HKCU\Software\Astro_PC\Ciel\Status\TcpPort being set to non-zero when CdC 3 is running and initialized? That should get around the problem with using FindWindow() since the main window caption includes chart file name now. Also, is the delay in the code sample still required with CdC 3? I am using ShellExecute() with no delay timer and it seems to work on my test computers. Thanks! |
|
|
Hello Phyllis, Yes, the program must be ready to accept a command when TcpPort is non zero. The only case it can be non zero with CdC not running is if it previously crash, so it not set the value to zero after closing the socket. I think this is a good idea to read this value instead of using FindWindow. I set a delay in the code just to not wait infinitely if there is a problem to start the program. The delay is long because in the case of an upgrade CdC display some release notes before to start and open the tcp port, so I set the maximum wait to 90 seconds because of that. Patrick |
|
|
Patrick, I had found the one case that leads to TcpPort != 0. I'm glad you confirmed that. Thank you also for the guidance on the delay time. I will beta test some time values <= 90 and find an agreeable value. Merci beaucoup pour votre aide! - Phyllis |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 11-11-26 01:49 | Pete Gladstein | New Issue | |
| 11-11-26 10:26 | Patrick Chevalley | Note Added: 0001794 | |
| 11-11-26 10:26 | Patrick Chevalley | Assigned To | => Patrick Chevalley |
| 11-11-26 10:26 | Patrick Chevalley | Status | new => feedback |
| 11-11-26 10:28 | Patrick Chevalley | Note Edited: 0001794 | |
| 11-11-26 10:29 | Patrick Chevalley | Note Edited: 0001794 | |
| 11-11-27 13:51 | Phyllis Lang | Note Added: 0001795 | |
| 11-11-27 16:38 | Patrick Chevalley | Note Added: 0001796 | |
| 11-11-29 13:48 | Phyllis Lang | Note Added: 0001799 | |
| 11-12-30 18:41 | Patrick Chevalley | Status | feedback => resolved |
| 11-12-30 18:41 | Patrick Chevalley | Resolution | open => fixed |
| 12-03-04 19:26 | Patrick Chevalley | Status | resolved => closed |