36 SAMPLE CODE TO COPY - not active at the moment
42 STDMETHODIMP CPersistStream::NonDelegatingQueryInterface(REFIID
riid, __deref_out
void **ppv)
44 if (
riid == IID_IPersist) {
47 else if (
riid == IID_IPersistStream) {
132 (
void)StringCchPrintfW(Buff,
NUMELMS(Buff),L
"%011d ",
n);
133 return pIStream->Write(&(Buff[0]), 12*
sizeof(WCHAR),
NULL);
144 STDAPI_(
int) ReadInt(IStream *pIStream, __out HRESULT &
hr)
165 if (
wch>=L
'0' &&
wch<=L
'9') {
166 n = 10*
n+(int)(
wch-L
'0');
167 }
else if (
wch == L
' '
175 hr = VFW_E_INVALID_FILE_FORMAT;
185 if (
n==0x80000000 && Sign==-1) {
189 else return (
int)
n * Sign;
197 #pragma warning(disable: 4514)