appsstarter.c

来自「The program from autostart another progr」· C语言 代码 · 共 49 行

C
49
字号
#include "AppsStarter.h"

int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
	*ppObj = NULL;

	if( ClsId == AEECLSID_APPSSTARTER )
	{
		// Create the applet and make room for the applet structure
		if( AEEApplet_New(sizeof(AppsStarter),
                          ClsId,
                          pIShell,
                          po,
                          (IApplet**)ppObj,
                          (AEEHANDLER)AppsStarter_HandleEvent,
                          (PFNFREEAPPDATA)AppsStarter_FreeAppData) ) // the FreeAppData function is called after sending EVT_APP_STOP to the HandleEvent function
                          
		{
			//Initialize applet data, this is called before sending EVT_APP_START
            // to the HandleEvent function
			if(AppsStarter_InitAppData((AppsStarter*)*ppObj))
			{
				//Data initialized successfully
				return(AEE_SUCCESS);
			}
			else
			{
				//Release the applet. This will free the memory allocated for the applet when
				// AEEApplet_New was called.
				IAPPLET_Release((IApplet*)*ppObj);
				return EFAILED;
			}

        } // end AEEApplet_New

    }

	return(EFAILED);
}



static boolean AppsStarter_HandleEvent(AppsStarter* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{  
	AEENotify * notify;

    switch (eCode) 
	{
		case EVT_NOTIFY: // 棱蝾玎矬耜 镳桦铈屙

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?