Still working on a problem that started from here
[Calling C++ dll function from C#: Of structs, strings and wchar\_t arrays.](https://stackoverflow.com/questions/680066/calling-c-dll-function-from-c-of-structs-strings-and-wchart-arrays), but with a different approach.

Following the example [Calling Managed Code from Unmanaged Code and vice-versa](http://www.codeproject.com/KB/mcpp/unmanaged_to_managed.aspx) I wrote a managed wrapper in C++ to access the unmanages class in the unmanaged C++ dll.

It looks like this:

```
//in header file
public __gc class TSSLDllWrapper
{
public:
TSSLDllWrapper();
     //this is the unmanaged class
CcnOCRsdk * _sdk;

bool convertHKID_Name(char *code, RECO_DATA *o_data);
};

//in .cpp file
TSSLDllWrapper::TSSLDllWrapper(void)
{
  _sdk = new CcnOCRsdk();
}

bool TSSLDllWrapper::convertHKID_Name(char *code, RECO_DATA *o_data)
{
return _sdk->convertHKID_Name(code, o_data);
}

//C++ RECO_DATA structure definition:
struct RECO_DATA{
wchar_t FirstName[200];
wchar_t Surname[200];
};

```

Now I have a dll that I can import into my C# project.

Here is the problem however:
When I want to call the method from the dll file, like this:

```
TSSLDllWrapper wrapper = new TSSLDllWrapper();
bool res = wrapper.convertHKID_NameSimple( //need to pass parameters here );

```

It expects the C++ parameters - pointers to char and RECO\_DATA.

How can I fix this and pass C++ types from C# code?