#include #include #include "tsupp.hxx" #define ITERS 25 void _CRTAPI1 main(int argc, char **argv) { IStorage *pstgFrom, *pstgTo; int i; SCODE sc; if (argc != 2) { printf("Usage: %s docfile\n", argv[0]); exit(1); } sc = StgOpenStorage(argv[1], NULL, ROOTP(STGM_READ), NULL, 0, &pstgFrom); if (FAILED(sc)) { printf("Can't open %s, %lX\n", argv[1], sc); exit(1); } for (i = 0; iCopyTo(pstgTo); if (FAILED(sc)) printf("Copy failed with %lX\n", sc); pstgTo->Release(); } pstgFrom->Release(); }