Einzelnen Beitrag anzeigen

michael-calvin

Registriert seit: 6. Nov 2002
4 Beiträge
 
#6

hab was gutes dazu gefunden ! http://www.devexpress.com/prod

  Alt 7. Nov 2002, 20:46
How do I eliminate the "CoInitialize has not been called" error?

COM libraries can be picky about when CoInitialize is called. In order to guarantee it is initialized at the proper time, use the following unit (save it as ComInit.pas):
Delphi-Quellcode:
unit ComInit;

interface

uses
  ActiveX;

implementation

initialization
  CoInitializeEx(nil,COINIT_MULTITHREADED);
finalization
  CoUninitialize;
end.
Make sure this is the first unit listed in the “uses” statement of your .DPR file. For example:
Delphi-Quellcode:
uses
  ComInit in 'ComInit.pas',
  WebBroker,
  ApacheApp,
  dMain in 'dMain.pas{dmMain: TcxWebHomeDataModule},
  wMain in 'wMain.pas{wpmMain: TcxWebPageModule} {*.html};
http://www.devexpress.com/products/vcl/ewf/faq.asp
[edit=FuckRacism]Code Syntax eingefügt; das geht mit [*code] [*/code] halt ohne den *[/edit]
  Mit Zitat antworten Zitat