HI, thanks for the reply, i put the memset in the constructor. i am guessing that it has something do to with different heap memory allocated for dll, and AP? --------------------------.cpp--------------------------------------------------- CIPCamDll::CIPCamDll() { memset(&m_t,0,sizeof(s)); session_id = 13; return; } ------------------------.cpp------------------------------------------