I'm Using Visual Studio 2003 to create an unmanaged C++ DLL that has a web reference to a C#, .net web service. In the C# web service, I am retrieving a .png image in one of my web methods.
In my C# component, I have a class that contains data types that will be consumed by my unmanaged C++ DLL. For example:
[StructLayout([login to view URL], CharSet=[login to view URL], Pack=1)]
public class MyClasssWithData
{
public bool m_Success;
public string[] m_stringArray;
public [login to view URL][] m_ErrorArray;
public byte[] maparray;
}
In the C++ DLL project, the generated header file from the web reference will create the following struct:
struct MyClasssWithData
{
bool m_Success;
BSTR *m_stringArray;
int __m_TagsArray_nSizeIs;
ErrorData *m_ErrorArray;
int __m_ErrorArray_nSizeIs;
ATLSOAP_BLOB maparray;
};
In the unmanaged C++ MFC DLL, I will create a dialog. I want to take the byte array "maparray" and convert that to an image and display it in the dialog.
## Deliverables
My basic requirements here are that I need the C++ source code for the dialog class that will display the image byte array passed from the web service. I will also accept suggestions on a better technique of an unmanaged C++ DLL retrieving/displaying an image from a web service.