#include "stdafx.h"
#include <comdef.h>
#using "RDUHandle.dll" //需要调取的DLL
using namespace RDUHandle;
using namespace std;
#pragma comment(lib, "comsupp.lib")
int __clrcall RDUHandel(unsigned int a, LPCSTR b, LPCSTR c, BSTR* d)
{
System::String^ s1 = gcnew System::String(b);
System::String^ s2 = gcnew System::String(c);
System::String^ s3 = "";
System::String^ s4 = "";
RDUHandle::Interface^ rduInterface = gcnew RDUHandle::Interface();
int ret = rduInterface->RDUHandel(a, s1, s2, s3, s4);
// System.String 转成 BSTR
char* t = (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(s3);
*d = _com_util::ConvertStringToBSTR(t);
return ret;
}