Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 06-07-2007
ArielMendoza ArielMendoza is offline
Registrado
 
Registrado: dic 2005
Posts: 5
Poder: 0
ArielMendoza Va por buen camino
Talking Imagex, WIMGAPI.DLL y Delphi

Hola a todos,

No se si esto le interesa a alguien, pero he buscado en Internet y no he encontrado nada para delphi.

Necesitaba aplicar una imagen WIM desde mi aplicación. Investigando con el WinDebuger y con Google encontré las declaraciones de las funciones. Me falta obtener el progreso que lo haré el lunes. Si ha alguien le interesa que me lo diga y pongo el código, o si alguien ya lo tiene mejor.

Un saludo a todos,

Ariel


Código Delphi [-]
 Function WIMApplyImage(hImage:thandle; lpszPath:widestring;dzApplyFlags:cardinal):LongBool; stdcall; external 's:\tools\WIMGAPI.DLL';
 function WIMCreateFile(lpszWimPath:widestring;dwDesiredAccess:Longint;dwCreationDisposition:Longint;dwFlagsAn  dAttributes:Longint;dwCompressionType:Longint;var lpdwCreationResult:Longint):THandle;  stdcall; external 's:\tools\WIMGAPI.DLL';
 Function WIMSetTemporaryPath(hWnd:THandle;TemporaryPath:widestring):Integer;stdcall; external 's:\tools\WIMGAPI.DLL';
 Function WIMLoadImage(hWnd:THandle;ImageIndex:longint):THandle;stdcall; external 's:\tools\WIMGAPI.DLL';
 Function WIMCloseHandle(Handle:Thandle):longbool; stdcall; external 's:\tools\WIMGAPI.DLL';
 Implementation
  {$R *.dfm}
          const WIM_GENERIC_READ = $80000000;
          const WIM_GENERIC_WRITE = $40000000;
          const WIM_CREATE_NEW = 1;
          const WIM_CREATE_ALWAYS = 2;
          const WIM_OPEN_EXISTING = 3;
          const WIM_OPEN_ALWAYS = 4;
          const WIM_COMPRESS_NONE = 0;
          const WIM_COMPRESS_XPRESS = 1;
          const WIM_COMPRESS_LZX = 2;
          const WIM_CREATED_NEW = 0;
          const WIM_OPENED_EXISTING = 1;
          const WIM_FLAG_VERIFY = $00000002;

 procedure TForm1.Button1Click(Sender: TObject);
 var   Created:integer;
   hImage,ptrImageHandle:THandle;
   intResult:boolean;
 begin
   hImage:=WIMCreateFile(pchar('S:\IMAGEN\WINXP32.WIM'),WIM_GENERIC_READ, WIM_OPEN_EXISTING, WIM_FLAG_VERIFY, WIM_COMPRESS_NONE, created);
   WIMSetTemporaryPath(hImage, pchar('C:\Temp'));
   ptrImageHandle := WIMLoadImage(hImage, 1);
   intResult := WIMApplyImage(ptrImageHandle, pchar('C:\Temp'), 0);
   showmessage(SysErrorMessage(getlasterror));
   WIMCloseHandle(ptrImageHandle);
   WIMCloseHandle(hImage);
 end;

Última edición por ArielMendoza fecha: 08-07-2007 a las 13:56:38.
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
Consulta Delphi 6, Delphi 2005 y Delphi 2006 Leviatan Varios 6 18-08-2007 16:02:08


La franja horaria es GMT +2. Ahora son las 07:37:22.


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