76 lines
1.9 KiB
C
76 lines
1.9 KiB
C
/*
|
|
* Process Hacker Plugins -
|
|
* CommonUtil Plugin
|
|
*
|
|
* Copyright (C) 2016 dmex
|
|
*
|
|
* This file is part of Process Hacker.
|
|
*
|
|
* Process Hacker 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 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Process Hacker 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 Process Hacker. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#include "main.h"
|
|
|
|
PPH_PLUGIN PluginInstance;
|
|
COMMONUTIL_INTERFACE PluginInterface =
|
|
{
|
|
COMMONUTIL_INTERFACE_VERSION,
|
|
UtilCreateJsonParser,
|
|
UtilCleanupJsonParser,
|
|
UtilGetJsonValueAsString,
|
|
UtilGetJsonValueAsUlong,
|
|
UtilGetJsonObjectBool,
|
|
UtilCreateJsonObject,
|
|
UtilGetJsonObject,
|
|
UtilGetJsonObjectLength,
|
|
UtilJsonAddObject,
|
|
UtilCreateJsonArray,
|
|
UtilAddJsonArray,
|
|
UtilGetJsonArrayString,
|
|
UtilGetJsonArrayUlong,
|
|
UtilGetArrayLength,
|
|
UtilGetObjectArrayIndex,
|
|
UtilGetObjectArrayList
|
|
};
|
|
|
|
LOGICAL DllMain(
|
|
_In_ HINSTANCE Instance,
|
|
_In_ ULONG Reason,
|
|
_Reserved_ PVOID Reserved
|
|
)
|
|
{
|
|
switch (Reason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
PPH_PLUGIN_INFORMATION info;
|
|
|
|
PluginInstance = PhRegisterPlugin(PLUGIN_NAME, Instance, &info);
|
|
|
|
if (!PluginInstance)
|
|
return FALSE;
|
|
|
|
info->DisplayName = L"Common Plugin Extensions";
|
|
info->Author = L"dmex";
|
|
info->Description = L"Common Plugin Extensions";
|
|
info->HasOptions = FALSE;
|
|
info->Interface = &PluginInterface;
|
|
}
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|