End Google Ads 201810 - BS.net 01 --> Hello everyone,

I'm hoping someone can point me in the right direction with a little project I'm working on!

I have a collection of third-party C-style DLLs that I am using in my own UNmanaged C++ DLL. My goal was to wrap these functions into my own DLL and then write a VB6 COM based DLL to wrap my C-style DLL so that I can use these functions in a VBScript ASP page. Whether or not this makes sense, I've done this before and had good success, so I was going to try it again.

However, the third-party C-style DLLs are returning Unicode strings, and I actually NEED to support multiple ********s. When I pass these Unicode strings to the VB6 app, they'll be converted to the ANSI character set for the locale of the IIS server (i.e. char* rather than wchar_t*), so presumably they will be converted to some Western European ANSI character set. I'm not sure how the .ASP page will handle passing the strings to/from the VB6 COM DLL wrapper, but I'm guessing it will be a straight Unicode call, so there is probably not a conversion problem there, but maybe I'm wrong about that!

Maybe I could handle the conversion of Unicode->ANSI (wchar_t -> char) myself, using the appropriate codepage for the user's ********, and there also seem to be some workarounds using VarPtr or StrPtr to pass Unicode between VB6 and C++.

At this point, I'm pretty sure I could hack out some solution, but I was really looking for an elegant/"correct" way to handle this. I don't have much experience with the .NET solutions like ASP .NET, but I would be open to writing the small web page that I will need as a frontend in whatever ********/framework is most appropriate.

Basically, I need to have a web page that is capable of calling these third party unmanaged C++ DLLs and to receive and display the results on a web page in multiple ********s. Is (C++ DLL->ANSI)(ANSI->Unicode->VB6 COM DLL->Unicode).ASP an appropriate way to go? Is there a better way than wrap my C++ DLL in the VB6 COM DLL? Should I use a .NET wrapper (using PInvoke, from what I've seen) on the third-party DLLs and use ASP .NET to call the managed .NET wrapper directly? Not sure exactly how to do that, so if that's a good choice, any pointers appreciated.

Thanks for your help!
Corey