Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all..
i am pasting line of code where i am getting problem.



when i debug code(pasted bellow)in XP ,get_tables(&_result)assign list of tables to _result and value of hr becomes S_OK,but if same code i try with windows7(32 bit),get_tables function is assigning NULL(0X00000) Value to _result...(that is not excepted)and value of hr becomes"the application called an interface that was marshalled for different thread" then ofter my application gets crashed...
why it is happening for windows7(32 bit)..
should i go for marshalleing thread???
or i need to change some settings for win7..
pls advice...
thanks in advance..

MIDL
// Append the new table
        m_pCatalog->Tables->Append(_variant_t((IDispatch *) pTableNew));




While debugging i go this point(see bellow)

inline TablesPtr _Catalog::GetTables ( ) {
struct Tables * _result;
HRESULT _hr = get_Tables(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return TablesPtr(_result, false);
}
Posted

1 solution

XP has no such fine access right control, so almost every thing works. Check the threading models of both threads, they should be the same as the marshalling type.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900