Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 15-06-2005
Avatar de Investment
Investment Investment is offline
Miembro
 
Registrado: may 2003
Posts: 378
Poder: 21
Investment Va por buen camino
Post

Este procedinmiento te registra Midas.dll para que no te de ese error.

Código:
procedure TFRMain.RegisterAxLib;
 type
   TRegProc = function : HResult; stdcall;
   TRegAction = (raReg, raUnreg);
 
 const
   ProcName: array[TRegAction] of PChar = (
 	'DllRegisterServer', 'DllUnregisterServer');
 
 Var
   RegAction: TRegAction;
   LibHandle: THandle;
   FileName: String;
   RegProc: TRegProc;
 begin
   FileName:='Ojo, Escribe la ruta\Midas.dll'; // Normalmente c:\windows\system32\Midas.dll
   RegAction:=raReg;
   LibHandle := LoadLibrary(PChar(FileName));
   if LibHandle = 0 then raise Exception.CreateFmt('Error', [FileName]);
   try
 	@RegProc := GetProcAddress(LibHandle, ProcName[RegAction]);
 	if @RegProc = Nil then
 	  raise Exception.CreateFmt('Error', [ProcName[RegAction],
 		FileName]);
 	if RegProc <> 0 then
 	  raise Exception.CreateFmt('Error', [ProcName[RegAction], FileName]);
   finally
 	FreeLibrary(LibHandle);
   end;
 end;
__________________
Saludos,
Peter Investment
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 13:49:37.


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