Skip to main content
Participant
October 21, 2012
Question

Re-Asking: Help with startup/shutdown services

  • October 21, 2012
  • 1 reply
  • 6053 views

I already tried here:

http://forums.adobe.com/thread/1084857

, and got not success.

I want a really small sample of the startup/shutdown service working. If you guys read up the above post, you'll see what I want.

I tried as the book says to do, couldnt get it to work.

Pleeease, I really need a sample so I can learn how to do it. The documentation is a little messed up.

This topic has been closed for replies.

1 reply

Inspiring
January 19, 2013

In resource ClassDescriptionTable section of <ProjectName>.fr add

Class

    {

        kStartupShutdownBoss,

        kInvalidClass,

        {

            IID_IK2SERVICEPROVIDER, kLazyStartupShutdownProviderImpl,

            IID_ISTARTUPSHUTDOWN, kStartupShutdownImpl,

        }

    },

To <ProjectName>ID.h add:
DECLARE_PMID(kClassIDSpace, kStartupShutdownBoss, kPrefix + 2)

DECLARE_PMID(kImplementationIDSpace, kStartupShutdownImpl, kPrefix + 1 )

To <ProjectName>FactoryList.h add:

REGISTER_PMINTERFACE(CStartupShutdownService, kStartupShutdownImpl)

StartupShutdownService.h

#ifndef _CStartupShutdownService_

#define _CStartupShutdownService_

#include <CPMUnknown.h>

#include <IStartupShutdownService.h>

class CStartupShutdownService:

    public CPMUnknown<IStartupShutdownService>

{

public:

    CStartupShutdownService(IPMUnknown *boss);

    virtual ~CStartupShutdownService();

    virtual void Startup();

    virtual void Shutdown();

};

#endif

StartupShutdownService.cpp

#include "VCPlugInHeaders.h"

#include "StartupShutdownService.h"

#include "ID.h"

#include <CAlert.h>

CREATE_PMINTERFACE(CStartupShutdownService, kStartupShutdownImpl)

CStartupShutdownService::CStartupShutdownService(IPMUnknown *boss)

    :CPMUnknown(boss)

{

}

CStartupShutdownService::~CStartupShutdownService()

{

}

void CStartupShutdownService::Startup()

{

    //TODO after startup actions

}

void CStartupShutdownService::Shutdown()

{

   //TODO after sgutdown actions   

}

jochens5907408
Known Participant
June 23, 2016

Hi Alo,

that information I've alredy found and have implemented my code regarding tis

informetion.

But the my StartupShutdownService::Startup()-Method is not reached, because

obviusely the StartupShutdownService is not executed by the

plug-in-registering-functionality.

The plug-in it self is loaded without any error.

I've got several recommendations and heve searched by myself.

But all these samples basicmenu, snippedrunner and paneltreeview use another

approach.

Here the resources are defnied within the ID.fr file and are processed

obviously by the odrfz.

At none of these cases the StartupShutdownService::Starup()-method is reached at

plug-in(ID)-Startup.

Kind regards

Jochen Seliger

Alo Lohrii <forums_noreply@adobe.com> hat am 23. Juni 2016 um 09:12

geschrieben:

Alo Lohrii marked Nimesis's reply on Re-Asking: Help with startup/shutdown

services as helpful.

>

jochens5907408
Known Participant
June 28, 2016

I have built XMLCatalogHandler by InDesign CS2 4.0.2 Products SDK.

It seems working fine.

Try,

www.loyal.co.jp/gaiyou/l_group/LCS/test/XMLCatalogHandler.zip


Hi Norio,

the link did not work for me.

Could you please send me the resulting plug-in for xmlcataloghandler to

jochen.seliger@flowcontrol.org, if your plug-in is really showing the

FileHelper-Dialog.

Kind regards

Jochen Seliger

Norio Kawamura <forums_noreply@adobe.com> hat am 28. Juni 2016 um 04:11

geschrieben:

Norio Kawamura created the

discussion

"Re-Asking: Help with startup/shutdown services"

To view the discussion, visit:

https://forums.adobe.com/message/8840585#8840585

>