string []URL = {"www.facebook.com","www.orkut.com","www.yahoo.com"};
Int32 result = URL.Length;
SetPolicyURL( URL,result );
this is my C# code where i am trying to pass the array of string to C++ Dll which is imported like this
[PreserveSig]
[DllImport("PawCtrl.dll", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void SetPolicyURL( string []policy, Int32 noURL);
but i am not able to receive it in my c++ DLL .
PAWCTRL_API void __stdcall SetPolicyURL( char ** URLpolicy, __int32 noURL)
{
for ( int i = 0; i < noURL; i++)
{
URLvector.push_back(URLpolicy[i]);
}
}
Please can any one help me how i should pass the function
thanks InAdvance