estrify Posted January 31, 2013 Posted January 31, 2013 Hi, We need some light with this problem: access violation exception accessing session variables within a thread. The problem is that UniMainModule is a function that returns TUniMainModule(UniApplication.UniMainModule) and we suppose that UniApplication is another function. Please, we need to know the necessary direct casting we have to do to access session's data avoiding the usage of such functions within the thread. We attach the progress bar example modified to conceptually do what we need. In progressbartest.pas, the line Index_Max:=UniMainModule.Index_Max produces the exception. Thanks in advance 20130131_Access_Session_Data_Within_A_Thread.rar Quote
Administrators Farshad Mohajeri Posted January 31, 2013 Administrators Posted January 31, 2013 Index_Max:=(frm.UniApplication.UniMainModule as TUniMainModule).Index_Max; Quote
estrify Posted January 31, 2013 Author Posted January 31, 2013 Perfect. Fast and clear response. Thanks a lot. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.