Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 15-02-2005
mamaro mamaro is offline
Miembro
 
Registrado: mar 2004
Posts: 79
Poder: 23
mamaro Va por buen camino
Post el mismo mens. de error

Saludos... yo tengo un problema similar, utilizo DLLs para crear paneles que luego incrusto en un ejecutable que hace de base; me daba un problema por el estilo y encontré por ahí un documento que dice así:

OLE Error: CoInitialize has not been called

In a project that needed to display HTML documents, I decided to use the TWebBrowser control. I had used this handy ActiveX control successfully in other projects before.

This application was an MDI application, written in Delphi 5. As a 'specialty' I had installed a beta version of Internet Explorer on my system. I am not sure which of this is responsible for it, but when I would call the function in my application to display the HTML document, the TWebBrowser element could not be instantiated.
Instead I would receive an error message:

'CoInitialize has not been called'

The surprising thing is that the webbrowser control shows fine in design mode! I checked and TWebBrowser was properly installed. The underlieing DLL was also registered properly. A call of

regsvr32 shdocvw.dll

did not help. Finally I manually called the CoInitialize() function. I had to add OLE2 to the list of used units. A good place to do this is the initialization part as the sample snippet below shows.
Thanks to Martin Vreeken for pointing out the necessary CoUninitialize() call.

Note:
In a multithreaded application, you have to put a call to CoInitialize at the beginning of your thread's Execute method and a matching CoUnInitialize at its end.

uses

ActiveX, // <-- make sure to include this unit

// older Delphi versions use: OLE2 instead

Windows; // and others



initialization

CoInitialize(nil);
// <-- manually call CoInitialize()

finalization

CoUnInitialize;
// <-- free memory

end.

El tema es que las dos secciones finales (initialization y finalization) no se pueden incluir en una DLL, espero les ayude y me puedan ayudar a mi también, desde ya muchas gracias.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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 03:55:34.


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