Einzelnen Beitrag anzeigen

acadam71

Registriert seit: 3. Jan 2006
8 Beiträge
 
#9

Re: Was heisst Fensterhandle des OLE Elements nicht verfügba

  Alt 30. Sep 2008, 14:31
Hier mal eine Info von RemObjects bzgl. der Unit uROComInit, (der letzte Abschnitt ist der wichtigste)

Overview

Initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required.
Usage

RemObjects SDK uses MSSQL which depends on COM to work so CoInitializeEx has to be called for RO server applications to function. CoInitializeEx is used to initialize COM in a multithreaded environment. By default the templates use uROCOMInit has which calls this function, so COM is already initialized in most cases howeverusing CoInitializeEx has known disadvantages:

Clipboard stops working
Drag and drop operations can't be accepted
Object linking and embedding (OLE) doesn't work
Shell dialogs (Open/Save) don't open

All these things require OleInitialize to be called in the main thread, instead of CoInitializeEx and require Single Thread Apartment. If your application need any of the above functionality you will have to remove the uROComInit reference from your project and initialize/deinitialize COM in ever thread that requires it.
  Mit Zitat antworten Zitat