Jump to content

Recommended Posts

Posted

Hi,

 

I'm having a problem accessing UniMainForm from my application. I have 1 Main(MainForm)  which is having 1 (Application) datamodule and that module is having another 1 (Application) datamodule.

 

Form

 |_ DataModule 1

       |_DataModule 2

 

If I understand UniMainForm correctly it is created  for each session and its basicly datamodule(Shared unit) for whole application.

 

Now... I'm creating threads in datamodule 2 and trying to write data to UniMainForm, but what I get is

 

UniMainModule.CreatedTaskIns:= ATaskIns.Key;

 

I Get access violation 0000064. I tried to read that variable from Datamodule1 and works good. It seems like i cant retrive current session from thread.

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...