Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 21-10-2016
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.054
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por buenarquero Ver Mensaje
Es la carita que aparece en su primera respuesta del post del que he adjuntado el enlace
Ah, eso ya no existe.
Pero echa un vistazo a estos enlaces:
http://www.clubdelphi.com/foros/showthread.php?t=47683
http://www.clubdelphi.com/foros/showthread.php?t=53814
http://www.clubdelphi.com/foros/showthread.php?t=64774
Responder Con Cita
  #2  
Antiguo 21-10-2016
buenarquero buenarquero is offline
Miembro
 
Registrado: feb 2008
Posts: 23
Poder: 0
buenarquero Va por buen camino
Bueno, Gracias Casimiro Notevi, pero ya he probado todo lo que me adjuntas. El componente de Neftalí no funciona en windows 7, el enlace de Seoane no funciona y el código de Mav solo da el número de serie del disco duro conectado al puerto IDE.
Responder Con Cita
  #3  
Antiguo 21-10-2016
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.054
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por buenarquero Ver Mensaje
Bueno, Gracias Casimiro Notevi, pero ya he probado todo lo que me adjuntas. El componente de Neftalí no funciona en windows 7, el enlace de Seoane no funciona y el código de Mav solo da el número de serie del disco duro conectado al puerto IDE.
¿Qué cosa no funciona en w7?, pregunta a Neftali.
La web de seoane: https://delphi.jmrds.com/ puedes preguntarle también.
Responder Con Cita
  #4  
Antiguo 21-10-2016
Avatar de escafandra
[escafandra] escafandra is offline
Miembro Premium
 
Registrado: nov 2007
Posts: 2.197
Poder: 20
escafandra Tiene un aura espectacularescafandra Tiene un aura espectacular
Código Delphi [-]
function Search(hParent: HKEY; var SubKey: ShortString): LongBool;
var
 hChild: HKEY;
 Index: Cardinal;
 Data: ShortString;
begin
 Index := 0;
 RegOpenKey(hParent, @SubKey[1], hChild);
 RegQueryValue(hChild, 'ParentIdPrefix', Data, SizeOf(Data));
 Result := not LongBool(lstrcmp(@Data, @Device));
 while not Result and (RegEnumKey(hChild, Index, @SubKey[1], SizeOf(SubKey) - 1) = ERROR_SUCCESS) do
  begin
   Result := Search(hChild, SubKey);
   Inc(Index);
  end;
 RegCloseKey(hChild);
end;

function usbGetSerial;
var
 lpSerialNumber: PChar;
 hKey: Windows.HKEY;
 Index: Integer;
 Value: Char;
begin
 Result := False;
 ValueName[12] := Drive;
 RegOpenKey(HKEY_LOCAL_MACHINE, 'SYSTEM\MountedDevices', hKey);
 RegQueryValue(hKey, @ValueName, Device, SizeOf(Device));
 RegCloseKey(hKey);
 Index := 0;
 repeat if Device[(Index + 3) * 2 + 54] <> '#' then
  Value := Device[Index * 2 + 54] else Value := #0;
  Device[Index] := Value;
  Inc(Index);
 until Value = #0;
 SerialNumber[0] := #0;
 lstrcpy(@SerialNumber[1], 'SYSTEM\CurrentControlSet\Enum\USBSTOR');
 if (Device[0] <> #0) and Search(HKEY_LOCAL_MACHINE, SerialNumber) then
  begin
   lpSerialNumber := @SerialNumber[1];
   repeat Inc(SerialNumber[0]);
    Inc(lpSerialNumber);
    if lpSerialNumber[0] = '&' then
     lpSerialNumber[0] := #0;
   until lpSerialNumber[0] = #0;
   Result := True;
  end;
end;


Saludos
Responder Con Cita
  #5  
Antiguo 21-10-2016
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.054
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Responder Con Cita
  #6  
Antiguo 21-10-2016
buenarquero buenarquero is offline
Miembro
 
Registrado: feb 2008
Posts: 23
Poder: 0
buenarquero Va por buen camino
Muchas gracias escafandra, voy a probarlo. Ya os digo como fue.
Responder Con Cita
  #7  
Antiguo 21-10-2016
buenarquero buenarquero is offline
Miembro
 
Registrado: feb 2008
Posts: 23
Poder: 0
buenarquero Va por buen camino
Bueno, pues parece que no hay suerte. El código que me has puesto, escafandra, no funciona. es posible que falte poner algo en el uses, pero desconozco el que. Me da todos estos errores:

[Error] Unit1.pas(34): Incompatible types: 'ShortString' and 'PAnsiChar'
[Error] Unit1.pas(34): Types of actual and formal var parameters must be identical
[Error] Unit1.pas(35): Undeclared identifier: 'Device'
[Error] Unit1.pas(44): Function needs result type
[Error] Unit1.pas(52): Undeclared identifier: 'ValueName'
[Error] Unit1.pas(52): Undeclared identifier: 'Drive'
[Error] Unit1.pas(54): Undeclared identifier: 'Device'
[Error] Unit1.pas(54): Types of actual and formal var parameters must be identical
[Error] Unit1.pas(62): Undeclared identifier: 'SerialNumber'
[Error] Unit1.pas(64): Operator not applicable to this operand type
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Obtener el Número Serie de Fabrica USB MAXIUM Varios 10 04-11-2014 01:29:00
Obtener el numero de serie del disco giulichajari C++ Builder 6 30-07-2013 18:58:25
obtener el número de serie de un disco duro serial ATA mgc API de Windows 4 27-03-2009 15:54:18
Número de serie de un PenDrive Rudi Varios 2 05-09-2007 13:59:17
Como obtener el número de serie de la mother board saul_fg API de Windows 1 11-03-2007 07:49:51


La franja horaria es GMT +2. Ahora son las 21:58:16.


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