EDN Admin
Well-known member
I want to pass window Handle to my COM from c#.
in IDL [id(17), helpstring("method SetWindowHandle")] HRESULT SetWindowHandle([in]LONG_PTR** hwnd);
in .cppSTDMETHODIMP CActiveIXFSSIU::SetWindowHandle(LONG_PTR** hwnd)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
this->m_hWnd = (HWND)&hwnd;
return S_OK;
}
in C#;private void button2_Click(object sender, EventArgs e)
{
AXT.SetWindowHandle(this.Handle);
}
but my program is not working....
View the full article
in IDL [id(17), helpstring("method SetWindowHandle")] HRESULT SetWindowHandle([in]LONG_PTR** hwnd);
in .cppSTDMETHODIMP CActiveIXFSSIU::SetWindowHandle(LONG_PTR** hwnd)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
this->m_hWnd = (HWND)&hwnd;
return S_OK;
}
in C#;private void button2_Click(object sender, EventArgs e)
{
AXT.SetWindowHandle(this.Handle);
}
but my program is not working....

View the full article