Thanks Ael GCHandle worked well And it solved my problem. Shaju Mathew
shajuMathew
Posts
-
Passing a Class to an Unmanaged function as parameter -
Passing a Class to an Unmanaged function as parameterThanks... Heath Stewart The tips helped .. But i cannot change class to struct. Since struct won't allow the same struct as a member Shaju Mathew
-
Passing a Class to an Unmanaged function as parameterHai all... I was trying to pass a class to an Unmanaged function. The class has a member of type, of the same class. Is it possible to pass a Managed class(Class having a member of it's own type) to an Unmanaged function. Thanks in advance:rose: Below is what i did... This is the class i created to pass into an Unmanaged function as parameter [StructLayout(LayoutKind.Explicit )] public class MyWindow { [FieldOffset (0)] public String className; [FieldOffset (16)] public String caption; [FieldOffset (32)] public MyWindow child ; } But if i remove the class member 'child' from the class it works well. Unmanaged function Decleration [DllImport("user32")] public static extern bool EnumChildWindows(int hwndParent, EnumChildDelegare lpEnumFunc, MyWindow lParam) ; This is the way how i call the unmanaged function MyWindow m = new MyWindow (); Win32Calls.EnumChildWindows (winHandle,w.enumChildDlgate ,m); And i am getting this error. An unhandled exception of type 'System.TypeLoadException' occurred in CSRecorder.exe Additional information: Can not marshal field child of type CSRecorder.MyWindow: This type can not be marshaled as a structure field. Shaju Mathew
-
Changing System Mouse Pointer ????Thanks......... Heath Stewart . Let me try. Regards Shaju MAthew
-
Changing System Mouse Pointer ????Hai, Sreejith As u told if i change the Cursor property of my Form or control, it will only change the cursor of my form. ie if i move the mouse out of my applications area then the cursor will be the cursor of the application below the cursor. But i want to have my cursor for the entire windows opened. You can see this behaviour of cursor in MS Spy. Thanks Shaju
-
Changing System Mouse Pointer ????Thanks Sreejith.. But that didnot solve my problem Because i want to change the entire desktop's cursor, ie the cursor of all applications. Not just my applications or forms cursor Thanks Shaju
-
Changing System Mouse Pointer ????Hi, I am developing an application like MS Spy. How can i change the mouse pointer of the entire desktop from my c# application. The mouse pointer should behave like the Finder Tool in the Microsoft Spy. Kindly give some idea. Thanks in advance Shaju Mathew
-
Text editor using c#hai there, i need your valuable information. i would like to create a text editor using c#. i got a trouble in displaying line numbers on left side of the TextBox Also i want the feature 'Add Breakpoint' in a panel near the texteditor. How can we get the position of a cursor with respect to the control. Thanks in advance. Regards, Shaju :)