Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to pass a one dimensional array to vc++ managed DLL,in visual studio 2008.Dll is created.In, During building time it's give one error.

What I have tried:


error BC30657: 'abc' has a return type that is not supported or parameter
type that are not supported .


//My Dll code // MyCDll.h

#pragma once

using namespace System;
#include "stdafx.h"

namespace MyCDll
public ref class Class1
static int abc(int nu[])
int i,value=0;

for (i=1;i<5;i++)

//Return the position of the number in the array.
return value;

The code:

Imports System.IO
Imports System.Runtime.InteropServices
Module Module1
'Dim result As Integer

Sub Main()
Dim nums() As Integer = New Integer() {1, 2, 3, 4, 5, 6}
'Dim nums() As Integer = {1, 2, 3, 4, 5, 6}
Dim obj As New MyCDll.Class1

Console.WriteLine( nums() As Integer)As Integer)

'result = nums()As Integer)

End Sub

End Module

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900