Win32 Plugin DLL


Subject: Win32 Plugin DLL
From: Michael D. Pritchett (mpritchett@attglobal.net)
Date: Wed Sep 12 2001 - 11:30:58 CDT


I will supply be e-mail a 28k testing DLL for those who would like to
check out the new dialog. The DLL does nothing but register and disply
its information.

The source code for the DLL is as follows:

/*
 * MyDLLText - Abiword plugin for Testing Purposes
 * Copyright (C) 2001 by Michael D. Pritchett
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */

// Exclude rarely-used stuff from Windows headers
#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <xap_Module.h>

#define ABI_FAR __declspec( dllexport )

BOOL APIENTRY DllMain( HANDLE hModule,
                       DWORD ul_reason_for_call,
                       LPVOID lpReserved
                                         )
{
    return TRUE;
}

extern "C" ABI_FAR
int abi_plugin_register (XAP_ModuleInfo * mi)
{
    mi->name = "Tester";
    mi->desc = "MyDllTest.dll is a plugin for testing the plugin manager";
    mi->version = "0.9.4";
    mi->author = "Michael D. Pritchett";
    mi->usage = "Usage: None";
    return 1;
}

extern "C" ABI_FAR
int abi_plugin_unregister (XAP_ModuleInfo * mi)
{
    mi->name = 0;
    mi->desc = 0;
    mi->version = 0;
    mi->author = 0;
    mi->usage = 0;
    return 1;
}

extern "C" ABI_FAR
int abi_plugin_supports_version
8 (UT_uint32 major, UT_uint32 minor, UT_uint32 release)
{
        return 1;
}



This archive was generated by hypermail 2b25 : Wed Sep 12 2001 - 11:41:55 CDT