Hello,everyone!
I am developing a XPCOM component which will be embedded to Mozilla.
Mainly I send message
(::SendMessage(hwnd,WM_COPYDATA,cpd.cbData,(LPARAM)&cpd);) to xpcom Which is
used to call method "nsIDOMHTMLInputElement.click()", so that can hand over
something. when i do this the mozilla was shutdown! Who can tell me , that's
why ? thanks !
Here is part of code :
Receivedata(WPARAM wparam, LPARAM lparam)
{
....
COPYDATASTRUCT *pCopyDataStruct = new COPYDATASTRUCT();
pCopyDataStruct=(COPYDATASTRUCT*)lparam;
switch(pCopyDataStruct->dwData){
case SSETCONTENTSUBMIT :
Fill_SubmitFormContent((unsigned char *)pCopyDataStruct->lpData,Curdom
,pCopyDataStruct \ ->cbData);
....
}
....
}
BOOL FindSubmitButton(nsIDOMDocument *docdom)
{
......
if(Compare_Emstr(nsEmtype,nssubmit)) {
#ifdef SOMEONE_DEBUG
char * szBuf=(char *)malloc(50*sizeof(char));
wsprintf(szBuf, "inputElement is %0x", inputElement);
OutputDebugString(szBuf);
free(szBuf);
#endif
inputElement->Click();
//formElement->Submit();
return TRUE;
}
....
}
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom