LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CloseCom problem

Using CloseCom to close any serial port connection
into a DLL when the system unload it (in DllMain
at fdwReason = DLL_PROCESS_DETACH) it take about 10
seconds to complete. The same code used to produce
an executable file instead of a Dll file works well.
Anybody can help me ? Thanks
0 Kudos
Message 1 of 2
(2,674 Views)
Not sure why but I wouldn't close COM ports in DLL detach. Do it explicitly
through a DLL function which the application calls. DLL unload depends on OS
as to when it happens.

"g6p1" wrote in message
news:5065000000080000007E6F0000-1042324653000@exchange.ni.com...
> Using CloseCom to close any serial port connection
> into a DLL when the system unload it (in DllMain
> at fdwReason = DLL_PROCESS_DETACH) it take about 10
> seconds to complete. The same code used to produce
> an executable file instead of a Dll file works well.
> Anybody can help me ? Thanks
0 Kudos
Message 2 of 2
(2,674 Views)