T
Tim Mulholland
I think the problem i'm having is a little bigger than this, but i hope the
answer to this question will send me down the right path.
I'm calling the SendMessage API function from C#. I've got it so i cna send
the messages fine normally using this declaration:
[DllImport("User32.dll", CharSet=CharSet.Auto)]
public static extern uint SendMessage(IntPtr hWnd, int Msg, IntPtr wParam,
IntPtr lParam);
but i have a call that i need to make now that actually uses the wParam
value. (i had just been passing IntPtr.Zero in all other working cases).
this function requires wParam to be a string that specifies what should go
on when that message is received.
I've been looking through all kinds of information and can't figure out what
i'm supposed to do. Marshaling seems like the right direction, but you can't
Marshal a string without knowing the length at compiletime right? (so you
can set the [MarshalAs(UnmanagedType.ByValTStr, SizeConst=90)] type of
attributes and all that?)
So what are my options here?
Thanks in advance,
-Tim
answer to this question will send me down the right path.
I'm calling the SendMessage API function from C#. I've got it so i cna send
the messages fine normally using this declaration:
[DllImport("User32.dll", CharSet=CharSet.Auto)]
public static extern uint SendMessage(IntPtr hWnd, int Msg, IntPtr wParam,
IntPtr lParam);
but i have a call that i need to make now that actually uses the wParam
value. (i had just been passing IntPtr.Zero in all other working cases).
this function requires wParam to be a string that specifies what should go
on when that message is received.
I've been looking through all kinds of information and can't figure out what
i'm supposed to do. Marshaling seems like the right direction, but you can't
Marshal a string without knowing the length at compiletime right? (so you
can set the [MarshalAs(UnmanagedType.ByValTStr, SizeConst=90)] type of
attributes and all that?)
So what are my options here?
Thanks in advance,
-Tim