Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COM Interop #22

Open
kczx3 opened this issue Oct 14, 2016 · 2 comments
Open

COM Interop #22

kczx3 opened this issue Oct 14, 2016 · 2 comments

Comments

@kczx3
Copy link

kczx3 commented Oct 14, 2016

I am attempting to use this control through the Common Language Runtime via AutoHotkey. I am able to set values and create a GUI with the control in it. I am to the point of attempting to handle events now. I began with the ToolTips. Simply enabling them via table.EnableToolTips = True did not produce the default tooltip if the cell isn't showing all of the text. I am using some code created by the current developer of AutoHotkey to try and handle the event but am having difficulties. Here is the code -> https://autohotkey.com/boards/viewtopic.php?f=6&t=4633#p26497.

I am getting an error when my mouse hovers over a cell that shows the following,

************** Exception Text ************** System.InvalidOperationException: This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed. at System.StubHelpers.MngdSafeArrayMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome, Object pOriginalManaged) at XPTable.Models.Table.OnCellToolTipPopup(CellToolTipEventArgs e) at XPTable.Renderers.CellRenderer.OnMouseEnter(CellMouseEventArgs e) at XPTable.Models.Table.OnCellMouseEnter(CellMouseEventArgs e) at XPTable.Models.Table.RaiseCellMouseEnter(CellPos cellPos) at XPTable.Models.Table.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I'm having trouble determining what may be the problem and am curious if this assembly is not ComVisible. From my research, I believe that all assemblies are visible unless ComVisible is set to false. Hoping you can provide some insight. Thanks

@schoetbi
Copy link
Owner

I have no experience with autohotkey. But from what I have read .net classes should be comVisible by default. What changes to XP table do you suggest?
Tobias

@kczx3
Copy link
Author

kczx3 commented Oct 16, 2016

The problem is I have no experience with .Net either. Other than what I've read investigating this current issue I'm having. I tried setting ComVisible to True on the assembly and including System.Runtime.InteropServices but that did not fix the issue. At this point I have no suggestions to make. Just thought I'd pose the question.... figured it couldn't hurt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants