Click here to Skip to main content
15,920,828 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Question.NET & firefox Pin
Emily.r25-Jan-06 6:19
Emily.r25-Jan-06 6:19 
AnswerRe: .NET & firefox Pin
Matthew Hazlett25-Jan-06 14:34
Matthew Hazlett25-Jan-06 14:34 
QuestionWorkaround for Raw sockets in Windows XP SP2? Pin
Tom Paluzzi25-Jan-06 4:52
Tom Paluzzi25-Jan-06 4:52 
QuestionCan C++ be used to create a powerful web app? Pin
larryfran24-Jan-06 19:24
larryfran24-Jan-06 19:24 
AnswerRe: Can C++ be used to create a powerful web app? Pin
James Gupta25-Jan-06 1:38
professionalJames Gupta25-Jan-06 1:38 
AnswerRe: Can C++ be used to create a powerful web app? Pin
Dave Kreskowiak25-Jan-06 1:53
mveDave Kreskowiak25-Jan-06 1:53 
AnswerRe: Can C++ be used to create a powerful web app? Pin
Kevin McFarlane26-Jan-06 6:52
Kevin McFarlane26-Jan-06 6:52 
QuestionHow to import C# structs into MC++ without loss of inheritance connectivity Pin
chervu24-Jan-06 10:45
chervu24-Jan-06 10:45 
Hello,

I have a C# interface with a method carrying C# structs(inherted from System.ValueType whose base class is System.Object). I implemented this interface in MC++ adapter class. Pasting the sample code below:
eg:
//C# interface definition:
public interface ISrv
{
void Ping(PingIn aPing_in, ref PingOut aPing_out);

}

[StructLayout(LayoutKind.Sequential)]
[Serializable]
[Guid("C6497AEF-1839-45bd-AFAC-E533D7A03225")]
public struct PingIn
{
public Int32 flag;
public Guid lockId;

}

[StructLayout(LayoutKind.Sequential)]
[Serializable]
[Guid("B6BC3BEB-2FA2-45c6-B64A-434CE00F6A55")]
public struct PingOut
{
public Int32 status;
public Int32 lockStatus;
public Int32 nFailures;
[MarshalAs(UnmanagedType.SafeArray,SafeArraySubType=VarEnum.VT_I4)]
public Int32[] list;
public Int32 state;
public UInt32 errMsgId;
}

//MC++ class implementing ISrv interface

public __gc class AimAdapter: public ISrv
{
///c'tor
:
:
:
void Ping( [In] nsIAimServer::PingIn aPing_in,
[In,Out] nsIAimServer::PingOut* aPing_out)
{

}
:
:
:
:

};

When tried to use aPing_out in Marshal:;StructureToPtr() to convert to IntPtr, I received compilation error for casting. For some reason aPing_out lost its connectivity to System.ValueType (whose base class is System.Object). Is there a special way to maintain this connecitivity while implementing C# interface in MC++? Can you please clarify?


-- modified at 16:45 Tuesday 24th January, 2006
QuestionFilling a ListView is too slow. Pin
luke72724-Jan-06 6:42
luke72724-Jan-06 6:42 
AnswerRe: Filling a ListView is too slow. Pin
Ray Cassick24-Jan-06 7:14
Ray Cassick24-Jan-06 7:14 
GeneralRe: Filling a ListView is too slow. Pin
luke72724-Jan-06 9:04
luke72724-Jan-06 9:04 
AnswerRe: Filling a ListView is too slow. Pin
Daniel Grunwald24-Jan-06 8:48
Daniel Grunwald24-Jan-06 8:48 
GeneralRe: Filling a ListView is too slow. Pin
luke72724-Jan-06 9:14
luke72724-Jan-06 9:14 
AnswerRe: Filling a ListView is too slow. Pin
luke72724-Jan-06 21:04
luke72724-Jan-06 21:04 
GeneralRe: Filling a ListView is too slow. Pin
Daniel Grunwald25-Jan-06 4:16
Daniel Grunwald25-Jan-06 4:16 
GeneralRe: Filling a ListView is too slow. Pin
Dan Neely25-Jan-06 5:39
Dan Neely25-Jan-06 5:39 
AnswerRe: Filling a ListView is too slow. Pin
luke72725-Jan-06 7:34
luke72725-Jan-06 7:34 
QuestionCulture and TwoLetterISOLanguageName Pin
Alsvha24-Jan-06 3:40
Alsvha24-Jan-06 3:40 
AnswerRe: Culture and TwoLetterISOLanguageName Pin
lmoelleb24-Jan-06 21:18
lmoelleb24-Jan-06 21:18 
QuestionInvokeMember and [out] parameter from COM Pin
QuaKx23-Jan-06 20:50
QuaKx23-Jan-06 20:50 
Question2005 Posters Pin
Jack Puppy23-Jan-06 13:52
Jack Puppy23-Jan-06 13:52 
AnswerRe: 2005 Posters Pin
Paul Conrad23-Jan-06 18:45
professionalPaul Conrad23-Jan-06 18:45 
Questionvc 2005 and Manifests Pin
Swinefeaster23-Jan-06 13:32
Swinefeaster23-Jan-06 13:32 
QuestionPassword Textbox Pin
Paul Conrad23-Jan-06 10:58
professionalPaul Conrad23-Jan-06 10:58 
AnswerRe: Password Textbox Pin
Dave Kreskowiak23-Jan-06 11:02
mveDave Kreskowiak23-Jan-06 11:02 

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.