<html><div style='background-color:'><DIV class=RTE>
<P>I used Python as embeded in C++ program, which is made up of a EXE and a 
DLL. Py_Initialize() and Py_Finalize() are put in DllMain().</P>
<P>But everytime after the program starts, an "Access Violation" will be 
thrown. I looked up the Assembly code, the crash appears after 
Py_Finalize() returns:</P>
<P><EM> }else if(dwReason == DLL_PROCESS_DETACH){</EM><BR><FONT 
color=#999999>1000B4B9  test        
eax,eax <BR>1000B4BB  
jne         DllMain+23h (1000B4C3h) 
<BR></FONT><EM>  Py_Finalize();</EM><BR><FONT 
color=#999999>1000B4BD  call        
dword ptr [__imp__Py_Finalize (1000E1A0h)] 
</FONT><BR><EM> }<BR> return true;<BR></EM><FONT 
color=#999999>1000B4C3  
mov         
al,1 </FONT>       
<-------------------------- 0xC0000005 thrown by 
here<BR><EM>}</EM><BR><FONT color=#999999>1000B4C5  
ret         0Ch  </FONT></P>
<P> </P>
<P>What may be the probable reason that caused this error? Thank 
you:)</P></DIV></div></html>