- Timestamp:
- Sep 24, 1999, 11:49:45 PM (26 years ago)
- Location:
- trunk/src/ole32
- Files:
-
- 14 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/antimoniker.cpp
r993 r1033 1 /* $Id: antimoniker.cpp,v 1.2 1999-09-24 21:49:42 davidr Exp $ */ 1 2 /* 2 3 * AntiMonikers functions. -
trunk/src/ole32/clsid.cpp
r880 r1033 1 /* $Id: clsid.cpp,v 1. 7 1999-09-08 15:39:55davidr Exp $ */1 /* $Id: clsid.cpp,v 1.8 1999-09-24 21:49:42 davidr Exp $ */ 2 2 /* 3 3 * … … 293 293 } 294 294 295 // ---------------------------------------------------------------------- 296 // CONCRETE_IsEqualGUID 297 // ---------------------------------------------------------------------- 298 int WIN32API CONCRETE_IsEqualGUID(REFGUID rguid1, REFGUID rguid2) 299 { 300 return IsEqualGUID(rguid1, rguid2); 301 } 302 -
trunk/src/ole32/makefile
r993 r1033 21 21 22 22 OBJS = ole32.obj \ 23 antimoniker.obj \ 24 bindctx.obj \ 25 clsid.obj \ 26 compositemoniker.obj \ 27 datacache.obj \ 28 defaulthandler.obj \ 29 filemoniker.obj \ 30 guid.obj \ 31 hglobalstream.obj \ 32 initialise.obj \ 33 initterm.obj \ 34 itemmoniker.obj \ 35 iunknown.obj \ 36 library.obj \ 37 memlockbytes.obj \ 23 38 moniker.obj \ 24 antimoniker.obj \25 initterm.obj \26 39 oString.obj \ 27 clsid.obj \28 guid.obj \29 initialise.obj \30 taskmem.obj \31 library.obj \32 iunknown.obj \33 40 ole2.obj \ 41 oleobj.obj \ 42 oleClip.obj \ 43 oleDrag.obj \ 34 44 oleMenu.obj \ 35 oleDrag.obj \ 36 oleClip.obj \ 37 stubs.obj 45 stg_bigblockfile.obj \ 46 stg_stream.obj \ 47 storage.obj \ 48 stubs.obj \ 49 taskmem.obj 38 50 39 51 all: $(TARGET).dll $(TARGET).lib regsvr32.exe … … 60 72 61 73 62 oString.obj: oString.cpp 63 ole32.obj: ole32.cpp 64 ole2.obj: ole2.cpp 65 oleClip.obj: oleClip.cpp 66 oleDrag.obj: oleDrag.cpp 67 oleMenu.obj: oleMenu.cpp 68 initialise.obj: initialise.cpp 69 clsid.obj: clsid.cpp 70 guid.obj: guid.cpp 71 stubs.obj: stubs.cpp 72 initterm.obj: initterm.cpp 73 moniker.obj: moniker.cpp 74 taskmem.obj: taskmem.cpp 75 library.obj: library.cpp 76 iunknown.obj: iunknown.cpp 74 antimoniker.obj: antimoniker.cpp 75 bindctx.obj: bindctx.cpp 76 clsid.obj: clsid.cpp 77 compositemoniker.obj: compositemoniker.cpp 78 datacache.obj: datacache.cpp 79 defaulthandler.obj: defaulthandler.cpp 80 filemoniker.obj: filemoniker.cpp 81 guid.obj: guid.cpp 82 hglobalstream.obj: hglobalstream.cpp 83 initialise.obj: initialise.cpp 84 initterm.obj: initterm.cpp 85 iunknown.obj: iunknown.cpp 86 itemmoniker.obj: itemmoniker.cpp 87 library.obj: library.cpp 88 memlockbytes.obj: memlockbytes.cpp 89 moniker.obj: moniker.cpp 90 oString.obj: oString.cpp 91 ole2.obj: ole2.cpp 92 oleobj.obj: oleobj.cpp 93 ole32.obj: ole32.cpp 94 oleClip.obj: oleClip.cpp 95 oleDrag.obj: oleDrag.cpp 96 oleMenu.obj: oleMenu.cpp 97 stg_bigblockfile.obj: stg_bigblockfile.cpp 98 stg_stream.obj: stg_stream.cpp 99 storage.obj: storage.cpp 100 stubs.obj: stubs.cpp 101 taskmem.obj: taskmem.cpp 77 102 78 103 regsvr32.obj: regsvr32.cpp -
trunk/src/ole32/ole32.cpp
r872 r1033 1 /* $Id: ole32.cpp,v 1.1 0 1999-09-08 11:29:28davidr Exp $ */1 /* $Id: ole32.cpp,v 1.11 1999-09-24 21:49:43 davidr Exp $ */ 2 2 /* 3 3 * … … 22 22 23 23 #include "oString.h" 24 #include "moniker.h" // RunningObjectTableImpl_*** 24 #include "moniker.h" // RunningObjectTableImpl_*** 25 #include "filemoniker.h" // FileMonikerImpl_*** 25 26 26 27 // ====================================================================== … … 583 584 } 584 585 586 // ---------------------------------------------------------------------- 587 // GetClassFile 588 // ---------------------------------------------------------------------- 589 // This function supplies the CLSID associated with the given filename. 590 HRESULT WIN32API GetClassFile(LPOLESTR filePathName, CLSID *pclsid) 591 { 592 IStorage * pstg = 0; 593 HRESULT res; 594 int nbElm = 0; 595 int length = 0; 596 int i = 0; 597 LONG sizeProgId = 20; 598 LPOLESTR * pathDec = 0; 599 LPOLESTR absFile = 0; 600 LPOLESTR progId = 0; 601 WCHAR extention[100] = {0}; 602 603 dprintf(("OLE32: GetClassFile")); 604 605 // if the file contain a storage object the return the CLSID 606 // writen by IStorage_SetClass method 607 608 if((StgIsStorageFile(filePathName)) == S_OK) 609 { 610 res = StgOpenStorage(filePathName, NULL, STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &pstg); 611 612 if (SUCCEEDED(res)) 613 res = ReadClassStg(pstg, pclsid); 614 615 IStorage_Release(pstg); 616 617 return res; 618 } 619 620 /* if the obove strategies fail then search for the extension key in the registry */ 621 622 /* get the last element (absolute file) in the path name */ 623 nbElm = FileMonikerImpl_DecomposePath(filePathName, &pathDec); 624 absFile = pathDec[nbElm-1]; 625 626 /* failed if the path represente a directory and not an absolute file name*/ 627 if (lstrcmpW(absFile, (LPOLESTR)"\\")) 628 return MK_E_INVALIDEXTENSION; 629 630 /* get the extension of the file */ 631 length = lstrlenW(absFile); 632 for(i = length-1; ( (i >= 0) && (extention[i] = absFile[i]) ); i--); 633 634 /* get the progId associated to the extension */ 635 progId = (WCHAR *)CoTaskMemAlloc(sizeProgId); 636 637 res = RegQueryValueW(HKEY_CLASSES_ROOT, extention, progId, &sizeProgId); 638 639 if (res == ERROR_MORE_DATA) 640 { 641 CoTaskMemRealloc(progId,sizeProgId); 642 643 res = RegQueryValueW(HKEY_CLASSES_ROOT, extention, progId, &sizeProgId); 644 } 645 if (res == ERROR_SUCCESS) 646 /* return the clsid associated to the progId */ 647 res = CLSIDFromProgID(progId, pclsid); 648 649 for(i = 0; pathDec[i] != NULL; i++) 650 CoTaskMemFree(pathDec[i]); 651 652 CoTaskMemFree(pathDec); 653 654 CoTaskMemFree(progId); 655 656 if (res == ERROR_SUCCESS) 657 return res; 658 659 return MK_E_INVALIDEXTENSION; 660 } 585 661 // ====================================================================== 586 662 // Private functions. -
trunk/src/ole32/ole32.h
r872 r1033 1 /* $Id: ole32.h,v 1. 8 1999-09-08 11:29:28davidr Exp $ */1 /* $Id: ole32.h,v 1.9 1999-09-24 21:49:44 davidr Exp $ */ 2 2 /* 3 3 * … … 38 38 #include <winreg.h> 39 39 40 #include " wine/obj_base.h"41 #include "wine/obj_misc.h" 40 #include "objbase.h" 41 42 42 #include "wine/obj_inplace.h" 43 #include "wine/obj_dataobject.h"44 43 #include "wine/obj_oleobj.h" 45 #include "wine/obj_marshal.h"46 #include "wine/obj_moniker.h"47 #include "wine/obj_clientserver.h"48 #include "wine/obj_dragdrop.h"49 44 #include "wine/obj_surrogate.h" 45 #include "wine/obj_oleview.h" 46 #include "wine/obj_cache.h" 50 47 51 48 #endif -
trunk/src/ole32/stubs.cpp
r993 r1033 1 /* $Id: stubs.cpp,v 1. 8 1999-09-20 20:38:20davidr Exp $ */1 /* $Id: stubs.cpp,v 1.9 1999-09-24 21:49:45 davidr Exp $ */ 2 2 /* 3 3 * Win32 COM/OLE stubs for OS/2 … … 222 222 //******************************************************************************* 223 223 //******************************************************************************* 224 HRESULT WIN32API CreateBindCtx(DWORD reserved, LPBC *ppbc)225 {226 dprintf(("OLE32: CreateBindCtx - stub"));227 return E_OUTOFMEMORY;228 }229 //*******************************************************************************230 //*******************************************************************************231 HRESULT WIN32API CreateDataAdviseHolder(IDataAdviseHolder **ppDAHolder)232 {233 dprintf(("OLE32: CreateDataAdviseHolder - stub"));234 return E_OUTOFMEMORY;235 }236 //*******************************************************************************237 //*******************************************************************************238 HRESULT WIN32API CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid,239 REFIID riid, LPVOID *ppvObj)240 {241 dprintf(("OLE32: CreateDataCache - stub"));242 return E_OUTOFMEMORY;243 }244 //*******************************************************************************245 //*******************************************************************************246 HRESULT WIN32API CreateFileMoniker(LPCOLESTR lpszPathName, LPMONIKER *ppmk)247 {248 dprintf(("OLE32: CreateFileMoniker - stub"));249 return E_OUTOFMEMORY;250 }251 //*******************************************************************************252 //*******************************************************************************253 HRESULT WIN32API CreateGenericComposite(LPMONIKER pmkFirst, LPMONIKER pmkRest,254 LPMONIKER *ppmkComposite)255 {256 dprintf(("OLE32: CreateGenericComposite - stub"));257 return E_OUTOFMEMORY;258 }259 //*******************************************************************************260 //*******************************************************************************261 HRESULT WIN32API CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease,262 ILockBytes **ppkLkbyt)263 {264 dprintf(("OLE32: CreateILockBytesOnHGlobal - stub"));265 return E_OUTOFMEMORY;266 }267 //*******************************************************************************268 //*******************************************************************************269 HRESULT WIN32API CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, LPMONIKER *ppmk)270 {271 dprintf(("OLE32: CreateItemMoniker - stub"));272 return E_OUTOFMEMORY;273 }274 //*******************************************************************************275 //*******************************************************************************276 HRESULT WIN32API CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder)277 {278 dprintf(("OLE32: CreateOleAdviseHolder - stub"));279 return E_OUTOFMEMORY;280 }281 //*******************************************************************************282 //*******************************************************************************283 224 HRESULT WIN32API CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk) 284 225 { … … 288 229 //******************************************************************************* 289 230 //******************************************************************************* 290 HRESULT WIN32API CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease,291 LPSTREAM *ppstm)292 {293 dprintf(("OLE32: CreateStreamOnHGlobal - stub"));294 return E_OUTOFMEMORY;295 }296 //*******************************************************************************297 //*******************************************************************************298 231 HRESULT WIN32API DllDebugObjectRPCHook() 299 232 { … … 321 254 dprintf(("OLE32: EnableHookObject, UNKNOWN API - stub")); 322 255 return 0; 323 }324 //*******************************************************************************325 //*******************************************************************************326 HRESULT WIN32API GetClassFile(LPCWSTR szFileName, CLSID *pclsid)327 {328 dprintf(("OLE32: GetClassFile - stub"));329 return MK_E_CANTOPENFILE;330 256 } 331 257 //******************************************************************************* … … 345 271 //******************************************************************************* 346 272 //******************************************************************************* 347 HRESULT WIN32API GetHGlobalFromILockBytes(ILockBytes *pLkbyt, HGLOBAL *phglobal)348 {349 dprintf(("OLE32: GetHGlobalFromILockBytes - stub"));350 return E_INVALIDARG;351 }352 //*******************************************************************************353 //*******************************************************************************354 HRESULT WIN32API GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)355 {356 dprintf(("OLE32: GetHGlobalFromStream - stub"));357 return E_INVALIDARG;358 }359 //*******************************************************************************360 //*******************************************************************************361 273 HRESULT WIN32API GetHookInterface() 362 274 { … … 373 285 //******************************************************************************* 374 286 //******************************************************************************* 375 BOOL WIN32API CONCRETE_IsEqualGUID(REFGUID rguid1, REFGUID rguid2)376 {377 dprintf(("OLE32: IsEqualGUID - stub"));378 return FALSE;379 }380 //*******************************************************************************381 //*******************************************************************************382 287 HRESULT WIN32API IsValidIid(DWORD Iid) 383 288 { … … 405 310 { 406 311 dprintf(("OLE32: MkParseDisplayName - stub")); 407 return E_OUTOFMEMORY;408 }409 //*******************************************************************************410 //*******************************************************************************411 HRESULT WIN32API MonikerCommonPrefixWith(LPMONIKER pmkThis, LPMONIKER pmkOther,412 LPMONIKER *ppmkCommon)413 {414 dprintf(("OLE32: MonikerCommonPrefixWith - stub"));415 312 return E_OUTOFMEMORY; 416 313 } … … 476 373 //******************************************************************************* 477 374 //******************************************************************************* 478 HRESULT WIN32API OleCreateDefaultHandler(REFCLSID clsid, LPUNKNOWN pUnkOuter,479 REFIID riid, LPVOID *ppvObj)480 {481 dprintf(("OLE32: OleCreateDefaultHandler - stub"));482 return(E_OUTOFMEMORY);483 }484 //*******************************************************************************485 //*******************************************************************************486 375 HRESULT WIN32API OleCreateEmbeddingHelper(REFCLSID clsid, LPUNKNOWN pUnkOuter, 487 376 DWORD flags, LPCLASSFACTORY pCF, … … 610 499 //******************************************************************************* 611 500 //******************************************************************************* 612 HRESULT WIN32API OleLoadFromStream(IStream *pStm, REFIID iidInterface, void** ppvObj)613 {614 dprintf(("OLE32: OleLoadFromStream - stub"));615 return(E_OUTOFMEMORY);616 }617 //*******************************************************************************618 //*******************************************************************************619 501 HRESULT WIN32API OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses) 620 502 { … … 673 555 dprintf(("OLE32: OleRun - stub")); 674 556 return(E_UNEXPECTED); 675 }676 //*******************************************************************************677 //*******************************************************************************678 HRESULT WIN32API OleSaveToStream(IPersistStream *pPStm, IStream *pStm)679 {680 dprintf(("OLE32: OleSaveToStream - stub"));681 return(STG_E_MEDIUMFULL);682 557 } 683 558 //******************************************************************************* … … 714 589 //******************************************************************************* 715 590 //******************************************************************************* 716 HRESULT WIN32API ReadClassStg(IStorage *pStg, CLSID *pclsid)717 {718 dprintf(("OLE32: ReadClassStg - stub"));719 return(E_OUTOFMEMORY);720 }721 //*******************************************************************************722 //*******************************************************************************723 591 HRESULT WIN32API ReadClassStm(IStream *pStm, CLSID *pclsid) 724 592 { … … 757 625 //******************************************************************************* 758 626 //******************************************************************************* 759 HRESULT WIN32API StgCreateDocfile(const WCHAR *pwcsName, DWORD grfMode,760 DWORD reserved, IStorage **ppstgOpen)761 {762 dprintf(("OLE32: StgCreateDocfile - stub"));763 return(STG_E_INSUFFICIENTMEMORY);764 }765 //*******************************************************************************766 //*******************************************************************************767 627 HRESULT WIN32API SetDocumentBitStg() 768 628 { 769 629 dprintf(("OLE32: SetDocumentBitStg, UNKNOWN API - stub")); 770 630 return(E_OUTOFMEMORY); 771 }772 //*******************************************************************************773 //*******************************************************************************774 HRESULT WIN32API StgCreateDocfileOnILockBytes(ILockBytes *plkbyt, DWORD grfMode,775 DWORD reserved, IStorage **ppstgOpen)776 {777 dprintf(("OLE32: StgCreateDocfileOnILockBytes - stub"));778 return(STG_E_INSUFFICIENTMEMORY);779 }780 //*******************************************************************************781 //*******************************************************************************782 HRESULT WIN32API StgIsStorageFile(const WCHAR *pwcsName)783 {784 dprintf(("OLE32: StgIsStorageFile - stub"));785 return(S_FALSE);786 }787 //*******************************************************************************788 //*******************************************************************************789 HRESULT WIN32API StgIsStorageILockBytes(ILockBytes *plkbyt)790 {791 dprintf(("OLE32: StgIsStorageILockBytes - stub"));792 return(S_FALSE);793 }794 //*******************************************************************************795 //*******************************************************************************796 HRESULT WIN32API StgOpenStorage(const WCHAR *pwcsName, IStorage *pstgPriority,797 DWORD grfMode, SNB snbExclude, DWORD reserved,798 IStorage **ppstgOpen)799 {800 dprintf(("OLE32: StgOpenStorage - stub"));801 return(STG_E_INSUFFICIENTMEMORY);802 }803 //*******************************************************************************804 //*******************************************************************************805 HRESULT WIN32API StgOpenStorageOnILockBytes(ILockBytes *plkbyt,806 IStorage *pstgPriority,807 DWORD grfMode, SNB snbExclude,808 DWORD reserved,809 IStorage **ppstgOpen)810 {811 dprintf(("OLE32: StgOpenStorageOnILockBytes - stub"));812 return(STG_E_INSUFFICIENTMEMORY);813 631 } 814 632 //******************************************************************************* … … 847 665 dprintf(("OLE32: UtGetDvtd32Info, UNKNOWN API - stub")); 848 666 return(E_OUTOFMEMORY); 849 }850 //*******************************************************************************851 //*******************************************************************************852 HRESULT WIN32API WriteClassStg(IStorage *pStg, REFCLSID rclsid)853 {854 dprintf(("OLE32: WriteClassStg - stub"));855 return(STG_E_MEDIUMFULL);856 667 } 857 668 //*******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.