C
Chip Gore
Hi -
I have some C++ code (functions) that I'm trying to create a C++ class
for that can be the used as part of a C# project.
(Very simplified)
The C# file
.....................................
using LightBinding;
namespace SrvLib
{
public class Bosco : MoreBosco
{
public static LBind LB;
public static void InitCache(string connectionString, string user,
string pswd, int timeout)
{
LB.DoConnect(connectionString, user, pswd, timeout);
}
#region Things
public override void StoreItem(CacheItem item)
{
bool jnk =
LB.SaveItem(LB.UseConnect(),item.Key,item.Value,false);
}
#endregion //Things
}
}
.....................................
And the LBind interfaces as seen "from metadata" are
.....................................
using System;
namespace LightBinding
{
public class LBind
{
public Bosco.LC_Database* LCdbConnection;
public LBind();
public void DoConnect(Bosco.d_string* conn, Bosco.d_string* user,
Bosco.d_string* password, int timeout);
public bool SaveItem(Bosco.LC_Database* db, sbyte* key, sbyte*
value, bool verbose);
public Bosco.LC_Database* UseConnect();
}
}
.....................................
And I'm getting compile errors for the C# project saying
'LightBinding.LBind.UseConnect()' is inaccessible due to its
protection level
I'm not sure what I need to do to my C++ and/or my C# to make this
method accessible. There are other public methods in the LBind class
(SaveItem(),DoConnect(), etc.) that seem to have the visibility and
the compiler doesn't complain about them.
"What am I missing?"
thanks
I have some C++ code (functions) that I'm trying to create a C++ class
for that can be the used as part of a C# project.
(Very simplified)
The C# file
.....................................
using LightBinding;
namespace SrvLib
{
public class Bosco : MoreBosco
{
public static LBind LB;
public static void InitCache(string connectionString, string user,
string pswd, int timeout)
{
LB.DoConnect(connectionString, user, pswd, timeout);
}
#region Things
public override void StoreItem(CacheItem item)
{
bool jnk =
LB.SaveItem(LB.UseConnect(),item.Key,item.Value,false);
}
#endregion //Things
}
}
.....................................
And the LBind interfaces as seen "from metadata" are
.....................................
using System;
namespace LightBinding
{
public class LBind
{
public Bosco.LC_Database* LCdbConnection;
public LBind();
public void DoConnect(Bosco.d_string* conn, Bosco.d_string* user,
Bosco.d_string* password, int timeout);
public bool SaveItem(Bosco.LC_Database* db, sbyte* key, sbyte*
value, bool verbose);
public Bosco.LC_Database* UseConnect();
}
}
.....................................
And I'm getting compile errors for the C# project saying
'LightBinding.LBind.UseConnect()' is inaccessible due to its
protection level
I'm not sure what I need to do to my C++ and/or my C# to make this
method accessible. There are other public methods in the LBind class
(SaveItem(),DoConnect(), etc.) that seem to have the visibility and
the compiler doesn't complain about them.
"What am I missing?"
thanks