diff --git a/pkgs/racket-test/tests/racket/com.rkt b/pkgs/racket-test/tests/racket/com.rkt index 1d4864fc1e..a7935b7628 100644 --- a/pkgs/racket-test/tests/racket/com.rkt +++ b/pkgs/racket-test/tests/racket/com.rkt @@ -86,7 +86,6 @@ (test (void) (com-unregister-event-callback mzcom "SchemeError")) (test (void) ((sync exec))) (test #t (regexp-match? #rx"bad" recved)) - (test #f (com-iunknown? mzcom)) (test #t (com-iunknown? (com-object-get-iunknown mzcom))) (test #t (com-iunknown? (com-object-get-idispatch mzcom))) @@ -116,7 +115,6 @@ (and (regexp-match #rx"released" (exn-message exn)) 'no))]) (com-invoke mzcom2 "About")))) - (define ie (com-create-instance "InternetExplorer.Application.1")) (test #t (and (member "Visible" (com-get-properties ie)) #t)) (test #t (and (member "Visible" (com-set-properties ie)) #t)) @@ -133,7 +131,7 @@ (define doc (com-get-property ie "Document")) (test #t (com-object? doc)) - (test "The Racket Language" (com-get-property ie "Document" "title")) + (test "Racket" (com-get-property ie "Document" "title")) (test (void) (com-set-property! ie "Document" "title" "The Racket Documentation")) (test "The Racket Documentation" (com-get-property ie "Document" "title")) (test '(-> () string) #:alts '((-> () any)) (com-get-property-type doc "title")) diff --git a/racket/src/myssink/sink.cxx b/racket/src/myssink/sink.cxx index 57caa79cc1..8f14fcf632 100644 --- a/racket/src/myssink/sink.cxx +++ b/racket/src/myssink/sink.cxx @@ -174,7 +174,13 @@ HRESULT CSink::InternalQueryInterface(void *pThis, } } - // Use IUnknown pointer for IUnknown, ISink, and the outbound interface + /* Don't claim to implement INoMarshal, because that disables + the sink for some uses, including with MzCOM */ + if (riid == IID_INoMarshal) { + return E_NOINTERFACE; + } + + // Use IUnknown pointer for IUnknown, ISink, and anything else (which we assume to be the outbound interface) return CComObjectRootEx::InternalQueryInterface(pThis,pEntries,IID_IUnknown,ppVoid); diff --git a/racket/src/mzcom/mzcom.cxx b/racket/src/mzcom/mzcom.cxx index 2c98894929..86eb7d2dec 100644 --- a/racket/src/mzcom/mzcom.cxx +++ b/racket/src/mzcom/mzcom.cxx @@ -247,6 +247,17 @@ extern "C" int WINAPI WinMain(HINSTANCE hInstance, nRet |= RegCloseKey(sub); } + if (!nRet) { + ITypeLib *typelib; + wchar_t *path; + path = (wchar_t *)malloc(1024 * sizeof(wchar_t)); + GetModuleFileNameW(NULL, path, 1024); + nRet = LoadTypeLibEx(path, REGKIND_REGISTER, &typelib); + if (!nRet) + typelib->Release(); + free(path); + } + bRun = FALSE; } }