Click here to Skip to main content
15,909,039 members
Home / Discussions / C#
   

C#

 
AnswerRe: @^@ how to handle a pointer returned by a COM interface Pin
Jared Parsons26-Mar-06 20:19
Jared Parsons26-Mar-06 20:19 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
Jared Parsons27-Mar-06 5:57
Jared Parsons27-Mar-06 5:57 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee27-Mar-06 14:24
dragooooon lee27-Mar-06 14:24 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
Jared Parsons27-Mar-06 19:26
Jared Parsons27-Mar-06 19:26 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee27-Mar-06 19:38
dragooooon lee27-Mar-06 19:38 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee27-Mar-06 19:28
dragooooon lee27-Mar-06 19:28 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
Jared Parsons27-Mar-06 19:29
Jared Parsons27-Mar-06 19:29 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee27-Mar-06 19:41
dragooooon lee27-Mar-06 19:41 
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(853b4626-393a-44df-b13e-64cabe535dbf),
nonextensible,
pointer_default(unique)
]
interface IMyComponent : IUnknown
{
[id(1), helpstring("method Initialize")] void * __stdcall Print(BSTR msg);
};



[uuid(0c6bb614-8563-49ea-b5ce-e6b7febebc27)]
coclass RtpSource
{
interface IMyComponent ;
};
------------------------------------------------------------
C# code
IntPtr p = ((IMyComponent)rtpsource).Print(s);
StringBuilder sb = new StringBuilder();
sb.Append(Marshal.PtrToStringBSTR(p));

Vincent
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
Jared Parsons28-Mar-06 6:49
Jared Parsons28-Mar-06 6:49 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee28-Mar-06 16:17
dragooooon lee28-Mar-06 16:17 
GeneralRe: @^@ how to handle a pointer returned by a COM interface Pin
dragooooon lee28-Mar-06 16:20
dragooooon lee28-Mar-06 16:20 
QuestionSetting Application Args when creating AppDomain Pin
Tristan Rhodes26-Mar-06 12:03
Tristan Rhodes26-Mar-06 12:03 
QuestionWindows Versions Pin
Tyrus18226-Mar-06 11:34
Tyrus18226-Mar-06 11:34 
AnswerRe: Windows Versions Pin
Steve Pullan26-Mar-06 11:52
Steve Pullan26-Mar-06 11:52 
QuestionDisconnect from Sql Server Pin
Mark0626-Mar-06 9:42
Mark0626-Mar-06 9:42 
AnswerRe: Disconnect from Sql Server Pin
Guffa26-Mar-06 9:50
Guffa26-Mar-06 9:50 
QuestionAccess GridViewCell Columns by string Key Pin
Monin D.26-Mar-06 9:32
Monin D.26-Mar-06 9:32 
QuestionDebugging Windows Service Pin
Mircea Grelus26-Mar-06 9:13
Mircea Grelus26-Mar-06 9:13 
AnswerRe: Debugging Windows Service Pin
Luis Alonso Ramos26-Mar-06 17:08
Luis Alonso Ramos26-Mar-06 17:08 
GeneralRe: Debugging Windows Service Pin
Mircea Grelus28-Mar-06 8:10
Mircea Grelus28-Mar-06 8:10 
QuestionChecking DB existance Pin
Mridang Agarwalla26-Mar-06 8:38
Mridang Agarwalla26-Mar-06 8:38 
AnswerRe: Checking DB existance Pin
Colin Angus Mackay26-Mar-06 10:49
Colin Angus Mackay26-Mar-06 10:49 
QuestionDeploying and Loading an assembly Pin
Subby Dev26-Mar-06 8:00
Subby Dev26-Mar-06 8:00 
QuestionFlateStyle.System Button Pin
Gamil Mohamad26-Mar-06 6:17
Gamil Mohamad26-Mar-06 6:17 
AnswerRe: FlateStyle.System Button Pin
AB777126-Mar-06 17:09
AB777126-Mar-06 17:09 

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.