Re: Access Violation using CCriticalSection in DLL
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sat, 07 Apr 2007 13:43:07 -0400
(a) show the code, including the declarations of all variables involved
(b) precisely where does the access violation happen (it doesn't happen "in the DLL", it
happens at a specific line of code somewhere!)
(c) what is the call stack when the access violation happens? Show the lines of code and
values at the point where your code invokes whatever operation is causing the access
fault.
joe
On Sat, 7 Apr 2007 09:27:56 -0600, "Brian Westcott" <bwestcott@xxxxxxx> wrote:
I have a log program that uses a CRiticalSection to synchronize writes toJoseph M. Newcomer [MVP]
the log file. It works OK in most of my programs. When I Load a DLL (That I
wrote) , I pass the address of the log program by reference to the DLL. When
I call the log program from within the DLL, I get an access violation when
the log program calls CCriticalSection::Lock after formatting the data to be
logged. When I compile and test all programs in Debug mode, the log program
works OK.
I am declaring the logger outside of the scope of my main program so
presumably that makes it global?
Can anyone tell me what is going on?
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Access Violation using CCriticalSection in DLL
- From: Brian Westcott
- Access Violation using CCriticalSection in DLL
- Prev by Date: Re: Access Violation using CCriticalSection in DLL
- Next by Date: Re: Is there a method in CString equivalent to std::string::replace?
- Previous by thread: Re: Access Violation using CCriticalSection in DLL
- Next by thread: issue with accessing methods of an activex control written in vc++6
- Index(es):
Relevant Pages
|