I'm calling the C++ function below from C#:
GENCLIENT_API int CleanseEx(char ncSystem, const char *strServer,
const char **pNames, const char **pInputData,
const char **pRules, char ***pOutputData) ;
I can call this function from a console application however when I attempt
to use the same code from within a web service I get the following error:
*************** *************** *************** ************
An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException'
occurred in system.web.serv ices.dll
Additional information: Server was unable to process request. --> Object
reference not set to an instance of an object.
*************** *************** *************** ************
I'm spinning my wheels trying to figure out if this is a pointer problem or
a code access securing problem, etc... Below are the variables and method
call from my C# application:
[DllImport(@"d:\ tempdlllocation \genclient.dll" ,
arSet.Ansi,
EntryPoint="Cle anseEx")]
private unsafe static extern int CleanseEx(char SystemId, string Server,
string[]Names, string[] InputData, string[] Rules, byte*** OutputData);
int retCode;
char _SystemId = 'G';
string _Server = "TestServer ";
string[] _Names = new string[100];
string[] _Rules = new string[100];
string[] outputData = new string[100];
....... the various arrays are populated with data values.
unsafe
{
byte ** pOutput = null;
retCode = CleanseEx(_Syst emId, _Server, _Names, _InputData, _Rules, &pOutput);
..... code fails on the call above when calling from web service.
}
.......
Any help or recommendations would be really appreciated.