stream object
-
A function takes stream as input argument functionname(LPUNKNOWN pStream) I have character array and i need to use that function. How should i convert my array to LPUNKNOWN pStream
Typecast..
char arrc[10];
functionName((LPUNKNOWN) arrc); -
Typecast..
char arrc[10];
functionName((LPUNKNOWN) arrc); -
Typecast..
char arrc[10];
functionName((LPUNKNOWN) arrc);LPUNKNOWN is a pointer to a IUnknown interface (a COM object). You can't simply cast your string like that...
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++ -
A function takes stream as input argument functionname(LPUNKNOWN pStream) I have character array and i need to use that function. How should i convert my array to LPUNKNOWN pStream
LPUNKNOWN is a pointer to a IUnknown interface, which is a COM object. What are you trying to do exactly ? This is not the way you are supposed to work with the function. What is this function exactly ?
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++ -
A function takes stream as input argument functionname(LPUNKNOWN pStream) I have character array and i need to use that function. How should i convert my array to LPUNKNOWN pStream
-
A function takes stream as input argument functionname(LPUNKNOWN pStream) I have character array and i need to use that function. How should i convert my array to LPUNKNOWN pStream
You could try the following :) :
{
char chBuffer[] = "1234567890";
COleStreamFile cFile;
if (cFile.CreateMemoryStream()) {
cFile.Write(chBuffer, _countof(chFuffer));
// Assumed the function "functionname" destroys the passed (IStream*)
functionname(cFile.Detach());
}
} // Note: ~COleStreamFile() does not destroy the above detached streamvirtual void BeHappy() = 0;