Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 04-08-2005
migsoftware migsoftware is offline
Registrado
 
Registrado: ago 2005
Posts: 2
Poder: 0
migsoftware Va por buen camino
GetSystemInfo en ASP .NET

Hola.

¿Se puede obtener la misma información en una aplicación ASP .NET del hardware del sistema, como si se hiciera un GetSystemInfo?

Gracias.

Saludos.
Responder Con Cita
  #2  
Antiguo 05-08-2005
Avatar de __hector
[__hector] __hector is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Santo Domingo, Rep. Dom.
Posts: 1.075
Poder: 23
__hector Va por buen camino
Del hardware de que sistema? Supongo que hablas del servidor, no?
__________________
Héctor Geraldino
Software Engineer
Responder Con Cita
  #3  
Antiguo 07-08-2005
migsoftware migsoftware is offline
Registrado
 
Registrado: ago 2005
Posts: 2
Poder: 0
migsoftware Va por buen camino
Sí, del servidor.
Responder Con Cita
  #4  
Antiguo 15-08-2005
Avatar de __hector
[__hector] __hector is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Santo Domingo, Rep. Dom.
Posts: 1.075
Poder: 23
__hector Va por buen camino
No lo he probado en .NET, pero puedes intentar llamar el API getsysteminfo de la dll kernel32.dll (api del sistema operativo)

En c# va mas o menos asi :

Código:
using System.Runtime.InteropServices; 

//Estructura que sera parametro de la funcion 
[StructLayout(LayoutKind.Sequential)] 
public struct SYSTEM_INFO 
{
 public uint dwOemId;
 public uint dwPageSize;
 public uint lpMinimumApplicationAddress;
 public uint lpMaximumApplicationAddress;
 public uint dwActiveProcessorMask;
 public uint dwNumberOfProcessors;
 public uint dwProcessorType;
 public uint dwAllocationGranularity;
 public uint dwProcessorLevel;
 public uint dwProcessorRevision; 
}
 
[DllImport("kernel32.dll")]
static extern void GetSystemInfo(ref SYSTEM_INFO pSI); 

// y de aqui lo invocamos

protected void button1_Click (object sender, System.EventArgs e)
{
 SYSTEM_INFO pSI = new SYSTEM_INFO();
 GetSystemInfo(ref pSI);
 
  Response.Write(pSI.dwActiveProcessorMask.ToString());
}
__________________
Héctor Geraldino
Software Engineer
Responder Con Cita
Respuesta



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


La franja horaria es GMT +2. Ahora son las 00:50:10.


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