Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 21-05-2020
Avatar de aguml
aguml aguml is offline
Miembro
 
Registrado: may 2013
Posts: 885
Poder: 14
aguml Va por buen camino
He visto un poco el código de Titán enginer y veo que inicializa de forma diferente CONTEXT:
Código PHP:
DBGContext.ContextFlags CONTEXT_ALL CONTEXT_FLOATING_POINT CONTEXT_EXTENDED_REGISTERS
Y para crear el proceso lo hace así:
Código PHP:
__declspec(dllexportvoidTITCALL InitDebugW(wchar_tszFileNamewchar_tszCommandLinewchar_tszCurrentFolder)
{
    
int DebugConsoleFlag NULL;

    if(
DebugDebuggingDLL)
    {
        
DebugConsoleFlag CREATE_NO_WINDOW CREATE_SUSPENDED;
    }
    else if(
engineRemoveConsoleForDebugee)
    {
        
DebugConsoleFlag CREATE_NO_WINDOW;
    }

    if(
engineEnableDebugPrivilege)
    {
        
EngineSetDebugPrivilege(GetCurrentProcess(), true);
        
DebugRemoveDebugPrivilege true;
    }
    
wchar_tszFileNameCreateProcess;
    
wchar_tszCommandLineCreateProcess;
    
std::wstring createWithCmdLine;
    if(
szCommandLine == NULL || !lstrlenW(szCommandLine))
    {
        
szCommandLineCreateProcess 0;
        
szFileNameCreateProcess szFileName;
    }
    else
    {
        
createWithCmdLine.push_back('\"');
        
createWithCmdLine.append(szFileName);
        
createWithCmdLine.push_back('\"');
        
createWithCmdLine.push_back(' ');
        
createWithCmdLine.append(szCommandLine);
        
szCommandLineCreateProcess = (wchar_t*)createWithCmdLine.c_str();
        
szFileNameCreateProcess 0;
    }
    if(
CreateProcessW(szFileNameCreateProcessszCommandLineCreateProcessNULLNULLfalseDEBUG_PROCESS DEBUG_ONLY_THIS_PROCESS DebugConsoleFlag CREATE_NEW_CONSOLENULLszCurrentFolder, &dbgStartupInfo, &dbgProcessInformation))
    {
        if(
engineEnableDebugPrivilege)
            
EngineSetDebugPrivilege(GetCurrentProcess(), false);
        
DebugAttachedToProcess false;
        
DebugAttachedProcessCallBack NULL;
        return &
dbgProcessInformation;
    }
    else
    {
        
DWORD lastError GetLastError();
        if(
engineEnableDebugPrivilege)
        {
            
EngineSetDebugPrivilege(GetCurrentProcess(), false);
            
DebugRemoveDebugPrivilege false;
        }
        
memset(&dbgProcessInformation0sizeof(PROCESS_INFORMATION));
        
SetLastError(lastError);
        return 
0;
    }

Veo que le da o le quita privilegios justo después de crear el proceso.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Aportación del código de un stored procedure para conversión literal de números birmain Firebird e Interbase 12 16-07-2015 19:12:29
Problemas con el codigo SQL Vales08 SQL 26 13-01-2012 03:05:46
Conversión de código altp .NET 2 10-06-2008 12:22:36
problemas de conversión a PDF con ReportBuilder y TExtraDevices agustibaldo Impresión 10 06-07-2007 14:52:41
problemas de conversion... User_baja1 Varios 2 30-08-2005 13:45:58


La franja horaria es GMT +2. Ahora son las 21:53:25.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi