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



On Fri, 10 Nov 2006 17:12:34 -0600, "MP" <Nospam@xxxxxxxxxx> wrote:

<snip>

3) You want to make the things talk to each other

Well, I have this dll now, finally got it working, and that's what goes
"inside" the acad process via
acadobject.GetInterfaceObject("dllname.classname")

Probably that DLL is working inside AutoCad's process
eg: it uses AutoCad's memory and thread

4) All this stuff about DLLs is a red herring

Sorry, don't know what a red herring is, I've heard the expression but
don't know what it means.

A red herring is something that looks like an interesting clue, but is
really irrelevant

It sounds as if you and Ken are saying a dll can't Raise events in the way I
have read about and posted questions about.
However, neither of you have come right out and said it in so many words,
but that's the impression I'm getting,
Is that correct?

Sure DLLs can raise Events
- Ken and I think that you are trying to get two separate EXEs to talk
to each other
- and that can be done too

Now the dll is compiled and registered, and the exe is compiled, now it's
running at acceptable speed
800 objects "processed" in 1 second
versus pre-compiled in ide group or out of process (just vb without the dll)
at about 400 objects processed in 45 seconds or so.

Why not give the DLL a Progress Form ?

so now the issue of communicating back progress isn't as dire as it was
before.
If the process is going to take 45 seconds it's nice to know it's actually
'doing' something instead of just having frozen up
:-)

Too right !

at 1 second, that's no longer a big issue as i would have been happy to have
received notice every few seconds or so, so finishing the job in 1 second,
I'm excstatic <sp?>




Basically it sounds as if you either need to set up some form
communication such as WM_COPYDATA or 'Chat by Textbox' or you need to
turn your pure VB App into an AX EXE

Ken also mentioned Ax exe but said that was also Out of process...
Maybe it's just something special to acad but everyone over on that group
just says dll has to be in process to get speed.
anything out of process takes "forever" ie (45 seconds to 'process' 400
objects) <bg>


PostMessage is not going to be much use for all but the most trivial
things.

Cross Process Marshalling (which is really SendMessage in drag) is
slow, but 'slow' is a relative thing - unless you have two Apps stuck
in tight loops without processing their Windows Message Queue then
that 'slow' communication will be pretty darn quick in human terms.

well i don't know if half a minute or a minute is quick or not, depends on
perspective
In reality it would be fine if it took one minute or even 5 minutes,
compared to doing the job "manually" without this app/dll.
what's not fine is that during that time i can't see if anything is going on
or not.

Marshalling an event should be instant to a human

Personally I would Shell your pure VB App with the HWND of a Textbox
in the Command Line and use WM_SETTEXT to talk back from the pure VB
App to the Textbox in AutoCad.

sorry, you really lost me there...Im not too savy, just trying to "learn"
myself in this here vb stuff...so
"I would Shell your pure VB App with the HWND of a Textbox

You can launch an EXE with Shell()

If you have a HWND then you can tell it what to do, even if it does
not belong to your App

in the Command Line"

I have no clue what that means, but I want to learn. Sorry...what command
line?

Command Line is stuff you send to an EXE when you launch it

PKZIP *.BAS in this case '*.BAS' is the Command Line

I've heard of Shell...I use it to start notepad for instance to see my debug
log, Shell(Notepad.exe filename)
Somehow I think you mean something different...

No - that is exactly it

"with the HWND of a textbox..."???
from the pure VB
App to the Textbox in AutoCad.

what textbox in autocad?

Any you can create - I don't know AutoCad

It is simple to set up, and will give you a good idea of 'speed'

I'd appreciate if you could elaborate in more detail on what you're
explaining.
Sorry Im such a beginner that I don't get it yet...but with a couple more
clarifications as above I think I could understand.

Thanks again to all for their help
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: How best for dll to "report progress"?
    ... Then it can return data back to my vb6 exe when I call it's properties, ... Call cDll.GatherInfo (oApp.Document)'dll communicates with app ??? ... Personally I would Shell your pure VB App with the HWND of a Textbox ...
    (microsoft.public.vb.general.discussion)
  • 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)