Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
Generaldetermine mouse button from System.EventArgs Pin
mookeroo29-Apr-04 1:16
mookeroo29-Apr-04 1:16 
GeneralRe: determine mouse button from System.EventArgs Pin
Stefan Troschuetz29-Apr-04 1:49
Stefan Troschuetz29-Apr-04 1:49 
GeneralRe: determine mouse button from System.EventArgs Pin
mookeroo29-Apr-04 1:53
mookeroo29-Apr-04 1:53 
GeneralRe: determine mouse button from System.EventArgs Pin
Syed Abdul Khader29-Apr-04 2:39
Syed Abdul Khader29-Apr-04 2:39 
GeneralRe: determine mouse button from System.EventArgs Pin
mookeroo29-Apr-04 2:32
mookeroo29-Apr-04 2:32 
GeneralWin32 Interop: Returning BSTR from ATL C++ DLL Pin
inter8ection29-Apr-04 0:07
inter8ection29-Apr-04 0:07 
GeneralRe: Win32 Interop: Returning BSTR from ATL C++ DLL Pin
Mike Dimmick29-Apr-04 0:53
Mike Dimmick29-Apr-04 0:53 
GeneralRe: Win32 Interop: Returning BSTR from ATL C++ DLL Pin
inter8ection29-Apr-04 1:06
inter8ection29-Apr-04 1:06 
Thanks for the reply. The cast seems to work fine, I have messagebox pop-ups in the C++ to debug it. The string is actually a comma-delimited string that i convert into an array of longs. This is all to avoid passing arrays through the interop boundary Sigh | :sigh: . Anyway, I have changed the c# declaration which wasn't working to this, which does work.

[DllImport(@"C:\MyDll.dll", CharSet = CharSet.Auto)]<br />
[return : MarshalAs(UnmanagedType.BStr)] public static extern string MyStringFunction( [MarshalAs(UnmanagedType.AnsiBStr)] string s );


i.e.: I return a BStr, but pass in an AnsiBstr. This works up to the point where the string grows to around 16384, which is 2^14. At that point, my c# function throws an exception:

Object reference not set to an instance of an object

Is there any limit to the size of string you can pass across the interop boundary?

Christopher

The bomb lives only as it is falling
GeneralRe: Win32 Interop: Returning BSTR from ATL C++ DLL Pin
Mike Dimmick29-Apr-04 2:15
Mike Dimmick29-Apr-04 2:15 
GeneralJustify alignment in c# ritchtextbox control!!! Pin
hassan azizi28-Apr-04 22:47
hassan azizi28-Apr-04 22:47 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart29-Apr-04 4:03
protectorHeath Stewart29-Apr-04 4:03 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi29-Apr-04 4:42
hassan azizi29-Apr-04 4:42 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart29-Apr-04 4:48
protectorHeath Stewart29-Apr-04 4:48 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi29-Apr-04 12:24
hassan azizi29-Apr-04 12:24 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart29-Apr-04 14:08
protectorHeath Stewart29-Apr-04 14:08 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 7:49
hassan azizi1-May-04 7:49 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart1-May-04 9:05
protectorHeath Stewart1-May-04 9:05 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 14:19
hassan azizi1-May-04 14:19 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart1-May-04 14:23
protectorHeath Stewart1-May-04 14:23 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi1-May-04 14:57
hassan azizi1-May-04 14:57 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart2-May-04 5:55
protectorHeath Stewart2-May-04 5:55 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
hassan azizi2-May-04 9:18
hassan azizi2-May-04 9:18 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
Heath Stewart2-May-04 10:09
protectorHeath Stewart2-May-04 10:09 
GeneralRe: Justify alignment in c# ritchtextbox control!!! Pin
ZyX3-Aug-10 3:32
ZyX3-Aug-10 3:32 
Questionis there any free rtf parser component? Pin
hassan azizi28-Apr-04 22:39
hassan azizi28-Apr-04 22:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.