more fun with GetCommandLine()

Raymond mentioned this particular API once.  I mention it, because I had to call it today.  A certain third party app has existed for many years, happily calling CreateProcess() and not putting a space in the lpCommandLine string between the executable name and the first argument.  (I assume this was a bug, not intentional.) This worked for…

2

on CoUnmarshalInterface

CoUnmarshalInterface() and CoGetInterfaceAndReleaseStream() are not re-entrancy safe.  This has certain implications for objects that attempt to unmarshal interfaces into member variables, as a member of my team recently discovered. Suppose you have something that looks like this: class MyObject {public:    MyObject() { _pUnk = NULL; }    HRESULT DoStuff(IStream *pStream)   {      …       hr = CoUnmarshalInterface(pStream, IID_IUnknown,…

0