Is there any problem associated with calling tibrv APIs, such as tibrv_Open() and tibrv_Close(), within the DllMain()?

Is there any problem associated with calling tibrv APIs, such as tibrv_Open() and tibrv_Close(), within the DllMain()?

book

Article ID: KB0092113

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
The calls, tibrv_Open() and tibrv_Close() deal with threads and synchronization functions, i.e. they are "heavy" routines and Windows documentation specifically says such things should not be called inside the DllMain().  Furthermore, tibrv_Close() must be called explicitly, and should be called before DllMain() does the process detach.

Basically, you need to include explicit calls to tibrv_Open() and tibrv_Close() in the code outside of DllMain().

Please refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcekernl/htm/_wcesdk_win32_DllMain.asp for further information.

Environment

Product: TIBCO Rendezvous Version: 6.x.x, 7.x.x OS: Windows 2000, Windows 98, Windows NT 4.0, Windows XP --------------------

Issue/Introduction

Is there any problem associated with calling tibrv APIs, such as tibrv_Open() and tibrv_Close(), within the DllMain()?