Jump to content

CoInitialize has not been called


isosrl

Recommended Posts

Hi,

I have a project (unigui 0.99.90.1291) with ADO components and Indy IMAP component that when compiled as Windows StandAlone works correctly; when I compile it as Windows Service and start the service it stops; in log a read the error "CoInitialize has not been called".

 

I have set ServerModule->AutoCoInitializa to True.

 

I run the service on my pc but the sql server is on another pc, so I try to change in Windows Service the account from "Local Service" to "Network Service", still the problem.

 

 

Any ideas ?

 

Thanks,

Francesco

 

 

Link to comment
Share on other sites

Hi Farshad,

 

ADO components, Indy IMAP, UniThreadTimer reside in ServerModule since I need to pool IMAP server and when I found new emails they are copied into SQL database for later use.

Main form is used only for SQL database and IMAP configuration, protected by the Login form.

 

Attached you can find the project.

 

It is not necessary to configure SQL and IMAP access, since if they are empty the project runs but does nothing.

Eventually password for login form is admin.

The project will pool the folder INBOX/RichiesteArticoli of the imap user.

GetMailRichiesteArticoli.zip

Link to comment
Share on other sites

Hi again,

I cannot get to run as WindowsService, I tried different use of CoInitialize/Ex with no success...

I came back to normal Windows standalone program, not a big issue.

 

Thanks for the support.

Link to comment
Share on other sites

  • 4 years later...
9 hours ago, CCH4UNIGUI said:

Hi

I have tried placing the ADO components on the ServerModule/MainForm/Data Module.

Can compile as a stanalone with no error but get the CoInitialize has not been called then localhost:8077

How can I solve this problem ?

 

Hello

Which version and build are you using?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...