dcsimg

Search:

Type: Posts; User: jsvenu

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Shaggy Hiker,

    I used to work in vc++ multithreading in unmanaged code since long as many people worked in unmanaged code
    before the arrival of .Net managed coding.At that time I worked...
  2. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Shaggy Hiker,

    I already gave explanation with simple example and why was doing this way.
    I can tell with due respect that I am not working in vb6 and I am doing this out of my...
  3. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    Yu have shown how to pass vbheader as parameter to Threadproc in the activex exe example.

    Instead if we want to pass more data like UDT containing vbheader and other data to...
  4. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Arnoutdv,

    You already know there are two things ie., theory and practical application.If we want solve a problem it can be solved
    using some readymade solution or using some internal code...
  5. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Shaggy Hiker and Trick,

    I shall explain why I was trying to do this way.

    I made a simple example which is attached.It contains a activex dll (set to apartment threaded but can it work...
  6. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Shaggy Hiker,

    Ok, sorry I apolozige if I have not been respectable.

    regards,
    JSVenu
  7. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    Please clarify me why the following code in ThreadProc


    VBDllGetClassObject GetModuleHandle(0), 0, pVbHdr, tClsId, tIID

    does not consider modified vbheader pVBHdr when I remove...
  8. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear qvb6 & wqewto,

    I have neither hijacked or stopped anybody's threads and No SPAM here and if Trick does not reply also I am not
    going to feel because he is the man whom I trust and...
  9. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,


    Can you suggest a simple way to bypass Sub Main when we call CreateThread api and work just like when we specify none instead of Sub Main in project setting Startup Object of...
  10. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,
    But in out of box threading App.TaskVisible works when used instead of boolean variable but it fails here when used as follows.



    Sub Main()

    ' // No error checking
    ...
  11. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    When I try to bypass Sub Main in ThreadProc

    1. using g_bool global boolean variable and try to do something else in the thread after thread init as follows the code fails and...
  12. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    OK I understood that we have to use new form instance each time.
    Only thing not understood is why we donot get the same error msg when we use Thread per object or Thread pool >1 when...
  13. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    OK without modifying the vbheader we can avoid reentracy in sub main using boolean variable.

    How does the application identify Thread per object or thread pool > 1 setting

    I am...
  14. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    First let me sincerely thankyou for the simple awesome example.
    I have run it in standalone mode.It worked perfect.
    The only doubt I have is you did not modify the vbheader as well...
  15. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    This is the reason I started this thread with the said title so that I can use CreateThread API and init runtime of my threadproc even in activex exe running in standalone mode with...
  16. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    This is what I wanted to do by explicitly using CreateThread so that I can init runtime of my ThreadProc instead of using CreateObject directly in activex exe running in standalone...
  17. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    This is what I wanted to do by explicitly using CreateThread so that I can init my ThreadProc instead of using CreateObject directly in activex exe running in standalone mode.
    ...
  18. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    We have to use CoRegisterClassObject instead of DllGetClassObject in the following code which I already showed for activex dll as follows since I already told that DllGetClassObject is...
  19. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    But AXExe has initialization of Threadproc using CThreadPool::_InitThread out-of-box thru CreateObject and wanted to init runtime for new threadproc using CreateThread API instead...
  20. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Olaf,

    Your ThreadedSTAs.dll is similar to Srideep's solution (https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=26900&lngWId=1) which I already mentioned in the link...
  21. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,


    I know that activex exe with threading model as Thread pool = 1 running in standalone mode is eqivalent to standard exe only with one difference that first time the activex...
  22. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    In activex exe when it runs in standalone mode:

    When we start a Thread in activex exe by running it in a standalone mode with Thread per Object setting using
    ...
  23. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    As per the above callstack the CreateObject of activex exe calls CreateThread which
    calls _beginThreadEx and then calls CThreadPool::InitExeThrd which
    internally calls...
  24. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    Thankyou very much for showing the internals thru ollydbg.

    regards,
    JSVenu
  25. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Olaf,

    Thankyou.

    regards,
    JSVenu
  26. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    In the above AxExeServer.zip I mean if we change the code as follows it will not work.


    Public Sub RunOnThreadClass()
    Dim x As New Form2
    x.Show vbModal
    End Sub
  27. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    To be even more clear I am sending a simple activex exe example which displays new form object in new thread each time when we click on Display form in new thread button on the...
  28. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    Ok sorry I might not have explained you in better way what I my doubt is.

    1. We have standard exe which can create thread using createthread api and initialize it using...
  29. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    I can sincerely tell you that I could get the two differences when we use activex exe instead of activex dll through the following good article ...
  30. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    In a standard exe when we start a new thread we have vbheader thru which we can control the way the new thread behaves like bypass startup form or submain.

    But is there any way to...
  31. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear trick,

    After digging deeper I found that activex exe uses CoRegisterClassObject similar to DllGetClassObject used for
    activex dll.Can you provide a sample for the same.

    regards,...
  32. Re: internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    First thankyou for the reply.



    Public Function InitVbProjContext() As IUnknown
    Dim pVBHeader As Long
    Dim pCOMData As Long
    Dim lOfstRegInfo As Long
  33. internals of activex exe buit in CreateObject multithreading vs CreateThread api

    Dear Trick,

    This is to understand how vb6 implements built in multithreading for activex exe using CreateObject.

    I understand that we can do multithreading in activex exe in three ways:

    1....
  34. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,

    Thankyou very much for your awesome support and solid explanation which I understood upto some extent and will try to understand well and I am grateful to you for the help extended.
    ...
  35. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Arnoutdv,

    First let me thankyou for treating me asking something different but they are related to COM threading in a vc++ 6.0 unmanaged way. Actually I always think of COM threading to be...
  36. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,

    Still I did not understand why CreateVBHeaderCopy fails in apartment threaded activex dll but works
    1. in a standard exe even when the main thread vbheader is changed to apartment...
  37. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,

    It we use same vbheader then how to make sure that global variables are not cleared without using CreateVBHeaderCopy.
    Same is my problem in ExeFormCreator project which I asked in the...
  38. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,
    Now it works fine.
    But now the real problem came when I use vbdllgetclassobject .
    When I use it it crashes in Createvbheadercopy.
    I am attaching activex dll updated.It was my real...
  39. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,

    Thankyou for the reply.
    I modified the activex dll (activex dll project code attached) according to above code but when I run the standard exe by including the dll thru project...
  40. Re: how to init runtime of threadproc in activex dll without multiuse class creation-

    Dear Trick,

    I made a simple project which is attached.
    The simple project consists of two projects in simpleproject folder which are
    1. stdexe project Displayaformofdllinnewthreadfromactivexd...
Results 1 to 40 of 335
Page 1 of 9 1 2 3 4



Featured


Click Here to Expand Forum to Full Width