Coinitialize error in IntraWeb using ADO

Already asked on the Evil Exchange, but, as always, this did not help. Today I have a problem:

When creating a stand-alone web application using IntraWeb, I get this exception in the IDE when I try to verify a session from my application in a browser:

First random exception at $ 7C812A6B. An EOleSysError exception class with message 'CoInitialize was not called'. WebContactManager.exe Process (1112)

If I click continue in the IDE exclusion dialog box, the browser itself simply shows:

200 OK

... not the controls in my main form.

This error does not occur when I replace ADO with other database components such as dbExpress or BDE.

What kind of error is telling me and how to fix it?

(Note: I use the IntraWeb Internet VCL components that are built into D2007).

Thanks in advance for any help!

+3
source share
2 answers

The “solution” provided in the link you quoted is mostly incorrect or at least incomplete. Just setting ServerController.ComInitialization on ciMultiThreaded to true IW will ensure that every thread is correctly initialized by COM. (e.g. think of Ajax callbacks)

If you create your own threads, you will have to call CoInitialize for that thread yourself, though, since Intraweb doesn't know about your custom threads.

+7

:

, - Intraweb, Intraweb com . .

MS SQL DbExpress ADO Intraweb, ComInitialization ServerController "CiMultiThreaded.

" CoInitialize "".

+3

Source: https://habr.com/ru/post/1712730/


All Articles