Quantcast
Channel: Network Access Protection forum
Viewing all articles
Browse latest Browse all 1875

NPS extension DLL problem

$
0
0
Hi. I'm trying to write my own NPS extension DLL on MS VS Ultimate 2010 32bit

This is the code of the DLL:

#include <Windows.h>
#include <Authif.h>

#define DLLEXPORT extern "C" __declspec(dllexport)

DLLEXPORT DWORD WINAPI RadiusExtensionProcess2(__in const RADIUS_ATTRIBUTE *pAttrs,__out PRADIUS_ACTION pfAction)
{
return NO_ERROR;
}
DLLEXPORT DWORD WINAPI RadiusExtensionInit(void)
{
return NO_ERROR;
}

bool APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}



But, when NPS is trying to load this library(I've set the path to the dll in the registry), there is an error: "Extension host failed to load extension DLL. Path: C:\New\extention.dll. Error: 0x1c"



As I've understood, library must have been loaded, due to it's simplicity, and rule-export "RadiusExtensionProcess2" function. But there is an error, and NPS can not be started. NPS is running on win server 08 R2 64bit.
When we use 32bit dll, we have 0xc1 error.(not valid win32 application)
When we use 64bit dll, we have 0x7e error.(The specified module could not be found)

Would you show me the simplest DLL code, which NPS is able to load without any error
or tell us which module to use?

THx.
Reply With Quote

Viewing all articles
Browse latest Browse all 1875

Trending Articles