15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Threads and DLLs

Anita Yadav CS -- ayadav@grad.csee.usf.edu
Sunday, January 21, 1996


Hi, I am creating an application using Visual C++2.0 in which the interface is
written using VC whereas the application is in C. I have developed a System
Log Interface in which the there is an external function WriteToLogFile() which
is called by each of the prcesses/programs.  The Log File is created as a 
mutex object and programs writing messages to Log File has to create WriteToLogFile() function as a thread.  Now the problem is that there will be background
service programs that need to access this function and these background programs
are not initiated by my application. So my question is : 
  1. Should I create this function as a DLL?
  2. How do I make sure that each thread has been executed successfully?

Any help is appreciated. Thanks in advance.

Ayadav.



Doug Boone -- dboone@zeus.clr.com
Thursday, January 25, 1996

I think you probably want to go with the DLL and export it to make it easier
for other developers to use your logging functions.
  
But I want to warn you about Windows NT services and shared resources. NT
Services have VERY HIGH security, and shared objects that they create, like
mutexes, will not be accessable to "regular", ie user, programs.
  
The way around this is to create your shared objects with empty but not NULL
security descriptors, or go ahead and fill in the security descriptor. There
are some knowledge base articles about how to do this.
 
At 05:53 PM 1/21/96 -0500, you wrote:
>
>Hi, I am creating an application using Visual C++2.0 in which the interface is
>written using VC whereas the application is in C. I have developed a System
>Log Interface in which the there is an external function WriteToLogFile() which
>is called by each of the prcesses/programs.  The Log File is created as a 
>mutex object and programs writing messages to Log File has to create
WriteToLogFile() function as a thread.  Now the problem is that there will
be background
>service programs that need to access this function and these background
programs
>are not initiated by my application. So my question is : 
>  1. Should I create this function as a DLL?
>  2. How do I make sure that each thread has been executed successfully?





| Вернуться в корень Архива |