So, I've written a web service in c#, which has a method for signing a hash. This web service is a WCF Service application. Then, I've created a c# Console application where I've written a function to consume this web service. The declaration of the function which calls the web service is that:
class Program
{
public byte[] callWS(string alias, byte[] myHash,string myPassword)
{
IhashSignSVCClient client = new IhashSignSVCClient();
byte[] signedData= client.SignandReturn(alias, myhash, myPassword);
if (signedData != null)
{
Console.WriteLine(signedData);
return signedData;
}
return null;
}
}
This web service works fine. Now I want to build a c++ wrapper class over this c# method, because I want to call this web service from unmanaged code and I thought that creating a c++ wrapper class will be a good idea. Can anyone help me with a kind of a structure of this wrapper class? I haven't understood very well the conversions between c++ and c#. I've created a C++ CLR class library, with a ref class which will contain my c++ method to call this c# method, but I still have some problems with the type of parameters of this function.