                   UO Extreme 7 alpha 3 - Developer's Kit

Direct Download Information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you want to make your PlugIn available for download from UO Extreme 7's
PlugIn wizard, see DEVKIT/DOC/DDINFO.TXT and DEVKIT/DOC/DDAPP.TXT.


Important Changes Since Alpha 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The method of loading PlugIns has changed.  It no longer uses the registry
to find installed PlugIns.  Instead, it searches its own directory for
any *.PI file and then procedes to load it.  *.PI files are simply renamed
*.DLL files.  You will have to setup your compiler to generate *.PI files
instead of *.DLL files.

If your PlugIn used the UI services, (AddBar, AddView, etc), then you must
change your PlugIn's ExitInstance function and call the corresponding
Remove function (RemoveBar, RemoveView, etc) with the return value of
the Add* functions. See the PacketLogPlugIn.cpp file for an example.

The CPlugIn constructor has changed slightly.  It now requires you to pass 
a PLUGINVERSION structure.  It also has the optional parameter of 
Author name.  For example:

CPlugIn(CLSID_PacketLogPlugIn, "Packet Log PlugIn", PLUGINVERSION(1, 0, 30), "Jarrett")

The method of initializing PlugIns has also changed.  You PlugIn DLL must
export the function PlugInMain, which is defined as:

int PlugInMain(UINT uMsg, WPARAM wParam, LPARAM lParam);

An example of PlugInMain is:

PACKETLOG_API int PlugInMain(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	int iResult = 0;

	switch (uMsg)
	{
	case PLUGIN_LOAD:
		if (!pPacketLogPlugIn)
		{
			pPacketLogPlugIn = new CPacketLogPlugIn;

			pPacketLogPlugIn->Register();

			iResult = TRUE;
		}
		break;
	case PLUGIN_UNLOAD:
		if (pPacketLogPlugIn)
		{
			pPacketLogPlugIn->Unregister();

			delete pPacketLogPlugIn;

			pPacketLogPlugIn = NULL;

			iResult = TRUE;
		}
		break;
	case PLUGIN_GETCPLUGINVERSION:
		iResult = CPLUGINVERSION;
		break;
	case PLUGIN_GETFILEDEPENDENCIES:
		break;
	}

	return iResult;
}
