Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Applications using CVI may not really quit

Please help me!

I am suffering a problem:

An application using CVI dlls will not really quit until all applications (also using CVI dlls) behind it (started up later than the former) quit.

The application UI disapears, but with Task Manager, you can still see it in the process list.

The operating system I am working on is Windows NT 4 Sp 6.

The IDE is MSVC with SP5.

My applications also use some same dlls that depend on CVI RTE.

I put CloseCVIRTE in each module's global object.


Would anyone tell me what I can do?


Thanks,

Yong
0 Kudos
Message 1 of 3
(3,021 Views)

Hello

check out the CVI Programmer's reference manual pg 33 of 94, there is a description of something similar to the problem you might be seeing.

Also, are you able to reproduce the problem with some simple programs calling really simple dll ( maybe like a simple print statement wrapped in a dll). It always helps in trying to narrow down the problem

I hope this helps

Bilal Durrani
NI

Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,021 Views)
Thanks.

But I have figured out what is wrong:

CVIRTE registers the main window of the main thread of an application that uses CVIRTE to the chain of Windows NT Clipboard viewers.

In each of our projects, we make the main thread work in the background and hide its main window. There may and may not be other threads with visible UI.

The problem is that we never call ProcessDrawEvents and ProcessSystemEvents in the main thread. The main window of the main thread will then never have a chance to process WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD messages.

The function "ChangeClipboardChain" in user32.dll will somehow suspend if some clipboard viewers do not follow the rule:

Every Clipboard Viewer MUST process WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD prop
erly.


Anyway, Thank you for your help.


Yong Li

yong.li@rogers.com
yli@phtn.com
0 Kudos
Message 3 of 3
(3,021 Views)