Click here to Skip to main content
14,605,656 members

Managed C++/CLI

 
AnswerRe: managed c++ or unmanaged c++ Pin
Jun Du12-Jul-06 4:32
MemberJun Du12-Jul-06 4:32 
Questiontrying to compile a C file in a C++ CLR project Pin
Super Lloyd11-Jul-06 20:47
MemberSuper Lloyd11-Jul-06 20:47 
AnswerRe: trying to compile a C file in a C++ CLR project Pin
Super Lloyd11-Jul-06 20:59
MemberSuper Lloyd11-Jul-06 20:59 
AnswerRe: trying to compile a C file in a C++ CLR project Pin
Jonas Hammarberg11-Jul-06 21:10
professionalJonas Hammarberg11-Jul-06 21:10 
QuestionSir, In C++ what functions get Added? Pin
CodeVarma10-Jul-06 15:28
MemberCodeVarma10-Jul-06 15:28 
AnswerRe: Sir, In C++ what functions get Added? [modified] Pin
Sebastian Schneider10-Jul-06 23:45
MemberSebastian Schneider10-Jul-06 23:45 
GeneralRe: Sir, In C++ what functions get Added? Pin
toxcct10-Jul-06 23:52
Membertoxcct10-Jul-06 23:52 
GeneralRe: Sir, In C++ what functions get Added? Pin
Sebastian Schneider11-Jul-06 1:10
MemberSebastian Schneider11-Jul-06 1:10 
QuestionDouble Buffering in Managed C++ Pin
Pavan Rao9-Jul-06 21:13
MemberPavan Rao9-Jul-06 21:13 
AnswerRe: Double Buffering in Managed C++ Pin
Jun Du10-Jul-06 4:18
MemberJun Du10-Jul-06 4:18 
GeneralRe: Double Buffering in Managed C++ Pin
Pavan Rao10-Jul-06 4:24
MemberPavan Rao10-Jul-06 4:24 
GeneralRe: Double Buffering in Managed C++ Pin
Sebastian Schneider10-Jul-06 4:45
MemberSebastian Schneider10-Jul-06 4:45 
GeneralRe: Double Buffering in Managed C++ Pin
mertadin21-Jul-06 3:13
Membermertadin21-Jul-06 3:13 
QuestionTAPI v dot net Pin
flippydeflippydebop8-Jul-06 20:55
Memberflippydeflippydebop8-Jul-06 20:55 
QuestionCan I use a vector of class objects? Pin
Suddha Talukdar8-Jul-06 13:07
MemberSuddha Talukdar8-Jul-06 13:07 
QuestionOwner drawn button in VC++ 2005 Pin
cshell497-Jul-06 4:09
Membercshell497-Jul-06 4:09 
AnswerRe: Owner drawn button in VC++ 2005 [modified] Pin
Nagaraju_Focus7-Jul-06 18:29
MemberNagaraju_Focus7-Jul-06 18:29 
GeneralRe: Owner drawn button in VC++ 2005 Pin
cshell497-Jul-06 18:54
Membercshell497-Jul-06 18:54 
QuestionConvertint .Pdf to .txt file Pin
Nagaraju_Focus7-Jul-06 0:30
MemberNagaraju_Focus7-Jul-06 0:30 
Questionexporting int array from c++ dll to c# client Pin
Tugberk_Kara6-Jul-06 21:06
MemberTugberk_Kara6-Jul-06 21:06 
I have a function in cpp file returning int * array and taking int * array as a parameter. It is as:

int * funcArg(int *a ) {
int DLLArg [] = {100,200,300};
a=DLLArg;

return a;
};

I have exported this function in the dll (i have checked it with dumpbin.exe)

But I can not handle this function in c# client. My code in c# is as: ( ıt gives this error. "An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayRankMismatchException' occurred in CSharpClient.exe

Additional information: Safe array of rank 51241 has been passed to a method expecting an array of rank 1."

What should I do? URGENT help!!!

namespace CSharpClient
{

class Class1
{
[DllImport("DenemeNonMfcDll.dll",EntryPoint="?Sub@DLLclass@@QAEHHH@Z")]
public extern static int Sub(int a, int b);

[DllImport("DenemeNonMfcDll.dll")]
[return: MarshalAs(UnmanagedType.SafeArray)]
public extern static int [] funcArg(int [] a);


public static int [] intArray = new int [3] {0,1,2} ;


static void Main(string[] args)
{


foreach (int num in funcArg(intArray) )
{
System.Console.WriteLine(num.ToString());
}

Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}
}
}




QuestionCan I use an MFC GUI component in .Net using managed C++? Pin
gunag6-Jul-06 4:42
Membergunag6-Jul-06 4:42 
QuestionNeed help in creating a pop-up window Pin
veenu_kvm5-Jul-06 1:25
Memberveenu_kvm5-Jul-06 1:25 
AnswerRe: Need help in creating a pop-up window Pin
Jun Du5-Jul-06 3:59
MemberJun Du5-Jul-06 3:59 
GeneralRe: Need help in creating a pop-up window Pin
veenu_kvm5-Jul-06 19:23
Memberveenu_kvm5-Jul-06 19:23 
GeneralRe: Need help in creating a pop-up window Pin
Jun Du6-Jul-06 3:34
MemberJun Du6-Jul-06 3:34 

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.