Skip to main content

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.
Happy new year to you too.

I am not quite sure what you mean. But my guess is that you are using a DLL which has a function that you call, and once you call this function, it is starting a thread internal in the DLL and returning. Your problem then is that you don't know when the internal thread in the DLL is finished, am I right?

If so, or in any case, I would need more information about the DLL and the task you are accomplishing.

If you cannot provide a small illustrative program for this here in the forum, I suggest you bring up the topic with our Tech Support and I am sure we should be able to provide a solution.

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.
Happy new year to you too.

I am not quite sure what you mean. But my guess is that you are using a DLL which has a function that you call, and once you call this function, it is starting a thread internal in the DLL and returning. Your problem then is that you don't know when the internal thread in the DLL is finished, am I right?

If so, or in any case, I would need more information about the DLL and the task you are accomplishing.

If you cannot provide a small illustrative program for this here in the forum, I suggest you bring up the topic with our Tech Support and I am sure we should be able to provide a solution.

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.
Happy new year to you too.

I am not quite sure what you mean. But my guess is that you are using a DLL which has a function that you call, and once you call this function, it is starting a thread internal in the DLL and returning. Your problem then is that you don't know when the internal thread in the DLL is finished, am I right?

If so, or in any case, I would need more information about the DLL and the task you are accomplishing.

If you cannot provide a small illustrative program for this here in the forum, I suggest you bring up the topic with our Tech Support and I am sure we should be able to provide a solution.

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.
thank you for your readiness to answer me ...

Well I guess that english is not so bad ... And I think you are in the true. but I can't see how the function is called in that DLL ( I think that it will be easy to know ... TOTEMPRINT.DLL is property of CASEMAKER )..

I join you a sample (because of the limitation Only source code and totem.def)

By the way, doing this sample let me find that even when there is an interactive window, if you quit the program ( as soon as you can act) by clicking on the 'window quit cross' the DLL die.

Thank you ...

[Migrated content. Thread originally posted on 07 January 2004]

Happy new year ... ;)


Is there a way to wait the end of a DLL call ?

I wrote a program which was using a call to a DLL, then to a function of this DLL. Function which send to a printer a file report.
When the runtime stop ... the dll die even when the function has not finished.

If a create a window with a button ... this one is waiting for the end of my call. But my program can't be interactive ( Batch program).

I have tried to to do :
a 'perform thread ' .. then a 'wait for last thread' but it only concern the paragraph.
a call in thread of my DLL or function but it don't work.

Can I associate my cal to an handle or thread that I could wait.
The TotemPrint.dll has a function DllCanUnloadNow, you may want to try to call that function. I believe it has no parameters, and will return a non-zero value if it may be unloaded, otherwise it will be 0.
This is theory however, I haven't tried this myself, it I am proven wrong you should contact Tech support for this issue.

The reason, at any rate this happens is because the DLL invokes the browser object of the computer, and while this lives separately it is dependent on your process as a host, if it is not finished by the time you cancel your app it will blow.