Re: How best for dll to "report progress"?



"Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u6F$kTIBHHA.1220@xxxxxxxxxxxxxxxxxxxxxxx
"MP" <nospam@xxxxxxxxxx> wrote in message
news:u%23FSVFIBHHA.4992@xxxxxxxxxxxxxxxxxxxxxxx

The dll is created, lets say, by a form in a stand alone exe, therefore
"out
of process" to the dll.class and other oApp


DLLs, by design, run 'in process' and have no built in way to communicate
with any other app.

sorry, I don't understand what you mean there, can you elaborate?
In my understanding(lack thereof) <g>
The dll is created by my vb6.exe app "in process" to the external app(acad).
The dll can then "communicate" to the external app(in whose process it is
running) by calling that apps api methods etc.
Then it can return data back to my vb6 exe when I call it's properties,
right?
Sub()
Set oApp = CreateInstanceOfApp
Set cDll = oApp.GetInterfaceObject(mydll.myclass)
Call cDll.GatherInfo (oApp.Document)'dll communicates with app ???
ReturnData = cDll.ReturnInfo'dll communicates with me???
Call UseData (ReturnData) 'or whatever
End Sub

I think of that as my way of "communicating" back and forth from my app to
the "other" app (via the dll inprocess so speed is better)...
what am I missing?
are you just saying a dll can't raise events?

Have you considered an ActiveX EXE instead? They run
'out of process' and several apps can share a single instance.

I know nothing about ActivexExes so maybe I'm missing something but based on
my research so far I've been led to believe I need a dll
Out of process is extremely slow (due to marshalling so I've been told),
that's why I need dll
I only have one app(my vb6 exe) and one external app(autocad) I'm "talking
to" (via my dll)
So I have no need for multiple apps to share an instance.
So unless there's something else about an ActivexExe that I'm missing ???

Are you saying dll's can't raise events back to their creators? I wasn't
aware of that...(have just barely scratched the surface of learning events)

If you want to stick with the DLL, you can probably setup some kind of
subclassing in that 'other app' and use PostMessage to send info to
windows
in that app. Since PostMessage doesn't wait for a return, it shouldn't
have
much of an effect on performance.

I don't want to communicate with windows in the other app, just gather info
from objects in it.
I don't know anything about subclassing....from what i've read it's
"dangerous" territory :-)
I'm still trying to learn baby steps <g>
From my exe I could "communicate" with acad, get the data I want, etc but
that would be slow due to "cross-process marshalling" right?
Thats' why i'm "delegating" the data mining operation to the Dll "in
process"

...or, you can try one of the many 'communicate with other apps'
samples/components. Here's a link to mine (below)... it's very reliable,
when used by sane people <g> iow, it's not designed to allow 1,000 apps to
constantly bombard each other with info (some people..... geez). It uses
SendMessage... you can try changing that to PostMessage and see if it
works.
No subclassing required either.

Communicate with another instance of your app
http://www.vbsight.com/CodeC.htm#CrossCom

I looked at the description of that but from the sound of it I think I'm
trying to do something else???
or i'm just not understanding what you're trying to explain

Thanks
Mark


.



Relevant Pages

  • Re: Class termination
    ... It has everything to do with forms in the dll. ... The need to make the exe into an ActiveX. ... If your exe needs to reference a dll that is referencing it then ... you've got some *huge* problems in the design of your app. ...
    (microsoft.public.vb.general.discussion)
  • Re: ADOStream Write Causes Permission Denied Error
    ... My app is packaged using the Package and Deployment Wizard, ... prior version DLL. ... Do you think getting rid of the dll and have an Update EXE and the actual ... > If this is an ASP application, and authentication is Anonymous (no ...
    (microsoft.public.vb.general.discussion)
  • Re: file packer
    ... > c++ compiled program, some dll and some text files for my shaders, and I ... > want to pack all that in a single exe. ... it on the end of the exe, or put it in one of the COFF sections. ... files and linked with the app, this way, the data is allready in memory at ...
    (comp.compression)
  • Re: Understanding Object Namespaces
    ... versions of NT-class Windows except Vista, which did not allow it to ... The problem is the DLL with the shared section. ... If run one EXE as service, and other as normal app under my login, ... the EXE's cannot communicate. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to prevent creating a big exe file.
    ... When "all is said and done" I think Refox or KonXise (not sure if Konxise ... Can I create an exe with the readonly tables in other .DLL file? ... you can split a project into separate "libraries" as .APP files. ...
    (microsoft.public.fox.programmer.exchange)

Loading