Commits

Abner  committed 78147f3

adicionado novos todos, removido alguns arquivos inuteis so do window da pasta clibs

  • Participants
  • Parent commits 2cf4a21

Comments (0)

Files changed (11)

File pol-core/clib/MSG00001.bin

Binary file removed.

File pol-core/clib/NTServMsg.mc

-
-MessageId=100
-SymbolicName=EVMSG_INSTALLED
-Language=English
-The %1 service was installed.
-.
-
-MessageId=
-SymbolicName=EVMSG_REMOVED
-Language=English
-The %1 service was removed.
-.
-
-MessageId=
-SymbolicName=EVMSG_NOTREMOVED
-Language=English
-The %1 service could not be removed.
-.
-
-MessageId=
-SymbolicName=EVMSG_CTRLHANDLERNOTINSTALLED
-Language=English
-The control handler could not be installed.
-.
-
-MessageId=
-SymbolicName=EVMSG_FAILEDINIT
-Language=English
-The initialization process failed.
-.
-
-MessageId=
-SymbolicName=EVMSG_STARTED
-Language=English
-The service was started.
-.
-
-MessageId=
-SymbolicName=EVMSG_BADREQUEST
-Language=English
-The service received an unsupported request.
-.
-
-MessageId=
-SymbolicName=EVMSG_DEBUG
-Language=English
-Debug: %1
-.
-
-MessageId=
-SymbolicName=EVMSG_STOPPED
-Language=English
-The service was stopped.
-.
-

File pol-core/clib/NTServMsg.rc

-LANGUAGE 0x9,0x1
-1 11 MSG00001.bin

File pol-core/clib/NTService.cpp

-/*
-History
-=======
-
-Notes
-=======
-Implementation of CNTService
-
-*/
-
-#include <windows.h>
-#include <stdio.h>
-#include "NTService.h"
-
-#ifdef _MSC_VER
-#pragma warning( disable: 4996 )
-#endif
-
-// Custom Controls Below Here
-#define SERVICE_CONTROL_BEEP                   0x000004B0
-#define SERVICE_CONTROL_STOP_POL               0x000004B1
-
-// static variables
-CNTService* CNTService::m_pThis = NULL;
-
-CNTService::CNTService(const char* szServiceName)
-{
-    // copy the address of the current object so we can access it from
-    // the static member callback functions. 
-    // WARNING: This limits the application to only one CNTService object. 
-    m_pThis = this;
-    
-    // Set the default service name and version
-    strncpy(m_szServiceName, szServiceName, sizeof(m_szServiceName)-1);
-    m_iMajorVersion = 1;
-    m_iMinorVersion = 0;
-    m_hEventSource = NULL;
-
-    // set up the initial service status 
-    m_hServiceStatus = NULL;
-    m_Status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
-    m_Status.dwCurrentState = SERVICE_STOPPED;
-    m_Status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
-    m_Status.dwWin32ExitCode = 0;
-    m_Status.dwServiceSpecificExitCode = 0;
-    m_Status.dwCheckPoint = 0;
-    m_Status.dwWaitHint = 0;
-    m_bIsRunning = FALSE;
-}
-
-CNTService::~CNTService()
-{
-    DebugMsg("CNTService::~CNTService()");
-    if (m_hEventSource) {
-        ::DeregisterEventSource(m_hEventSource);
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// Default command line argument parsing
-
-// Returns TRUE if it found an arg it recognised, FALSE if not
-// Note: processing some arguments causes output to stdout to be generated.
-BOOL CNTService::ParseStandardArgs(int argc, char* argv[])
-{
-    // See if we have any command line args we recognise
-    if (argc <= 1) return FALSE;
-
-    if (_stricmp(argv[1], "-v") == 0) {
-
-        // Spit out version info
-        printf("%s Version %d.%d\n",
-               m_szServiceName, m_iMajorVersion, m_iMinorVersion);
-        printf("The service is %s installed\n",
-               IsInstalled() ? "currently" : "not");
-        return TRUE; // say we processed the argument
-
-    } else if (_stricmp(argv[1], "-i") == 0) {
-
-        // Request to install.
-        if (IsInstalled()) {
-            printf("%s is already installed\n", m_szServiceName);
-        } else {
-            // Try and install the copy that's running
-            if (Install()) {
-                printf("%s installed\n", m_szServiceName);
-            } else {
-                printf("%s failed to install. Error %u\n", m_szServiceName, GetLastError());
-            }
-        }
-        return TRUE; // say we processed the argument
-
-    } else if (_stricmp(argv[1], "-u") == 0) {
-
-        // Request to uninstall.
-        if (!IsInstalled()) {
-            printf("%s is not installed\n", m_szServiceName);
-        } else {
-            // Try and remove the copy that's installed
-            if (Uninstall()) {
-                // Get the executable file path
-                char szFilePath[_MAX_PATH];
-                ::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath));
-                printf("%s removed. (You must delete the file (%s) yourself.)\n",
-                       m_szServiceName, szFilePath);
-            } else {
-                printf("Could not remove %s. Error %u\n", m_szServiceName, GetLastError());
-            }
-        }
-        return TRUE; // say we processed the argument
-    } else if (_stricmp( argv[1], "-s" ) == 0) {
-        // run as a service
-        printf( "Running as a service.\n" );
-        
-        if (!StartService())
-        {
-            printf( "Unable to run as a service.\n" );
-        }
-
-        return TRUE;
-    }
-
-         
-    // Don't recognise the args
-    return FALSE;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// Install/uninstall routines
-
-// Test if the service is currently installed
-BOOL CNTService::IsInstalled()
-{
-    BOOL bResult = FALSE;
-
-    // Open the Service Control Manager
-    SC_HANDLE hSCM = ::OpenSCManager(NULL, // local machine
-                                     NULL, // ServicesActive database
-                                     SC_MANAGER_ALL_ACCESS); // full access
-    if (hSCM) {
-
-        // Try to open the service
-        SC_HANDLE hService = ::OpenService(hSCM,
-                                           m_szServiceName,
-                                           SERVICE_QUERY_CONFIG);
-        if (hService) {
-            bResult = TRUE;
-            ::CloseServiceHandle(hService);
-        }
-
-        ::CloseServiceHandle(hSCM);
-    }
-    
-    return bResult;
-}
-
-BOOL CNTService::Install()
-{
-    // Open the Service Control Manager
-    SC_HANDLE hSCM = ::OpenSCManager(NULL, // local machine
-                                     NULL, // ServicesActive database
-                                     SC_MANAGER_ALL_ACCESS); // full access
-    if (!hSCM) return FALSE;
-
-    // Get the executable file path
-    char szFilePath[_MAX_PATH];
-    ::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath));
-    strcat( szFilePath, " -s" );
-
-    // Create the service
-    SC_HANDLE hService = ::CreateService(hSCM,
-                                         m_szServiceName,
-                                         m_szServiceName,
-                                         SERVICE_ALL_ACCESS,
-                                         SERVICE_WIN32_OWN_PROCESS|SERVICE_INTERACTIVE_PROCESS,
-                                         SERVICE_DEMAND_START,        // start condition
-                                         SERVICE_ERROR_NORMAL,
-                                         szFilePath,
-                                         NULL,
-                                         NULL,
-                                         NULL,
-                                         NULL,
-                                         NULL);
-    if (!hService) {
-        ::CloseServiceHandle(hSCM);
-        return FALSE;
-    }
-
-    // make registry entries to support logging messages
-    // Add the source name as a subkey under the Application
-    // key in the EventLog service portion of the registry.
-    char szKey[256];
-    HKEY hKey = NULL;
-    strcpy(szKey, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
-    strcat(szKey, m_szServiceName);
-    if (::RegCreateKey(HKEY_LOCAL_MACHINE, szKey, &hKey) != ERROR_SUCCESS) {
-        ::CloseServiceHandle(hService);
-        ::CloseServiceHandle(hSCM);
-        return FALSE;
-    }
-
-    // Add the Event ID message-file name to the 'EventMessageFile' subkey.
-    ::RegSetValueEx(hKey,
-                    "EventMessageFile",
-                    0,
-                    REG_EXPAND_SZ, 
-                    (CONST BYTE*)szFilePath,
-                    static_cast<DWORD>(strlen(szFilePath) + 1));     
-
-    // Set the supported types flags.
-    DWORD dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE;
-    ::RegSetValueEx(hKey,
-                    "TypesSupported",
-                    0,
-                    REG_DWORD,
-                    (CONST BYTE*)&dwData,
-                     sizeof(DWORD));
-    ::RegCloseKey(hKey);
-
-    LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_INSTALLED, m_szServiceName);
-
-    // tidy up
-    ::CloseServiceHandle(hService);
-    ::CloseServiceHandle(hSCM);
-    return TRUE;
-}
-
-BOOL CNTService::Uninstall()
-{
-    // Open the Service Control Manager
-    SC_HANDLE hSCM = ::OpenSCManager(NULL, // local machine
-                                     NULL, // ServicesActive database
-                                     SC_MANAGER_ALL_ACCESS); // full access
-    if (!hSCM) return FALSE;
-
-    BOOL bResult = FALSE;
-    SC_HANDLE hService = ::OpenService(hSCM,
-                                       m_szServiceName,
-                                       DELETE);
-    if (hService) {
-        if (::DeleteService(hService)) {
-            LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_REMOVED, m_szServiceName);
-            bResult = TRUE;
-        } else {
-            LogEvent(EVENTLOG_ERROR_TYPE, EVMSG_NOTREMOVED, m_szServiceName);
-        }
-        ::CloseServiceHandle(hService);
-    }
-    
-    ::CloseServiceHandle(hSCM);
-    return bResult;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-// Logging functions
-
-// This function makes an entry into the application event log
-void CNTService::LogEvent(WORD wType, DWORD dwID,
-                          const char* pszS1,
-                          const char* pszS2,
-                          const char* pszS3)
-{
-    const char* ps[3];
-    ps[0] = pszS1;
-    ps[1] = pszS2;
-    ps[2] = pszS3;
-
-    int iStr = 0;
-    for (int i = 0; i < 3; i++) {
-        if (ps[i] != NULL) iStr++;
-    }
-        
-    // Check the event source has been registered and if
-    // not then register it now
-    if (!m_hEventSource) {
-        m_hEventSource = ::RegisterEventSource(NULL,  // local machine
-                                               m_szServiceName); // source name
-    }
-
-    if (m_hEventSource) {
-        ::ReportEvent(m_hEventSource,
-                      wType,
-                      0,
-                      dwID,
-                      NULL, // sid
-                      iStr,
-                      0,
-                      ps,
-                      NULL);
-    }
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-// Service startup and registration
-
-BOOL CNTService::StartService()
-{
-    SERVICE_TABLE_ENTRY st[] = {
-        {m_szServiceName, ServiceMain},
-        {NULL, NULL}
-    };
-
-    DebugMsg("Calling StartServiceCtrlDispatcher()");
-    BOOL b = ::StartServiceCtrlDispatcher(st);
-    if (!b)
-    {
-        DWORD rc = GetLastError();
-        DebugMsg( "StartServiceCtrlDispatcher returned false: %d", rc );
-
-    }
-    DebugMsg("Returned from StartServiceCtrlDispatcher()");
-    return b;
-}
-
-// static member function (callback)
-void CNTService::ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)
-{
-    // Get a pointer to the C++ object
-    CNTService* pService = m_pThis;
-    
-    pService->DebugMsg("Entering CNTService::ServiceMain()");
-    // Register the control request handler
-    pService->m_Status.dwCurrentState = SERVICE_START_PENDING;
-    pService->m_hServiceStatus = RegisterServiceCtrlHandler(pService->m_szServiceName,
-                                                           Handler);
-    if (pService->m_hServiceStatus == NULL) {
-        pService->LogEvent(EVENTLOG_ERROR_TYPE, EVMSG_CTRLHANDLERNOTINSTALLED);
-        return;
-    }
-
-    // Start the initialisation
-    if (pService->Initialize()) {
-
-        // Do the real work. 
-        // When the Run function returns, the service has stopped.
-        pService->m_bIsRunning = TRUE;
-        pService->m_Status.dwWin32ExitCode = 0;
-        pService->m_Status.dwCheckPoint = 0;
-        pService->m_Status.dwWaitHint = 0;
-        pService->Run();
-    }
-
-    // Tell the service manager we are stopped
-    pService->SetStatus(SERVICE_STOPPED);
-
-    pService->DebugMsg("Leaving CNTService::ServiceMain()");
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////
-// status functions
-
-void CNTService::SetStatus(DWORD dwState)
-{
-    DebugMsg("CNTService::SetStatus(%lu, %lu)", m_hServiceStatus, dwState);
-    m_Status.dwCurrentState = dwState;
-    ::SetServiceStatus(m_hServiceStatus, &m_Status);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////
-// Service initialization
-
-BOOL CNTService::Initialize()
-{
-    DebugMsg("Entering CNTService::Initialize()");
-
-    // Start the initialization
-    SetStatus(SERVICE_START_PENDING);
-    
-    // Perform the actual initialization
-    BOOL bResult = OnInit(); 
-    
-    // Set final state
-    m_Status.dwWin32ExitCode = GetLastError();
-    m_Status.dwCheckPoint = 0;
-    m_Status.dwWaitHint = 0;
-    if (!bResult) {
-        LogEvent(EVENTLOG_ERROR_TYPE, EVMSG_FAILEDINIT);
-        SetStatus(SERVICE_STOPPED);
-        return FALSE;    
-    }
-    
-    LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_STARTED);
-    SetStatus(SERVICE_RUNNING);
-
-    DebugMsg("Leaving CNTService::Initialize()");
-    return TRUE;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// main function to do the real work of the service
-
-// This function performs the main work of the service. 
-// When this function returns the service has stopped.
-void CNTService::Run()
-{
-    DebugMsg("Entering CNTService::Run()");
-
-    while (m_bIsRunning) {
-        DebugMsg("Sleeping...");
-        Sleep(5000);
-    }
-
-    // nothing more to do
-    DebugMsg("Leaving CNTService::Run()");
-}
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Control request handlers
-
-// static member function (callback) to handle commands from the
-// service control manager
-void CNTService::Handler(DWORD dwOpcode)
-{
-    // Get a pointer to the object
-    CNTService* pService = m_pThis;
-    
-    pService->DebugMsg("CNTService::Handler(%lu)", dwOpcode);
-    switch (dwOpcode) {
-    case SERVICE_CONTROL_STOP: // 1
-        pService->SetStatus(SERVICE_STOP_PENDING);
-        pService->OnStop();
-        pService->m_bIsRunning = FALSE;
-        pService->LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_STOPPED);
-        break;
-
-    case SERVICE_CONTROL_PAUSE: // 2
-        pService->OnPause();
-        break;
-
-    case SERVICE_CONTROL_CONTINUE: // 3
-        pService->OnContinue();
-        break;
-
-    case SERVICE_CONTROL_INTERROGATE: // 4
-        pService->OnInterrogate();
-        break;
-
-    case SERVICE_CONTROL_SHUTDOWN: // 5
-        pService->OnShutdown();
-        break;
-
-    default:
-        if (dwOpcode >= SERVICE_CONTROL_USER) {
-            if (!pService->OnUserControl(dwOpcode)) {
-                pService->LogEvent(EVENTLOG_ERROR_TYPE, EVMSG_BADREQUEST);
-            }
-        } else {
-            pService->LogEvent(EVENTLOG_ERROR_TYPE, EVMSG_BADREQUEST);
-        }
-        break;
-    }
-
-    // Report current status
-    pService->DebugMsg("Updating status (%lu, %lu)",
-                       pService->m_hServiceStatus,
-                       pService->m_Status.dwCurrentState);
-    ::SetServiceStatus(pService->m_hServiceStatus, &pService->m_Status);
-}
-        
-// Called when the service is first initialized
-BOOL CNTService::OnInit()
-{
-    DebugMsg("CNTService::OnInit()");
-	return TRUE;
-}
-
-// Called when the service control manager wants to stop the service
-void CNTService::OnStop()
-{
-    DebugMsg("CNTService::OnStop()");
-}
-
-// called when the service is interrogated
-void CNTService::OnInterrogate()
-{
-    DebugMsg("CNTService::OnInterrogate()");
-}
-
-// called when the service is paused
-void CNTService::OnPause()
-{
-    DebugMsg("CNTService::OnPause()");
-}
-
-// called when the service is continued
-void CNTService::OnContinue()
-{
-    DebugMsg("CNTService::OnContinue()");
-}
-
-// called when the service is shut down
-void CNTService::OnShutdown()
-{
-    DebugMsg("CNTService::OnShutdown()");
-}
-
-// called when the service gets a user control message
-BOOL CNTService::OnUserControl(DWORD dwOpcode)
-{
-    CNTService* pService = m_pThis;
-
-	switch (dwOpcode) {
-	    case SERVICE_CONTROL_BEEP: // 1200
-		    Beep(1200,200);
-			break;
-	    case SERVICE_CONTROL_STOP_POL: // 1201
-			pService->SetStatus(SERVICE_STOP_PENDING);
-		    pService->OnStop();
-			pService->m_bIsRunning = FALSE;
-	        pService->LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_STOPPED);
-			break;
-		default:
-		    DebugMsg("CNTService::OnUserControl(%8.8lXH)", dwOpcode);
-			return FALSE; // say not handled
-			break;
-    }
-
-    // if it makes it this far, something's wrong anyway.
-	// left in for contrivance
-	DebugMsg("CNTService::OnUserControl(%8.8lXH)", dwOpcode);
-    return FALSE; // say not handled
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// Debugging support
-
-void CNTService::DebugMsg(const char* pszFormat, ...)
-{
-    char buf[1024];
-    sprintf(buf, "[%s](%lu): ", m_szServiceName, GetCurrentThreadId());
-	va_list arglist;
-	va_start(arglist, pszFormat);
-    vsprintf(&buf[strlen(buf)], pszFormat, arglist);
-	va_end(arglist);
-    strcat(buf, "\n");
-    OutputDebugString(buf);
-}

File pol-core/clib/NTService.h

-/*
-History
-=======
-
-Notes
-=======
-Definitions for CNTService
-
-*/
-
-#ifndef _NTSERVICE_H_
-#define _NTSERVICE_H_
-
-#include "ntservmsg.h" // Event message ids
-
-#define SERVICE_CONTROL_USER 128
-
-class CNTService
-{
-public:
-    CNTService(const char* szServiceName);
-    virtual ~CNTService();
-    BOOL ParseStandardArgs(int argc, char* argv[]);
-    BOOL IsInstalled();
-    BOOL Install();
-    BOOL Uninstall();
-    void LogEvent(WORD wType, DWORD dwID,
-                  const char* pszS1 = NULL,
-                  const char* pszS2 = NULL,
-                  const char* pszS3 = NULL);
-    BOOL StartService();
-    void SetStatus(DWORD dwState);
-    BOOL Initialize();
-    virtual void Run();
-	virtual BOOL OnInit();
-    virtual void OnStop();
-    virtual void OnInterrogate();
-    virtual void OnPause();
-    virtual void OnContinue();
-    virtual void OnShutdown();
-    virtual BOOL OnUserControl(DWORD dwOpcode);
-    void DebugMsg(const char* pszFormat, ...);
-    
-    // static member functions
-    static void WINAPI ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
-    static void WINAPI Handler(DWORD dwOpcode);
-
-    // data members
-    char m_szServiceName[64];
-    int m_iMajorVersion;
-    int m_iMinorVersion;
-    SERVICE_STATUS_HANDLE m_hServiceStatus;
-    SERVICE_STATUS m_Status;
-    BOOL m_bIsRunning;
-
-    // static data
-    static CNTService* m_pThis; // nasty hack to get object ptr
-
-private:
-    HANDLE m_hEventSource;
-
-};
-
-#endif // _NTSERVICE_H_

File pol-core/clib/msjexhnd.cpp

-/*
-History
-=======
-
-Notes
-=======
-
-*/
-
-//==========================================
-// Matt Pietrek
-// Microsoft Systems Journal, May 1997
-// FILE: MSJEXHND.CPP
-//==========================================
-#include <windows.h>
-#include <tchar.h>
-#include <imagehlp.h>
-#include "msjexhnd.h"
-#include <algorithm>
-#include "logfile.h"
-//============================== Global Variables =============================
-
-//
-// Declare the static variables of the MSJExceptionHandler class
-//
-TCHAR MSJExceptionHandler::m_szLogFileName[MAX_PATH];
-LPTOP_LEVEL_EXCEPTION_FILTER MSJExceptionHandler::m_previousFilter;
-HANDLE MSJExceptionHandler::m_hReportFile;
-
-MSJExceptionHandler::SYMINITIALIZEPROC MSJExceptionHandler::_SymInitialize = 0;
-MSJExceptionHandler::SYMCLEANUPPROC MSJExceptionHandler::_SymCleanup = 0;
-MSJExceptionHandler::STACKWALKPROC MSJExceptionHandler::_StackWalk = 0;
-
-MSJExceptionHandler::SYMFUNCTIONTABLEACCESSPROC
-                                MSJExceptionHandler::_SymFunctionTableAccess = 0;
-
-MSJExceptionHandler::SYMGETMODULEBASEPROC
-                                      MSJExceptionHandler::_SymGetModuleBase = 0;
-
-MSJExceptionHandler::SYMGETSYMFROMADDRPROC
-                                     MSJExceptionHandler::_SymGetSymFromAddr = 0;
-
-MSJExceptionHandler g_MSJExceptionHandler;  // Declare global instance of class
-
-//============================== Class Methods =============================
-
-//=============
-// Constructor 
-//=============
-MSJExceptionHandler::MSJExceptionHandler( )
-{
-    // Install the unhandled exception filter function
-    
-    // m_previousFilter = SetUnhandledExceptionFilter(MSJUnhandledExceptionFilter);
-
-    // Figure out what the report file will be named, and store it away
-    GetModuleFileName( 0, m_szLogFileName, MAX_PATH );
-
-    // Look for the '.' before the "EXE" extension.  Replace the extension
-    // with "RPT"
-    PTSTR pszDot = _tcsrchr( m_szLogFileName, _T('.') );
-    if ( pszDot )
-    {
-        pszDot++;   // Advance past the '.'
-        if ( _tcslen(pszDot) >= 3 )
-            _tcscpy( pszDot, _T("RPT") );   // "RPT" -> "Report"
-    }
-}
-
-//============
-// Destructor 
-//============
-MSJExceptionHandler::~MSJExceptionHandler( )
-{
-    // SetUnhandledExceptionFilter( m_previousFilter );
-}
-
-//==============================================================
-// Lets user change the name of the report file to be generated 
-//==============================================================
-void MSJExceptionHandler::SetLogFileName( PTSTR pszLogFileName )
-{
-    _tcscpy( m_szLogFileName, pszLogFileName );
-}
-
-//===========================================================
-// Entry point where control comes on an unhandled exception 
-//===========================================================
-LONG WINAPI MSJExceptionHandler::MSJUnhandledExceptionFilter(
-                                             PEXCEPTION_POINTERS pExceptionInfo )
-{
-    m_hReportFile = CreateFile( m_szLogFileName,
-                                GENERIC_WRITE,
-                                0,
-                                0,
-                                OPEN_ALWAYS,
-                                FILE_FLAG_WRITE_THROUGH,
-                                0 );
-
-    if ( m_hReportFile )
-    {
-        SetFilePointer( m_hReportFile, 0, 0, FILE_END );
-
-        GenerateExceptionReport( pExceptionInfo );
-
-        CloseHandle( m_hReportFile );
-        m_hReportFile = 0;
-    }
-
-    if ( m_previousFilter )
-        return m_previousFilter( pExceptionInfo );
-    else
-        return EXCEPTION_CONTINUE_SEARCH;
-}
-
-//===========================================================================
-// Open the report file, and write the desired information to it.  Called by 
-// MSJUnhandledExceptionFilter                                               
-//===========================================================================
-void MSJExceptionHandler::GenerateExceptionReport(
-    PEXCEPTION_POINTERS pExceptionInfo )
-{
-    // Start out with a banner
-    _tprintf( _T("//=====================================================\n") );
-
-    PEXCEPTION_RECORD pExceptionRecord = pExceptionInfo->ExceptionRecord;
-
-    // First print information about the type of fault
-    _tprintf(   _T("Exception code: %08X %s\n"),
-                pExceptionRecord->ExceptionCode,
-                GetExceptionString(pExceptionRecord->ExceptionCode) );
-
-    // Now print information about where the fault occured
-    TCHAR szFaultingModule[MAX_PATH];
-    DWORD section, offset;
-    GetLogicalAddress(  pExceptionRecord->ExceptionAddress,
-                        szFaultingModule,
-                        sizeof( szFaultingModule ),
-                        section, offset );
-
-    _tprintf( _T("Fault address:  %08X %02X:%08X %s\n"),
-              pExceptionRecord->ExceptionAddress,
-              section, offset, szFaultingModule );
-
-    PCONTEXT pCtx = pExceptionInfo->ContextRecord;
-
-    // Show the registers
-    #ifdef _M_IX86  // Intel Only!
-    _tprintf( _T("\nRegisters:\n") );
-
-    _tprintf(_T("EAX:%08X\nEBX:%08X\nECX:%08X\nEDX:%08X\nESI:%08X\nEDI:%08X\n"),
-             pCtx->Eax, pCtx->Ebx, pCtx->Ecx, pCtx->Edx, pCtx->Esi, pCtx->Edi );
-
-    _tprintf( _T("CS:EIP:%04X:%08X\n"), pCtx->SegCs, pCtx->Eip );
-    _tprintf( _T("SS:ESP:%04X:%08X  EBP:%08X\n"),
-              pCtx->SegSs, pCtx->Esp, pCtx->Ebp );
-    _tprintf( _T("DS:%04X  ES:%04X  FS:%04X  GS:%04X\n"),
-              pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs );
-    _tprintf( _T("Flags:%08X\n"), pCtx->EFlags );
-
-    #endif
-
-    if ( !InitImagehlpFunctions() )
-    {
-        OutputDebugString(_T("IMAGEHLP.DLL or its exported procs not found"));
-        
-        #ifdef _M_IX86  // Intel Only!
-#ifndef _M_X64
-        // Walk the stack using x86 specific code
-        IntelStackWalk( pCtx );
-#endif
-        #endif
-
-        return;
-    }
-	#ifndef _M_X64
-    ImagehlpStackWalk( pCtx );
-	#endif
-
-    _SymCleanup( GetCurrentProcess() );
-
-    _tprintf( _T("\n") );
-}
-
-//======================================================================
-// Given an exception code, returns a pointer to a static string with a 
-// description of the exception                                         
-//======================================================================
-LPTSTR MSJExceptionHandler::GetExceptionString( DWORD dwCode )
-{
-    #define EXCEPTION( x ) case EXCEPTION_##x: return _T(#x);
-
-    switch ( dwCode )
-    {
-        EXCEPTION( ACCESS_VIOLATION )
-        EXCEPTION( DATATYPE_MISALIGNMENT )
-        EXCEPTION( BREAKPOINT )
-        EXCEPTION( SINGLE_STEP )
-        EXCEPTION( ARRAY_BOUNDS_EXCEEDED )
-        EXCEPTION( FLT_DENORMAL_OPERAND )
-        EXCEPTION( FLT_DIVIDE_BY_ZERO )
-        EXCEPTION( FLT_INEXACT_RESULT )
-        EXCEPTION( FLT_INVALID_OPERATION )
-        EXCEPTION( FLT_OVERFLOW )
-        EXCEPTION( FLT_STACK_CHECK )
-        EXCEPTION( FLT_UNDERFLOW )
-        EXCEPTION( INT_DIVIDE_BY_ZERO )
-        EXCEPTION( INT_OVERFLOW )
-        EXCEPTION( PRIV_INSTRUCTION )
-        EXCEPTION( IN_PAGE_ERROR )
-        EXCEPTION( ILLEGAL_INSTRUCTION )
-        EXCEPTION( NONCONTINUABLE_EXCEPTION )
-        EXCEPTION( STACK_OVERFLOW )
-        EXCEPTION( INVALID_DISPOSITION )
-        EXCEPTION( GUARD_PAGE )
-        EXCEPTION( INVALID_HANDLE )
-    }
-
-    // If not one of the "known" exceptions, try to get the string
-    // from NTDLL.DLL's message table.
-
-    static TCHAR szBuffer[512] = { 0 };
-
-    FormatMessage(  FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_HMODULE,
-                    GetModuleHandle( _T("NTDLL.DLL") ),
-                    dwCode, 0, szBuffer, sizeof( szBuffer ), 0 );
-
-    return szBuffer;
-}
-
-//==============================================================================
-// Given a linear address, locates the module, section, and offset containing  
-// that address.                                                               
-//                                                                             
-// Note: the szModule paramater buffer is an output buffer of length specified 
-// by the len parameter (in characters!)                                       
-//==============================================================================
-BOOL MSJExceptionHandler::GetLogicalAddress(
-        PVOID addr, PTSTR szModule, DWORD len, DWORD& section, DWORD& offset )
-{
-    MEMORY_BASIC_INFORMATION mbi;
-
-    if ( !VirtualQuery( addr, &mbi, sizeof(mbi) ) )
-        return FALSE;
-
-    DWORD hMod = (DWORD)mbi.AllocationBase;
-
-    if ( !GetModuleFileName( (HMODULE)hMod, szModule, len ) )
-        return FALSE;
-
-    // Point to the DOS header in memory
-    PIMAGE_DOS_HEADER pDosHdr = (PIMAGE_DOS_HEADER)hMod;
-
-    // From the DOS header, find the NT (PE) header
-    PIMAGE_NT_HEADERS pNtHdr = (PIMAGE_NT_HEADERS)(hMod + pDosHdr->e_lfanew);
-
-    PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION( pNtHdr );
-
-    DWORD rva = (DWORD)addr - hMod; // RVA is offset from module load address
-
-    // Iterate through the section table, looking for the one that encompasses
-    // the linear address.
-    for (   unsigned i = 0;
-            i < pNtHdr->FileHeader.NumberOfSections;
-            i++, pSection++ )
-    {
-        DWORD sectionStart = pSection->VirtualAddress;
-        DWORD sectionEnd = sectionStart
-            + std::max(pSection->SizeOfRawData, pSection->Misc.VirtualSize);
-
-        // Is the address in this section???
-        if ( (rva >= sectionStart) && (rva <= sectionEnd) )
-        {
-            // Yes, address is in the section.  Calculate section and offset,
-            // and store in the "section" & "offset" params, which were
-            // passed by reference.
-            section = i+1;
-            offset = rva - sectionStart;
-            return TRUE;
-        }
-    }
-
-    return FALSE;   // Should never get here!
-}
-
-//============================================================
-// Walks the stack, and writes the results to the report file 
-//============================================================
-#ifndef _M_X64
-void MSJExceptionHandler::IntelStackWalk( PCONTEXT pContext )
-{
-    _tprintf( _T("\nCall stack:\n") );
-
-    _tprintf( _T("Address   Frame     Logical addr  Module\n") );
-
-    DWORD pc = pContext->Eip;
-    PDWORD pFrame, pPrevFrame;
-    
-    pFrame = (PDWORD)pContext->Ebp;
-
-    do
-    {
-        TCHAR szModule[MAX_PATH] = _T("");
-        DWORD section = 0, offset = 0;
-
-        GetLogicalAddress((PVOID)pc, szModule,sizeof(szModule),section,offset );
-
-        _tprintf( _T("%08X  %08X  %04X:%08X %s\n"),
-                  pc, pFrame, section, offset, szModule );
-
-        pc = pFrame[1];
-
-        pPrevFrame = pFrame;
-
-        pFrame = (PDWORD)pFrame[0]; // proceed to next higher frame on stack
-
-        if ( (DWORD)pFrame & 3 )    // Frame pointer must be aligned on a
-            break;                  // DWORD boundary.  Bail if not so.
-
-        if ( pFrame <= pPrevFrame )
-            break;
-
-        // Can two DWORDs be read from the supposed frame address?          
-        if ( IsBadWritePtr(pFrame, sizeof(PVOID)*2) )
-            break;
-
-    } while ( 1 );
-}
-#endif
-
-//============================================================
-// Walks the stack, and writes the results to the report file 
-//============================================================
-#ifndef _M_X64
-void MSJExceptionHandler::ImagehlpStackWalk( PCONTEXT pContext )
-{
-    _tprintf( _T("\nCall stack:\n") );
-
-    _tprintf( _T("Address   Frame\n") );
-
-    // Could use SymSetOptions here to add the SYMOPT_DEFERRED_LOADS flag
-
-    STACKFRAME sf;
-    memset( &sf, 0, sizeof(sf) );
-
-    // Initialize the STACKFRAME structure for the first call.  This is only
-    // necessary for Intel CPUs, and isn't mentioned in the documentation.
-    sf.AddrPC.Offset       = pContext->Eip;
-    sf.AddrPC.Mode         = AddrModeFlat;
-    sf.AddrStack.Offset    = pContext->Esp;
-    sf.AddrStack.Mode      = AddrModeFlat;
-    sf.AddrFrame.Offset    = pContext->Ebp;
-    sf.AddrFrame.Mode      = AddrModeFlat;
-
-    while ( 1 )
-    {
-        if ( ! _StackWalk(  IMAGE_FILE_MACHINE_I386,
-                            GetCurrentProcess(),
-                            GetCurrentThread(),
-                            &sf,
-                            pContext,
-                            0,
-                            _SymFunctionTableAccess,
-                            _SymGetModuleBase,
-                            0 ) )
-            break;
-
-        if ( 0 == sf.AddrFrame.Offset ) // Basic sanity check to make sure
-            break;                      // the frame is OK.  Bail if not.
-
-        _tprintf( _T("%08X  %08X  "), sf.AddrPC.Offset, sf.AddrFrame.Offset );
-
-        // IMAGEHLP is wacky, and requires you to pass in a pointer to an
-        // IMAGEHLP_SYMBOL structure.  The problem is that this structure is
-        // variable length.  That is, you determine how big the structure is
-        // at runtime.  This means that you can't use sizeof(struct).
-        // So...make a buffer that's big enough, and make a pointer
-        // to the buffer.  We also need to initialize not one, but TWO
-        // members of the structure before it can be used.
-
-        BYTE symbolBuffer[ sizeof(IMAGEHLP_SYMBOL) + 512 ];
-        PIMAGEHLP_SYMBOL pSymbol = (PIMAGEHLP_SYMBOL)symbolBuffer;
-        pSymbol->SizeOfStruct = sizeof(symbolBuffer);
-        pSymbol->MaxNameLength = 512;
-                        
-        DWORD symDisplacement = 0;  // Displacement of the input address,
-                                    // relative to the start of the symbol
-
-        if ( _SymGetSymFromAddr(GetCurrentProcess(), sf.AddrPC.Offset,
-                                &symDisplacement, pSymbol) )
-        {
-            _tprintf( _T("%hs+%X\n"), pSymbol->Name, symDisplacement );
-            
-        }
-        else    // No symbol found.  Print out the logical address instead.
-        {
-            TCHAR szModule[MAX_PATH] = _T("");
-            DWORD section = 0, offset = 0;
-
-            GetLogicalAddress(  (PVOID)sf.AddrPC.Offset,
-                                szModule, sizeof(szModule), section, offset );
-
-            _tprintf( _T("%04X:%08X %s\n"),
-                      section, offset, szModule );
-        }
-    }
-
-}
-#endif
-
-//============================================================================
-// Helper function that writes to the report file, and allows the user to use 
-// printf style formating                                                     
-//============================================================================
-int __cdecl MSJExceptionHandler::_tprintf(const TCHAR * format, ...)
-{
-    TCHAR szBuff[1024];
-    int retValue;
-    // DWORD cbWritten;
-    va_list argptr;
-          
-    va_start( argptr, format );
-    retValue = wvsprintf( szBuff, format, argptr );
-    va_end( argptr );
-
-//    WriteFile( m_hReportFile, szBuff, retValue * sizeof(TCHAR), &cbWritten, 0 );
-    Log( "%s", szBuff );
-    fwrite( szBuff, 1, strlen(szBuff), stdout );
-
-    return retValue;
-}
-
-
-//=========================================================================
-// Load IMAGEHLP.DLL and get the address of functions in it that we'll use 
-//=========================================================================
-BOOL MSJExceptionHandler::InitImagehlpFunctions( void )
-{
-    HMODULE hModImagehlp = LoadLibrary( _T("IMAGEHLP.DLL") );
-    if ( !hModImagehlp )
-        return FALSE;
-
-    _SymInitialize = (SYMINITIALIZEPROC)GetProcAddress( hModImagehlp,
-                                                        "SymInitialize" );
-    if ( !_SymInitialize )
-        return FALSE;
-
-    _SymCleanup = (SYMCLEANUPPROC)GetProcAddress( hModImagehlp, "SymCleanup" );
-    if ( !_SymCleanup )
-        return FALSE;
-
-    _StackWalk = (STACKWALKPROC)GetProcAddress( hModImagehlp, "StackWalk" );
-    if ( !_StackWalk )
-        return FALSE;
-
-    _SymFunctionTableAccess = (SYMFUNCTIONTABLEACCESSPROC)
-                        GetProcAddress( hModImagehlp, "SymFunctionTableAccess" );
-
-    if ( !_SymFunctionTableAccess )
-        return FALSE;
-
-    _SymGetModuleBase=(SYMGETMODULEBASEPROC)GetProcAddress( hModImagehlp,
-                                                            "SymGetModuleBase");
-    if ( !_SymGetModuleBase )
-        return FALSE;
-
-    _SymGetSymFromAddr=(SYMGETSYMFROMADDRPROC)GetProcAddress( hModImagehlp,
-                                                              "SymGetSymFromAddr" );
-    if ( !_SymGetSymFromAddr )
-        return FALSE;
-
-    if ( !_SymInitialize( GetCurrentProcess(), 0, TRUE ) )
-        return FALSE;
-
-    return TRUE;        
-}

File pol-core/clib/msjexhnd.h

-/*
-History
-=======
-
-Notes
-=======
-
-*/
-
-#ifndef __MSJEXHND_H__
-#define __MSJEXHND_H__
-
-#include <windows.h>
-#include <imagehlp.h>
-
-class MSJExceptionHandler
-{
-public:
-      
-      MSJExceptionHandler( );
-      ~MSJExceptionHandler( );
-     
-      void SetLogFileName( PTSTR pszLogFileName );
-
-      // where report info is extracted and generated    
-      static void GenerateExceptionReport( PEXCEPTION_POINTERS pExceptionInfo );
-      // entry point where control comes on an unhandled exception
-      static LONG WINAPI MSJUnhandledExceptionFilter(
-                                           PEXCEPTION_POINTERS pExceptionInfo );
-
-private:
-
-
-
-      // Helper functions
-      static LPTSTR GetExceptionString( DWORD dwCode );
-      static BOOL GetLogicalAddress(PVOID addr, PTSTR szModule, DWORD len,
-                                    DWORD& section, DWORD& offset );
-#ifndef _M_X64
-      static void IntelStackWalk( PCONTEXT pContext );
-#endif
-#ifndef _M_X64
-      static void ImagehlpStackWalk( PCONTEXT pContext );
-#endif
-      static int __cdecl _tprintf(const TCHAR * format, ...);
-
-#if 1
-      static BOOL InitImagehlpFunctions( void );
-#endif
-          
-      // Variables used by the class
-      static TCHAR m_szLogFileName[MAX_PATH];
-      static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter;
-      static HANDLE m_hReportFile;
-
-#if 1
-      // Make typedefs for some IMAGEHLP.DLL functions so that we can use them
-      // with GetProcAddress
-      typedef BOOL (__stdcall * SYMINITIALIZEPROC)( HANDLE, LPSTR, BOOL );
-      typedef BOOL (__stdcall *SYMCLEANUPPROC)( HANDLE );
-
-      typedef BOOL (__stdcall * STACKWALKPROC)
-                   ( DWORD, HANDLE, HANDLE, LPSTACKFRAME, LPVOID,
-                    PREAD_PROCESS_MEMORY_ROUTINE,PFUNCTION_TABLE_ACCESS_ROUTINE,
-                    PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE );
-
-      typedef LPVOID (__stdcall *SYMFUNCTIONTABLEACCESSPROC)( HANDLE, DWORD );
-
-      typedef DWORD (__stdcall *SYMGETMODULEBASEPROC)( HANDLE, DWORD );
-
-      typedef BOOL (__stdcall *SYMGETSYMFROMADDRPROC)
-                                    ( HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL );
-
-      static SYMINITIALIZEPROC _SymInitialize;
-      static SYMCLEANUPPROC _SymCleanup;
-      static STACKWALKPROC _StackWalk;
-      static SYMFUNCTIONTABLEACCESSPROC _SymFunctionTableAccess;
-      static SYMGETMODULEBASEPROC _SymGetModuleBase;
-      static SYMGETSYMFROMADDRPROC _SymGetSymFromAddr;
-
-#endif
-
-};
-
-extern MSJExceptionHandler g_MSJExceptionHandler;  // global instance of class
-
-#endif

File pol-core/clib/ntservmsg.h

-//
-//  Values are 32 bit values layed out as follows:
-//
-//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-//  +---+-+-+-----------------------+-------------------------------+
-//  |Sev|C|R|     Facility          |               Code            |
-//  +---+-+-+-----------------------+-------------------------------+
-//
-//  where
-//
-//      Sev - is the severity code
-//
-//          00 - Success
-//          01 - Informational
-//          10 - Warning
-//          11 - Error
-//
-//      C - is the Customer code flag
-//
-//      R - is a reserved bit
-//
-//      Facility - is the facility code
-//
-//      Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-
-//
-// Define the severity codes
-//
-
-
-//
-// MessageId: EVMSG_INSTALLED
-//
-// MessageText:
-//
-//  The %1 service was installed.
-//
-#define EVMSG_INSTALLED                  0x00000064L
-
-//
-// MessageId: EVMSG_REMOVED
-//
-// MessageText:
-//
-//  The %1 service was removed.
-//
-#define EVMSG_REMOVED                    0x00000065L
-
-//
-// MessageId: EVMSG_NOTREMOVED
-//
-// MessageText:
-//
-//  The %1 service could not be removed.
-//
-#define EVMSG_NOTREMOVED                 0x00000066L
-
-//
-// MessageId: EVMSG_CTRLHANDLERNOTINSTALLED
-//
-// MessageText:
-//
-//  The control handler could not be installed.
-//
-#define EVMSG_CTRLHANDLERNOTINSTALLED    0x00000067L
-
-//
-// MessageId: EVMSG_FAILEDINIT
-//
-// MessageText:
-//
-//  The initialization process failed.
-//
-#define EVMSG_FAILEDINIT                 0x00000068L
-
-//
-// MessageId: EVMSG_STARTED
-//
-// MessageText:
-//
-//  The service was started.
-//
-#define EVMSG_STARTED                    0x00000069L
-
-//
-// MessageId: EVMSG_BADREQUEST
-//
-// MessageText:
-//
-//  The service received an unsupported request.
-//
-#define EVMSG_BADREQUEST                 0x0000006AL
-
-//
-// MessageId: EVMSG_DEBUG
-//
-// MessageText:
-//
-//  Debug: %1
-//
-#define EVMSG_DEBUG                      0x0000006BL
-
-//
-// MessageId: EVMSG_STOPPED
-//
-// MessageText:
-//
-//  The service was stopped.
-//
-#define EVMSG_STOPPED                    0x0000006CL
-

File pol-core/clib/vld.h

-////////////////////////////////////////////////////////////////////////////////
-//
-//  Visual Leak Detector - Import Library Header
-//  Copyright (c) 2006 Dan Moulding
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License, or (at your option) any later version.
-//
-//  This library 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
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-//  See COPYING.txt for the full terms of the GNU Lesser General Public License.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#pragma once
-
-#ifdef _DEBUG
-
-#pragma comment(lib, "vld.lib")
-
-// Force a symbolic reference to the global VisualLeakDetector class object from
-// the DLL. This enusres that the DLL is loaded and linked with the program,
-// even if no code otherwise imports any of the DLL's exports.
-#pragma comment(linker, "/include:__imp_?vld@@3VVisualLeakDetector@@A")
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Visual Leak Detector APIs
-//
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-// VLDDisable - Disables Visual Leak Detector's memory leak detection at
-//   runtime. If memory leak detection is already disabled, then calling this
-//   function has no effect.
-//
-//  Note: In multithreaded programs, this function operates on a per-thread
-//    basis. In other words, if you call this function from one thread, then
-//    memory leak detection is only disabled for that thread. If memory leak
-//    detection is enabled for other threads, then it will remain enabled for
-//    those other threads. It was designed to work this way to insulate you,
-//    the programmer, from having to ensure thread synchronization when calling
-//    VLDEnable() and VLDDisable(). Without this, calling these two functions
-//    unsychronized could result in unpredictable and unintended behavior.
-//    But this also means that if you want to disable memory leak detection
-//    process-wide, then you need to call this function from every thread in
-//    the process.
-//
-//  Return Value:
-//
-//    None.
-//
-__declspec(dllimport) void VLDDisable ();
-
-// VLDEnable - Enables Visual Leak Detector's memory leak detection at runtime.
-//   If memory leak detection is already enabled, which it is by default, then
-//   calling this function has no effect.
-//
-//  Note: In multithreaded programs, this function operates on a per-thread
-//    basis. In other words, if you call this function from one thread, then
-//    memory leak detection is only enabled for that thread. If memory leak
-//    detection is disabled for other threads, then it will remain disabled for
-//    those other threads. It was designed to work this way to insulate you,
-//    the programmer, from having to ensure thread synchronization when calling
-//    VLDEnable() and VLDDisable(). Without this, calling these two functions
-//    unsychronized could result in unpredictable and unintended behavior.
-//    But this also means that if you want to enable memory leak detection
-//    process-wide, then you need to call this function from every thread in
-//    the process.
-//
-//  Return Value:
-//
-//    None.
-//
-__declspec(dllimport) void VLDEnable ();
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#else // !_DEBUG
-
-#define VLDEnable()
-#define VLDDisable()
-
-#endif // _DEBUG

File pol-core/clib/win2kcompat.masm

-.model flat
-
-.data
-__imp__EncodePointer@4 dd dummy
-__imp__DecodePointer@4 dd dummy
-__imp__HeapSetInformation@16 dd dummy2
-EXTERNDEF __imp__EncodePointer@4 : DWORD
-EXTERNDEF __imp__DecodePointer@4 : DWORD
-EXTERNDEF __imp__HeapSetInformation@16 : DWORD
-
-.code
-dummy proc
-mov eax, [esp+4]
-ret 4
-dummy endp
-
-dummy2 proc
-mov eax, 1
-ret 10h
-dummy2 endp
-
-end
 Descricao: nao sei porque o tinyxml eh usado. Acho que adicionaram no file.em. é desnecessario porque os cfgfiles ja sao excelentes e mais simples de usar. Tirar o suporte a isso.
 Dificuldade: *
 
+9- Refazer Regions
+Descricao: As regions do pol sao configuradas apenas em um cfg e nao sao mutaveis, voce nao pode adicionar uma nova region enquanto o pol estiver rodando. Alterar pra ser possivel adicionar e modificar as regions exisentes.
+Dificuldade: *
 
+10- Sem C++11
+Descricao: C++11 nao eh totalmente suportado e adiciona muitas features inuteis que nunca usaremos. Remover suporte ao C++11, o pol usa ele no makefile.
+Dificuldade: *