PlugIn Example in C
Hi
i have converted Framework.zir to framework.h , also i made a test plugin in C
i have used Pelles C to compile this project
downlod it here http://spoilerspace.com//bcxdx/Ziron/zirPlugin.zip
/****************************************************************************
* *
* File : dllmain.c *
* *
* Purpose : Generic Win32 Dynamic Link Library (DLL). *
* *
* History : Date Reason *
* 00/00/00 Created *
* *
****************************************************************************/
#define WIN32_LEAN_AND_MEAN /* speed up */
#include <windows.h>
#include "framework.h"
#include "ZIRPLUGIN.h"
//////////////////////////////
char* strLoaded = "My plugin has loaded!";
//////////////////////////////
//
// event_Emit()
// return false to allow the assembler to process this keyword internally.
// return true to tell the assembler this keyword has been processed.
//
BOOL event_Emit(void)
{
Ziron_ShowMessage("hellow from plugin written with C.");
return TRUE;
}
char* InitPlugin(void* pGetF)
{
Ziron_LoadAll(pGetF); //use framework utility function to load all
//register our keyword
Ziron_RegisterKeyword("emit", event_Emit);
return strLoaded;
}
/****************************************************************************
* *
* Function: DllMain *
* *
* Purpose : DLL entry and exit procedure. *
* *
* History : Date Reason *
* 00/00/00 Created *
* *
****************************************************************************/
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
/* Return success */
return TRUE;
}
http://www.freewebs.com/ogremagic/index.htm