diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/oleutest/cmarshal | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to 'private/oleutest/cmarshal')
-rw-r--r-- | private/oleutest/cmarshal/app/app.cxx | 764 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/app.hxx | 108 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/app_i.c | 26 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/cmarshal.cxx | 317 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/cmarshal.hxx | 131 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/filelist.mk | 55 | ||||
-rw-r--r-- | private/oleutest/cmarshal/app/makefile | 13 | ||||
-rw-r--r-- | private/oleutest/cmarshal/cmarshal/cmarshal.def | 48 | ||||
-rw-r--r-- | private/oleutest/cmarshal/cmarshal/filelist.mk | 52 | ||||
-rw-r--r-- | private/oleutest/cmarshal/cmarshal/inproc.cxx | 77 | ||||
-rw-r--r-- | private/oleutest/cmarshal/cmarshal/makefile | 13 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/filelist.mk | 81 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/itest.idl | 38 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/makefile | 17 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/pch.cxx | 18 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/prxydll.def | 47 | ||||
-rw-r--r-- | private/oleutest/cmarshal/idl/test.reg | 26 |
17 files changed, 1831 insertions, 0 deletions
diff --git a/private/oleutest/cmarshal/app/app.cxx b/private/oleutest/cmarshal/app/app.cxx new file mode 100644 index 000000000..fe9768312 --- /dev/null +++ b/private/oleutest/cmarshal/app/app.cxx @@ -0,0 +1,764 @@ +//+------------------------------------------------------------- +// +// File: perfcli.cxx +// +// Contents: First attempt at getting perfcliing to work +// +// This is the client side +// +// +//--------------------------------------------------------------- + +#include <windows.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <errno.h> +#include <io.h> + +#include <ole2.h> +#include <com.hxx> +#include "app.hxx" +#include <memalloc.h> +#include <objerror.h> + +#pragma hdrstop + +//+-------------------------------------------------------------- +/* Definitions. */ + +#define MAX_CALLS 1000 +#define MAX_THREADS 10 + +typedef enum what_next_en +{ + wait_wn, + interrupt_wn, + quit_wn +} what_next_en; + +//+-------------------------------------------------------------- +/* Prototypes. */ +void interrupt ( void ); +void check_for_request ( void ); +BOOL server_loop ( void ); +DWORD _stdcall ThreadHelper ( void * ); +void wait_for_message ( void ); +void wake_up_and_smell_the_roses( void ); + + +//+-------------------------------------------------------------- +/* Globals. */ +DWORD thread_mode = COINIT_MULTITHREADED; +HANDLE Done; +BOOL server; +BOOL Multicall_Test; +BOOL InterruptTestResults; +BOOL InterruptTestDone; +DWORD MainThread; +DWORD NestedCallCount = 0; +what_next_en WhatNext; +ITest *global_test = NULL; +BOOL global_interrupt_test; + + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CTest::AddRef( THIS ) +{ + InterlockedIncrement( (long *) &ref_count ); + return ref_count; +} + +/***************************************************************************/ +CTest::CTest() +{ + ref_count = 1; + custom = NULL; +} + +/***************************************************************************/ +CTest::~CTest() +{ + if (custom != NULL) + { + custom->Release(); + custom = NULL; + } +} + +/***************************************************************************/ +STDMETHODIMP CTest::sick( ULONG val ) +{ + TRY + { + THROW( CException(val) ); + } + CATCH( CException, exp ) + { + } + END_CATCH; + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP CTest::die_cpp( ULONG val ) +{ + THROW( CException(val) ); + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP CTest::die_nt( ULONG val ) +{ + RaiseException( val, 0, 0, NULL ); + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP_(DWORD) CTest::die( ITest *callback, ULONG catch_depth, + ULONG throw_depth, ULONG throw_val ) +{ + if (catch_depth == 0) + { + TRY + { + return callback->die( this, catch_depth - 1, throw_depth - 1, throw_val ); + } + CATCH( CException, exp ) + { +#if DBG==1 + if (DebugCoGetRpcFault() != throw_val) + { + printf( "Propogated server fault was returned as 0x%x not 0x%x\n", + DebugCoGetRpcFault(), throw_val ); +// return FALSE; + } +#endif + return TRUE; + } + END_CATCH + } + else if (throw_depth == 0) + { + THROW( CException(throw_val) ); + } + else + return callback->die( this, catch_depth - 1, throw_depth - 1, throw_val ); + return FALSE; +} + +/***************************************************************************/ +STDMETHODIMP CTest::interrupt( ITest *param, BOOL go ) +{ + global_interrupt_test = go; + if (go) + { + global_test = param; + global_test->AddRef(); + WhatNext = interrupt_wn; + wake_up_and_smell_the_roses(); + } + else + WhatNext = wait_wn; + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP_(BOOL) CTest::hello() +{ + if (GetCurrentThreadId() == MainThread) + printf( "Hello on the main thread.\n" ); + else + printf( "Hello on thread %d.\n", GetCurrentThreadId ); + return !InterruptTestDone; +} + +/***************************************************************************/ +STDMETHODIMP CTest::recurse( ITest *callback, ULONG depth ) +{ + if (depth == 0) + return S_OK; + else + return callback->recurse( this, depth-1 ); +} + +/***************************************************************************/ +STDMETHODIMP CTest::recurse_interrupt( ITest *callback, ULONG depth ) +{ + MSG msg; + + if (PeekMessage( &msg, NULL, 0, 0, PM_REMOVE )) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + + if (depth == 0) + return S_OK; + else + return callback->recurse( this, depth-1 ); +} + +/***************************************************************************/ +STDMETHODIMP CTest::sleep( ULONG time ) +{ + + // For single threaded mode, verify that this is the only call on the + // main thread. + NestedCallCount += 1; + printf( "Sleeping on thread %d for the %d time concurrently.\n", + GetCurrentThreadId(), NestedCallCount ); + if (thread_mode == COINIT_SINGLETHREADED) + { + if (GetCurrentThreadId() != MainThread) + { + printf( "Sleep called on the wrong thread in single threaded mode.\n" ); + NestedCallCount -= 1; + return FALSE; + } + else if (NestedCallCount != 1) + { + printf( "Sleep nested call count is %d instead of not 1 in single threaded mode.\n", + NestedCallCount ); + NestedCallCount -= 1; + return FALSE; + } + } + + // For multithreaded mode, verify that this is not the main thread. + else if (GetCurrentThreadId() == MainThread) + { + printf( "Sleep called on the main thread in multi threaded mode.\n" ); + NestedCallCount -= 1; + return FALSE; + } + + Sleep( time ); + NestedCallCount -= 1; + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP_(DWORD) CTest::DoTest( ITest *test, ITest *another ) +{ + HRESULT result; + int i; + BOOL success; + HANDLE helper[MAX_THREADS]; + DWORD thread_id; + DWORD status; + + // Let the server throw and exception and catch it before returning. + result = test->sick( 95 ); + if (result != S_OK) + { + printf( "Internal server fault was not dealt with correctly.\n" ); + return FALSE; + } + + // Let the server throw a C++ exception here. + result = test->die_cpp( 0xdeaff00d ); + if (result != RPC_E_FAULT) + { + printf( "C++ server fault was not dealt with correctly.\n" ); + return FALSE; + } +#if DBG==1 + if (DebugCoGetRpcFault() != 0xdeaff00d) + { + printf( "C++ server fault was returned as 0x%x not 0x%x\n", + DebugCoGetRpcFault(), 0xdeaff00d ); +// return FALSE; + } +#endif + + // Let the server throw a NT exception here. + result = test->die_nt( 0xaaaabdbd ); + if (result != RPC_E_FAULT) + { + printf( "NT server fault was not dealt with correctly.\n" ); + return FALSE; + } +#if DBG==1 + if (DebugCoGetRpcFault() != 0xaaaabdbd) + { + printf( "C++ server fault was returned as 0x%x not 0x%x\n", + DebugCoGetRpcFault(), 0xaaaabdbd ); + return FALSE; + } +#endif + + // Test a recursive call. + result = test->recurse( this, 10 ); + if (result != S_OK) + { + printf( "Recursive call failed: 0x%x\n", result ); + return FALSE; + } + + // Test throwing and immediately catching an exception. + //success = test->die( this, 2, 3, 0x12345678 ); + //if (!success) + //{ + // printf( "Could not catch server exception.\n" ); + // return FALSE; + //} + + // Test throwing, propogating, and then catching an exception. + // success = test->die( this, 1, 3, 0x87654321 ); + //if (!success) + //{ + // printf( "Could not catch propogated server exception.\n" ); + // return FALSE; + //} + + // Test multiple threads. + Multicall_Test = TRUE; + for (i = 0; i < MAX_THREADS; i++) + { + helper[i] = CreateThread( NULL, 0, ThreadHelper, test, 0, &thread_id ); + if (helper == NULL) + { + printf( "Could not create helper thread number %d.\n", i ); + return FALSE; + } + } + result = test->sleep(4000); + if (result != S_OK) + { + printf( "Multiple call failed on main thread: 0x%x\n", result ); + return FALSE; + } + status = WaitForMultipleObjects( MAX_THREADS, helper, TRUE, INFINITE ); + if (status == WAIT_FAILED) + { + printf( "Could not wait for helper threads to die: 0x%x\n", status ); + return FALSE; + } + if (!Multicall_Test) + { + printf( "Multiple call failed on helper thread.\n" ); + return FALSE; + } + + // See if methods can correctly call GetMessage. + another->interrupt( test, TRUE ); + result = test->recurse_interrupt( this, 10 ); + if (result != S_OK) + { + printf( "Recursive call with interrupts failed: 0x%x\n", result ); + return FALSE; + } + another->interrupt( test, FALSE ); + + // Finally, its all over. + return TRUE; +} + +/***************************************************************************/ +STDMETHODIMP CTest::QueryInterface( THIS_ REFIID riid, LPVOID FAR* ppvObj) +{ + if (IsEqualIID(riid, IID_IUnknown) || + IsEqualIID(riid, IID_ITest)) + { + *ppvObj = (IUnknown *) this; + AddRef(); + return S_OK; + } + else if (IsEqualIID( riid, IID_IMarshal)) + { + if (custom == NULL) + { + custom = new CCMarshal; + if (custom == NULL) + return E_FAIL; + } + *ppvObj = (IMarshal *) custom; + custom->AddRef(); + return S_OK; + } + else + { + *ppvObj = NULL; + return E_NOINTERFACE; + } +} + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CTest::Release( THIS ) +{ + if (InterlockedDecrement( (long*) &ref_count ) == 0) + { + WhatNext = quit_wn; + wake_up_and_smell_the_roses(); + delete this; + return 0; + } + else + return ref_count; +} + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CTestCF::AddRef( THIS ) +{ + InterlockedIncrement( (long *) &ref_count ); + return ref_count; +} + +/***************************************************************************/ +CTestCF::CTestCF() +{ + ref_count = 1; +} + +/***************************************************************************/ +CTestCF::~CTestCF() +{ +} + +/***************************************************************************/ +STDMETHODIMP CTestCF::CreateInstance( + IUnknown FAR* pUnkOuter, + REFIID iidInterface, + void FAR* FAR* ppv) +{ + *ppv = NULL; + if (pUnkOuter != NULL) + { + return E_FAIL; + } + + if (!IsEqualIID( iidInterface, IID_ITest )) + return E_NOINTERFACE; + + CTest *Test = new FAR CTest(); + + if (Test == NULL) + { + return E_OUTOFMEMORY; + } + + *ppv = Test; + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP CTestCF::LockServer(BOOL fLock) +{ + return E_FAIL; +} + + +/***************************************************************************/ +STDMETHODIMP CTestCF::QueryInterface( THIS_ REFIID riid, LPVOID FAR* ppvObj) +{ + if (IsEqualIID(riid, IID_IUnknown) || + IsEqualIID(riid, IID_IClassFactory)) + { + *ppvObj = (IUnknown *) this; + AddRef(); + return S_OK; + } + + *ppvObj = NULL; + return E_NOINTERFACE; +} + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CTestCF::Release( THIS ) +{ + if (InterlockedDecrement( (long*) &ref_count ) == 0) + { + delete this; + return 0; + } + else + return ref_count; +} + +/***************************************************************************/ +void interrupt() +{ + while (global_interrupt_test) + { + global_test->hello(); + check_for_request(); + } + global_test->Release(); +} + +//+-------------------------------------------------------------- +// Function: Main +// +// Synopsis: Executes the BasicBnd test +// +// Effects: None +// +// +// Returns: Exits with exit code 0 if success, 1 otherwise +// +// History: 05-Mar-92 Sarahj Created +// +//--------------------------------------------------------------- + +int _cdecl main(int argc, char *argv[]) +{ + HRESULT result; + DWORD wrong; + BOOL success = TRUE; + ITest *another = NULL; + ITest *test = NULL; + CTest *tester = new CTest; + + // Initialize Globals. + MainThread = GetCurrentThreadId(); + + // Create an event for termination notification. + Done = CreateEvent( NULL, FALSE, FALSE, NULL ); + if (Done == NULL) + { + printf( "Could not create event.\n" ); + success = FALSE; + goto exit_main; + } + + int len; + TCHAR buffer[80]; + + // Look up the thread mode from the win.ini file. + len = GetProfileString( L"My Section", L"ThreadMode", L"MultiThreaded", buffer, + sizeof(buffer) ); + if (lstrcmp(buffer, L"SingleThreaded") == 0) + { + thread_mode = COINIT_SINGLETHREADED; + wrong = COINIT_MULTITHREADED; + printf( "Testing channel in single threaded mode.\n" ); + } + else if (lstrcmp(buffer, L"MultiThreaded") == 0) + { + thread_mode = COINIT_MULTITHREADED; + wrong = COINIT_SINGLETHREADED; + printf( "Testing channel in multithreaded mode.\n" ); + } + + // Initialize OLE. + result = OleInitializeEx(NULL, thread_mode); + if (!SUCCEEDED(result)) + { + success = FALSE; + printf( "OleInitializeEx failed: %x\n", result ); + goto exit_main; + } + result = CoInitializeEx(NULL, thread_mode); + if (!SUCCEEDED(result)) + { + success = FALSE; + printf( "Recalling CoInitializeEx failed: %x\n", result ); + goto exit_main; + } + result = CoInitializeEx(NULL, wrong); + if (result == S_OK) + { + success = FALSE; + printf( "Recalling CoInitializeEx with wrong thread mode succeeded: %x\n", result ); + goto exit_main; + } + CoUninitialize(); + CoUninitialize(); + + // If this is a server app, register and wait for a quit message. + if (argv[1] == NULL) + server = FALSE; + else + server = strcmp( argv[1], "-Embedding" ) == 0; + if (server) + { + success = server_loop( ); + } + + // Initialize and run the tests. + else + { + // Get a test object. + result = CoCreateInstance( CLSID_ITest, NULL, CLSCTX_LOCAL_SERVER, + IID_ITest, (void **) &test ); + if (!SUCCEEDED(result)) + { + printf( "Could not create instance of test server: %x\n", result ); + success = FALSE; + goto exit_main; + } + + // Get another test object. + result = CoCreateInstance( CLSID_ITest, NULL, CLSCTX_LOCAL_SERVER, + IID_ITest, (void **) &another ); + if (!SUCCEEDED(result)) + { + printf( "Could not create another instance of test server: %x\n", result ); + success = FALSE; + goto exit_main; + } + + success = tester->DoTest( test, another ); + } + +exit_main: + + // Release the external test objects used. + if (test != NULL) + test->Release(); + if (another != NULL) + another->Release(); + + // Release the internal test object. + tester->Release(); + //wait_for_message(); + + OleUninitialize(); + + if (!server) + if (success) + printf("\nChannel Unit Test: PASSED\n"); + else + printf("\nChannel Unit Test: FAILED\n"); + + return !success; +} + +//+-------------------------------------------------------------- +void check_for_request() +{ + MSG msg; + + if (thread_mode == COINIT_SINGLETHREADED) + { + if (PeekMessage( &msg, NULL, 0, 0, PM_REMOVE )) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + } +} + +//+-------------------------------------------------------------- +BOOL server_loop( ) +{ + HRESULT result; + DWORD dwRegistration; + + // Create our class factory + WhatNext = wait_wn; + CTestCF *test_cf = new CTestCF(); + + // Register our class with OLE + result = CoRegisterClassObject(CLSID_ITest, test_cf, CLSCTX_LOCAL_SERVER, + REGCLS_SINGLEUSE, &dwRegistration); + if (!SUCCEEDED(result)) + { + printf( "CoRegisterClassObject failed: %x\n", result ); + return FALSE; + } + + // CoRegister bumps reference count so we don't have to! + test_cf->Release(); + + // Do whatever we have to do till it is time to pay our taxes and die. + while (WhatNext != quit_wn) + switch (WhatNext) + { + + // Wait till a quit arrives. + case wait_wn: + wait_for_message(); + break; + + case interrupt_wn: + interrupt(); + break; + } + + // Deregister out class - should release object as well + result = CoRevokeClassObject(dwRegistration); + if (!SUCCEEDED(result)) + { + printf( "CoRevokeClassObject failed: %x\n", result ); + return FALSE; + } + + return TRUE; +} + + +/***************************************************************************/ +DWORD _stdcall ThreadHelper( void *param ) +{ + ITest *test = (ITest *) param; + HRESULT result; + + // Call the server. + result = test->sleep( 2000 ); + + // Check the result for single threaded mode. + if (thread_mode == COINIT_SINGLETHREADED) + { + if (SUCCEEDED(result)) + { + Multicall_Test = FALSE; + printf( "Call succeeded on wrong thread in single threaded mode: 0x%x.\n", + result ); + } +#if DBG==1 + else if (DebugCoGetRpcFault() != RPC_E_ATTEMPTED_MULTITHREAD) + { + printf( "Multithread failure code was 0x%x not 0x%x\n", + DebugCoGetRpcFault(), RPC_E_ATTEMPTED_MULTITHREAD ); + Multicall_Test = FALSE; + } +#endif + } + + // Check the result for multithreaded mode. + else if (result != S_OK) + { + printf( "Could not make multiple calls in multithreaded mode: 0x%x\n", + result ); + Multicall_Test = FALSE; + } + +#define DO_DA 42 + return DO_DA; +} + +/***************************************************************************/ +void wait_for_message() +{ + MSG msg; + DWORD status; + + if (thread_mode == COINIT_MULTITHREADED) + { + status = WaitForSingleObject( Done, INFINITE ); + if (status != WAIT_OBJECT_0 ) + { + printf( "Could not wait for event.\n" ); + } + } + else + { + while (GetMessage( &msg, NULL, 0, 0 ) && msg.message != WM_USER) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + } +} + +/***************************************************************************/ +void wake_up_and_smell_the_roses() +{ + if (thread_mode == COINIT_MULTITHREADED) + SetEvent( Done ); + else + PostThreadMessage(MainThread, WM_USER, 0, 0); +} + diff --git a/private/oleutest/cmarshal/app/app.hxx b/private/oleutest/cmarshal/app/app.hxx new file mode 100644 index 000000000..91339b76c --- /dev/null +++ b/private/oleutest/cmarshal/app/app.hxx @@ -0,0 +1,108 @@ +//+------------------------------------------------------------------- +// +// File: Testsrv.hxx +// +// Contents: This file contins the DLL entry points +// LibMain +// DllGetClassObject (Bindings key func) +// DllCanUnloadNow +// CBasicBndCF (class factory) +// History: 30-Mar-92 SarahJ Created +// +//--------------------------------------------------------------------- + +#ifndef __APP_H__ +#define __APP_H__ + +#include "..\idl\itest.h" +#include "cmarshal.hxx" + +extern "C" const IID CLSID_ITest; + +//+------------------------------------------------------------------- +// +// Class: CTestCF +// +// Synopsis: Class Factory for CTest +// +// Methods: IUnknown - QueryInterface, AddRef, Release +// IClassFactory - CreateInstance +// +// History: 21-Mar-92 SarahJ Created +// +//-------------------------------------------------------------------- + + +class FAR CTestCF: public IClassFactory +{ +public: + + // Constructor/Destructor + CTestCF(); + ~CTestCF(); + + // IUnknown + STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv); + STDMETHOD_(ULONG,AddRef) ( void ); + STDMETHOD_(ULONG,Release) ( void ); + + // IClassFactory + STDMETHODIMP CreateInstance( + IUnknown FAR* pUnkOuter, + REFIID iidInterface, + void FAR* FAR* ppv); + + STDMETHODIMP LockServer(BOOL fLock); + +private: + + ULONG ref_count; +}; + +//+------------------------------------------------------------------- +// +// Class: CTest +// +// Synopsis: Test class +// +// Methods: +// +// History: 21-Mar-92 SarahJ Created +// +//-------------------------------------------------------------------- + + +class FAR CTest: public ITest +{ +public: + CTest(); + + ~CTest(); + + // IUnknown + STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv); + STDMETHOD_(ULONG,AddRef) ( void ); + STDMETHOD_(ULONG,Release) ( void ); + + // ITest + STDMETHOD_(DWORD, die) ( ITest *, ULONG, ULONG, ULONG ); + STDMETHOD (die_cpp) ( ULONG ); + STDMETHOD (die_nt) ( ULONG ); + STDMETHOD_(DWORD, DoTest) ( ITest *, ITest * ); + STDMETHOD_(BOOL, hello) ( ); + STDMETHOD (interrupt) ( ITest *, BOOL ); + STDMETHOD (recurse) ( ITest *, ULONG ); + STDMETHOD (recurse_interrupt)( ITest *, ULONG ); + STDMETHOD (sick) ( ULONG ); + STDMETHOD (sleep) ( ULONG ); + + + +private: + + ULONG ref_count; + CCMarshal *custom; +}; + + +#endif diff --git a/private/oleutest/cmarshal/app/app_i.c b/private/oleutest/cmarshal/app/app_i.c new file mode 100644 index 000000000..fa7732cce --- /dev/null +++ b/private/oleutest/cmarshal/app/app_i.c @@ -0,0 +1,26 @@ +#pragma warning(disable:4101) // Ignore variable not use warning + +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1993. +// +// File: iperf_i.c +// +// Contents: IID_IPerf +// +// History: Created by Microsoft (R) MIDL Compiler Version 1.10.83 +// +//-------------------------------------------------------------------------- +typedef struct _IID +{ + unsigned long x; + unsigned short s1; + unsigned short s2; + unsigned char c[8]; +} IID; + + +const IID CLSID_ITest = +{0x60000430, 0xAB0F, 0x101A, {0xB4, 0xAE, 0x08, 0x00, 0x2B, 0x30, 0x61, 0x2C}}; + diff --git a/private/oleutest/cmarshal/app/cmarshal.cxx b/private/oleutest/cmarshal/app/cmarshal.cxx new file mode 100644 index 000000000..8f6471c66 --- /dev/null +++ b/private/oleutest/cmarshal/app/cmarshal.cxx @@ -0,0 +1,317 @@ +//+------------------------------------------------------------------- +// +// File: cmarshal.cxx +// +// Contents: This file contins the DLL entry points +// LibMain +// DllGetClassObject (Bindings key func) +// CBasicBndCF (class factory) +// CBasicBnd (actual class implementation) +// +// Classes: CBasicBndCF, CBasicBnd +// +// +// History: 30-Nov-92 SarahJ Created +// +//--------------------------------------------------------------------- + +#include <windows.h> +#include <ole2.h> +#include "app.hxx" + + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CCMarshal::AddRef( THIS ) +{ + InterlockedIncrement( (long *) &ref_count ); + return ref_count; +} + +/***************************************************************************/ +CCMarshal::CCMarshal() +{ + ref_count = 1; +} + +/***************************************************************************/ +CCMarshal::~CCMarshal() +{ +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::sick( ULONG val ) +{ + return proxy->sick( val ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::die_cpp( ULONG val ) +{ + return proxy->die_cpp( val ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::die_nt( ULONG val ) +{ + return proxy->die_nt( val ); +} + +/***************************************************************************/ +STDMETHODIMP_(DWORD) CCMarshal::die( ITest *callback, ULONG catch_depth, + ULONG throw_depth, ULONG throw_val ) +{ + return proxy->die( callback, catch_depth, throw_depth, throw_val ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::interrupt( ITest *param, BOOL go ) +{ + return proxy->interrupt( param, go ); +} + +/***************************************************************************/ +STDMETHODIMP_(BOOL) CCMarshal::hello() +{ + return proxy->hello(); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::recurse( ITest *callback, ULONG depth ) +{ + return proxy->recurse( callback, depth ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::recurse_interrupt( ITest *callback, ULONG depth ) +{ + return proxy->recurse_interrupt( callback, depth ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::sleep( ULONG time ) +{ + return proxy->sleep( time ); +} + +/***************************************************************************/ +STDMETHODIMP_(DWORD) CCMarshal::DoTest( ITest *test, ITest *another ) +{ + return proxy->DoTest( test, another ); +} + +/***************************************************************************/ +STDMETHODIMP CCMarshal::QueryInterface( THIS_ REFIID riid, LPVOID FAR* ppvObj) +{ + if (IsEqualIID(riid, IID_IUnknown) || + IsEqualIID(riid, IID_ITest)) + { + *ppvObj = (ITest *) this; + AddRef(); + return S_OK; + } + else + { + *ppvObj = NULL; + return E_NOINTERFACE; + } +} + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CCMarshal::Release( THIS ) +{ + if (InterlockedDecrement( (long*) &ref_count ) == 0) + { + delete this; + return 0; + } + else + return ref_count; +} + + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CCMarshalCF::AddRef( THIS ) +{ + InterlockedIncrement( (long *) &ref_count ); + return ref_count; +} + +/***************************************************************************/ +CCMarshalCF::CCMarshalCF() +{ + ref_count = 1; +} + +/***************************************************************************/ +CCMarshalCF::~CCMarshalCF() +{ +} + +/***************************************************************************/ +STDMETHODIMP CCMarshalCF::CreateInstance( + IUnknown FAR* pUnkOuter, + REFIID iidInterface, + void FAR* FAR* ppv) +{ + *ppv = NULL; + if (pUnkOuter != NULL) + { + return E_FAIL; + } + + if (!IsEqualIID( iidInterface, IID_ITest )) + return E_NOINTERFACE; + + CCMarshal *Test = new FAR CCMarshal(); + + if (Test == NULL) + { + return E_OUTOFMEMORY; + } + + *ppv = Test; + return S_OK; +} + +/***************************************************************************/ +STDMETHODIMP CCMarshalCF::LockServer(BOOL fLock) +{ + return E_FAIL; +} + + +/***************************************************************************/ +STDMETHODIMP CCMarshalCF::QueryInterface( THIS_ REFIID riid, LPVOID FAR* ppvObj) +{ + if (IsEqualIID(riid, IID_IUnknown) || + IsEqualIID(riid, IID_IClassFactory)) + { + *ppvObj = (IUnknown *) this; + AddRef(); + return S_OK; + } + + *ppvObj = NULL; + return E_NOINTERFACE; +} + +/***************************************************************************/ +STDMETHODIMP_(ULONG) CCMarshalCF::Release( THIS ) +{ + if (InterlockedDecrement( (long*) &ref_count ) == 0) + { + delete this; + return 0; + } + else + return ref_count; +} + + + +CMarshalBase::CMarshalBase() +{ + proxy = NULL; + marshaller = NULL; +} + + +CMarshalBase::~CMarshalBase() +{ + if (proxy != NULL) + { + proxy->Release(); + proxy = NULL; + } + if (marshaller != NULL) + { + marshaller->Release(); + marshaller = NULL; + } +} + + +// Returns the clsid of the object that created this CMarshalBase. +// + STDMETHODIMP CMarshalBase::GetUnmarshalClass(REFIID riid, LPVOID pv, + DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, CLSID * pCid) +{ + *pCid = CLSID_ITest; + return S_OK; +} + + + STDMETHODIMP CMarshalBase::GetMarshalSizeMax(REFIID riid, LPVOID pv, + DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, DWORD * pSize) +{ + SCODE result; + + if (marshaller == NULL) + { + result = CoGetStandardMarshal( riid, this, dwDestContext, pvDestContext, + mshlflags, &marshaller ); + if (FAILED(result)) + return result; + } + return marshaller->GetMarshalSizeMax( riid, this, dwDestContext, + pvDestContext, mshlflags, pSize ); +} + + + STDMETHODIMP CMarshalBase::MarshalInterface(IStream * pStm, + REFIID riid, void * pv, + DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags) +{ + SCODE result; + + if (marshaller == NULL) + return E_FAIL; + + result = marshaller->MarshalInterface( pStm, riid, this, dwDestContext, + pvDestContext, mshlflags ); + if (SUCCEEDED(result)) + { + proxy = (ITest *) pv; + ((IUnknown *) pv)->AddRef(); + } + return result; +} + + + STDMETHODIMP CMarshalBase::UnmarshalInterface(IStream * pStm, + REFIID riid, void * * ppv) +{ + SCODE result; + + if (marshaller == NULL) + { + result = CoGetStandardMarshal( riid, this, 0, NULL, + MSHLFLAGS_NORMAL, &marshaller ); + if (FAILED(result)) + return result; + } + + result = marshaller->UnmarshalInterface( pStm, riid, (void **) &proxy ); + if (SUCCEEDED(result)) + { + *ppv = this; + AddRef(); + } + else + *ppv = NULL; + return result; +} + + + STDMETHODIMP CMarshalBase::ReleaseMarshalData(IStream * pStm) +{ + return marshaller->ReleaseMarshalData( pStm ); +} + + + STDMETHODIMP CMarshalBase::DisconnectObject(DWORD dwReserved) +{ + return marshaller->DisconnectObject( dwReserved ); +} + + diff --git a/private/oleutest/cmarshal/app/cmarshal.hxx b/private/oleutest/cmarshal/app/cmarshal.hxx new file mode 100644 index 000000000..4cd89d5b6 --- /dev/null +++ b/private/oleutest/cmarshal/app/cmarshal.hxx @@ -0,0 +1,131 @@ +//+------------------------------------------------------------------- +// +// File: cmarshal.hxx +// +// Contents: This file contins the DLL entry points +// LibMain +// DllGetClassObject (Bindings key func) +// DllCanUnloadNow +// CCMarshalCF (class factory) +// History: 30-Mar-92 SarahJ Created +// +//--------------------------------------------------------------------- + +#ifndef __CMARSHAL_H__ +#define __CMARSHAL_H__ + + +//+------------------------------------------------------------------- +// +// Class: CCMarshalCF +// +// Synopsis: Class Factory for CCMarshal +// +// Methods: IUnknown - QueryInterface, AddRef, Release +// IClassFactory - CreateInstance +// +// History: 21-Mar-92 SarahJ Created +// +//-------------------------------------------------------------------- + + +class FAR CCMarshalCF: public IClassFactory +{ +public: + + // Constructor/Destructor + CCMarshalCF(); + ~CCMarshalCF(); + + // IUnknown + STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + + // IClassFactory + STDMETHODIMP CreateInstance(IUnknown FAR* pUnkOuter, + REFIID iidInterface, + void FAR* FAR* ppv); + + STDMETHODIMP LockServer(BOOL fLock); + +private: + + ULONG ref_count;; +}; + + + +class CMarshalBase : public IMarshal +{ + public: + + CMarshalBase(); + ~CMarshalBase(); + + // IMarshal + STDMETHOD(GetUnmarshalClass) (THIS_ REFIID riid, LPVOID pv, + DWORD dwDestContext, LPVOID pvDestContext, + DWORD mshlflags, LPCLSID pCid); + STDMETHOD(GetMarshalSizeMax) (THIS_ REFIID riid, LPVOID pv, + DWORD dwDestContext, LPVOID pvDestContext, + DWORD mshlflags, LPDWORD pSize); + STDMETHOD(MarshalInterface) (THIS_ IStream * pStm, REFIID riid, + LPVOID pv, DWORD dwDestContext, LPVOID pvDestContext, + DWORD mshlflags); + STDMETHOD(UnmarshalInterface)(THIS_ IStream * pStm, REFIID riid, + LPVOID * ppv); + STDMETHOD(ReleaseMarshalData)(THIS_ IStream * pStm); + STDMETHOD(DisconnectObject) (THIS_ DWORD dwReserved); + + ITest *proxy; + + private: + IMarshal *marshaller; + +}; + +//+------------------------------------------------------------------- +// +// Class: CCMarshal +// +// Synopsis: Test class CCMarshal +// +// Methods: +// +// History: 21-Mar-92 SarahJ Created +// +//-------------------------------------------------------------------- + + +class FAR CCMarshal: public ITest, public CMarshalBase +{ +public: +// Constructor/Destructor + CCMarshal(); + ~CCMarshal(); + + // IUnknown + STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + + // ITest + STDMETHOD_(DWORD, die) ( ITest *, ULONG, ULONG, ULONG ); + STDMETHOD (die_cpp) ( ULONG ); + STDMETHOD (die_nt) ( ULONG ); + STDMETHOD_(DWORD, DoTest) ( ITest *, ITest * ); + STDMETHOD_(BOOL, hello) ( ); + STDMETHOD (interrupt) ( ITest *, BOOL ); + STDMETHOD (recurse) ( ITest *, ULONG ); + STDMETHOD (recurse_interrupt)( ITest *, ULONG ); + STDMETHOD (sick) ( ULONG ); + STDMETHOD (sleep) ( ULONG ); + +private: + + ULONG ref_count; +}; + +#endif diff --git a/private/oleutest/cmarshal/app/filelist.mk b/private/oleutest/cmarshal/app/filelist.mk new file mode 100644 index 000000000..bf78a6ba4 --- /dev/null +++ b/private/oleutest/cmarshal/app/filelist.mk @@ -0,0 +1,55 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + + +# +# Name of target. Include an extension (.dll, .lib, .exe) +# If the target is part of the release, set RELEASE to 1. +# + +TARGET = app.exe + +TARGET_DESCRIPTION = "$(PLATFORM) $(BUILDTYPE) Cariole DRT Driver" + +RELEASEDRT = 1 + +# +# Source files. Remember to prefix each name with .\ +# +# MTHREAD=1 + +CXXFILES = .\app.cxx \ + .\cmarshal.cxx + +CFILES = .\app_i.c + +RCFILES = + +OBJFILES = ..\idl\objind\itest_i.obj + +# +# Libraries and other object files to link. +# + +LIBS = $(COMMON)\src\ole\$(OBJDIR)\olecom.lib\ + $(CAIROLIB) \ + +# +# Precompiled headers. +# + +PXXFILE = +PFILE = + +DEFFILE = + +CINC = $(CINC) -I. -I..\common -I. -I..\strms\server -I$(CAIROLE)\ole\inc + +NO_WINMAIN = 1 + +NEWDEF = 1 diff --git a/private/oleutest/cmarshal/app/makefile b/private/oleutest/cmarshal/app/makefile new file mode 100644 index 000000000..9baa61272 --- /dev/null +++ b/private/oleutest/cmarshal/app/makefile @@ -0,0 +1,13 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + +default: all +!include filelist.mk +!include $(COMMON)\src\win40.mk +!include depend.mk + diff --git a/private/oleutest/cmarshal/cmarshal/cmarshal.def b/private/oleutest/cmarshal/cmarshal/cmarshal.def new file mode 100644 index 000000000..9561f2ae7 --- /dev/null +++ b/private/oleutest/cmarshal/cmarshal/cmarshal.def @@ -0,0 +1,48 @@ +#if 0 + + Microsoft Windows + Copyright (C) Microsoft Corporation, 1992 - 1992. + All rights reserved. + + This .def file is preprocessed by the compiler to create the version for + the current build in the appropriate subdir. Basically, whatever you + would have used in your code to control what is compiled when can be + used in this file for the same purpose. The following defines are in + use at the time this file was written: + + FLAT - Used to indicate a NT/DOS7 build + i386 - Intel i386/i486 build + MIPS - MIPS R3000/R4000 build + ALPHA - DEC Alpha build + DBG - Used to control Debug/Retail. Set to 1 if Debug, + 0 if Retail. + WIN31 - Win16 build + __OS2__ - OS/2 build (used by CT mostly) + + If none of these are used, it is assumed the entire file can be used + for all builds. + +#endif + +#ifdef FLAT + +LIBRARY cmarshal + +DESCRIPTION 'Microsoft (R) OLE 2.0 Proxy DLL 1.00' + +EXPORTS +#if defined(i386) + + DllGetClassObject@12 @1 + DllGetClassObject=DllGetClassObject@12 + DllCanUnloadNow@0 @2 + DllCanUnloadNow=DllCanUnloadNow@0 + +#elif defined(_MIPS_) + + DllGetClassObject @1 + DllCanUnloadNow @2 + +#endif // i386 - MIPS + +#endif // FLAT diff --git a/private/oleutest/cmarshal/cmarshal/filelist.mk b/private/oleutest/cmarshal/cmarshal/filelist.mk new file mode 100644 index 000000000..af3c48394 --- /dev/null +++ b/private/oleutest/cmarshal/cmarshal/filelist.mk @@ -0,0 +1,52 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + + +# +# Name of target. Include an extension (.dll, .lib, .exe) +# If the target is part of the release, set RELEASE to 1. +# + +TARGET = cmarshal.dll + +COFFBASE = testdll +TARGET_DESCRIPTION = "$(PLATFORM) $(BUILDTYPE) Cariole DRT DLL Server" + +RELEASEDRT = 1 +# +# Source files. Remember to prefix each name with .\ +# + +CXXFILES = .\inproc.cxx + +CFILES = +RCFILES = +DEFFILE = cmarshal.def +CINC = $(CINC) -I. -I..\common -I..\app + +# +# Libraries and other object files to link. +# + + +LIBS = $(COMMON)\src\ole\$(OBJDIR)\olecom.lib\ + $(CAIROLIB) + + +OBJFILES = ..\app\$(OBJDIR)\cmarshal.obj \ + ..\app\$(OBJDIR)\app_i.obj \ + ..\idl\$(OBJDIR)\itest_i.obj + + + +# +# Precompiled headers. +# + +PXXFILE = +PFILE = diff --git a/private/oleutest/cmarshal/cmarshal/inproc.cxx b/private/oleutest/cmarshal/cmarshal/inproc.cxx new file mode 100644 index 000000000..e974949fc --- /dev/null +++ b/private/oleutest/cmarshal/cmarshal/inproc.cxx @@ -0,0 +1,77 @@ +#include <windows.h> +#include <ole2.h> +#include <app.hxx> + +//+------------------------------------------------------------------- +// +// Function: LibMain +// +// Synopsis: Entry point to DLL - does little else +// +// Arguments: +// +// Returns: TRUE +// +// History: 21-Nov-92 SarahJ Created +// +//-------------------------------------------------------------------- + + + +// +// Entry point to DLL is traditional LibMain +// Do nothing in here +// + + +extern "C" BOOL _cdecl LibMain ( HINSTANCE hinst, + HANDLE segDS, + UINT cbHeapSize, + LPTSTR lpCmdLine) +{ + return TRUE; +} + + +//+------------------------------------------------------------------- +// +// Function: DllGetClassObject +// +// Synopsis: Called by client (from within BindToObject et al) +// interface requested should be IUnknown or IClassFactory - +// Creates ClassFactory object and returns pointer to it +// +// Arguments: REFCLSID clsid - class id +// REFIID iid - interface id +// void FAR* FAR* ppv- pointer to class factory interface +// +// Returns: TRUE +// +// History: 21-Nov-92 SarahJ Created +// +//-------------------------------------------------------------------- + + +STDAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void FAR* FAR* ppv) +{ + if (!IsEqualIID(iid, IID_IUnknown) && !IsEqualIID(iid, IID_IClassFactory)) + { + return E_NOINTERFACE; + } + + if (IsEqualIID(clsid, CLSID_ITest)) + { + *ppv = new CCMarshalCF(); + return S_OK; + } + + return E_FAIL; +} + + +STDAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} + + diff --git a/private/oleutest/cmarshal/cmarshal/makefile b/private/oleutest/cmarshal/cmarshal/makefile new file mode 100644 index 000000000..9baa61272 --- /dev/null +++ b/private/oleutest/cmarshal/cmarshal/makefile @@ -0,0 +1,13 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + +default: all +!include filelist.mk +!include $(COMMON)\src\win40.mk +!include depend.mk + diff --git a/private/oleutest/cmarshal/idl/filelist.mk b/private/oleutest/cmarshal/idl/filelist.mk new file mode 100644 index 000000000..29eeaf9e5 --- /dev/null +++ b/private/oleutest/cmarshal/idl/filelist.mk @@ -0,0 +1,81 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + + +# +# Name of target. Include an extension (.dll, .lib, .exe) +# If the target is part of the release, set RELEASE to 1. +# + +TARGET = itest.dll + +TARGET_DESCRIPTION = "$(PLATFORM) $(BUILDTYPE) Proxy for IBalls ICube interfaces" + +COFFBASE = piballs + +RELEASE = + + +ITFFILES = + +# +# Source files. Remember to prefix each name with .\ +# + +IDLFILES = .\itest.idl + + +CXXFILES = \ + .\itest_c.cxx \ + .\itest_s.cxx \ + .\itest_p.cxx + +CFILES = .\itest_i.c + +OBJFILES = \ + $(COMMON)\types\$(OBJDIR)\unknwn_i.obj \ + $(COMMON)\types\$(OBJDIR)\classf_i.obj \ + $(COMMON)\types\$(OBJDIR)\psfbuf_i.obj \ + $(COMMON)\types\$(OBJDIR)\proxyb_i.obj \ + $(COMMON)\types\$(OBJDIR)\stubb_i.obj \ + $(COMMON)\types\$(OBJDIR)\rchanb_i.obj \ + $(COMMON)\types\$(OBJDIR)\marshl_i.obj \ + $(COMMON)\types\$(OBJDIR)\stdrpc.obj \ + $(COMMON)\types\$(OBJDIR)\stdclass.obj \ + $(COMMON)\types\$(OBJDIR)\pch.obj + +RCFILES = + +CDLFILES = + + +# +# Libraries and other object files to link. +# + +DEFFILE = prxydll.def + +LIBS = $(CAIROLIB) \ + $(RPCLIBS) \ + + + +# +# Precompiled headers. +# + +PXXFILE = .\pch.cxx +PFILE = + +CINC = -I. -DUNICODE + + +CLEANFILES = $(HSOURCES) $(CFILES) + +CLEANTARGET = $(OBJDIR) + diff --git a/private/oleutest/cmarshal/idl/itest.idl b/private/oleutest/cmarshal/idl/itest.idl new file mode 100644 index 000000000..630f9a734 --- /dev/null +++ b/private/oleutest/cmarshal/idl/itest.idl @@ -0,0 +1,38 @@ +//[ ITest_itf +//+------------------------------------------------------------------- +// +// Interface: ITest (ib) +// +// Purpose: Interface for manipulating performance +// +// History: 5-Oct-93 AlexMit Created +// +// Notes: +// +//-------------------------------------------------------------------- + +[ object, + + uuid(60000494-AB0F-101A-B4AE-08002B30612C), + pointer_default(unique) ] + +interface ITest : IUnknown +{ + import "unknwn.idl"; + + DWORD die ( [in] ITest *, [in] ULONG, [in] ULONG, [in] ULONG ); + HRESULT die_cpp ( [in] ULONG ); + HRESULT die_nt ( [in] ULONG ); + DWORD DoTest ( [in] ITest *, [in] ITest * ); + BOOL hello (); + HRESULT interrupt( [in] ITest *, BOOL ); + HRESULT recurse ( [in] ITest *, [in] ULONG ); + HRESULT recurse_interrupt ( [in] ITest *, [in] ULONG ); + HRESULT sick ( [in] ULONG ); + HRESULT sleep ( [in] ULONG ); + +} + +//] + +
\ No newline at end of file diff --git a/private/oleutest/cmarshal/idl/makefile b/private/oleutest/cmarshal/idl/makefile new file mode 100644 index 000000000..6a490bebc --- /dev/null +++ b/private/oleutest/cmarshal/idl/makefile @@ -0,0 +1,17 @@ +############################################################################ +# +# Copyright (C) 1992, Microsoft Corporation. +# +# All rights reserved. +# +############################################################################ + +default: all +!include filelist.mk +!include $(COMMON)\src\win40.mk + +MIDL=$(TOOLPATH)\midl76.exe + +all: $(OBJS) + +!include depend.mk diff --git a/private/oleutest/cmarshal/idl/pch.cxx b/private/oleutest/cmarshal/idl/pch.cxx new file mode 100644 index 000000000..984d8d2bf --- /dev/null +++ b/private/oleutest/cmarshal/idl/pch.cxx @@ -0,0 +1,18 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1991 - 1992. +// +// File: PCH.CXX +// +// Contents: Precompiled header +// +// History: 12-Jul-93 ShannonC Created +// +//-------------------------------------------------------------------------- + +#include "stdrpc.hxx" +#pragma hdrstop + + + diff --git a/private/oleutest/cmarshal/idl/prxydll.def b/private/oleutest/cmarshal/idl/prxydll.def new file mode 100644 index 000000000..e09e1ce91 --- /dev/null +++ b/private/oleutest/cmarshal/idl/prxydll.def @@ -0,0 +1,47 @@ +#if 0 + + Microsoft Windows + Copyright (C) Microsoft Corporation, 1992 - 1992. + All rights reserved. + + This .def file is preprocessed by the compiler to create the version for + the current build in the appropriate subdir. Basically, whatever you + would have used in your code to control what is compiled when can be + used in this file for the same purpose. The following defines are in + use at the time this file was written: + + FLAT - Used to indicate a NT/DOS7 build + i386 - Intel i386/i486 build + MIPS - MIPS R3000/R4000 build + ALPHA - DEC Alpha build + DBG - Used to control Debug/Retail. Set to 1 if Debug, + 0 if Retail. + WIN31 - Win16 build + __OS2__ - OS/2 build (used by CT mostly) + + If none of these are used, it is assumed the entire file can be used + for all builds. + +#endif + +#ifdef FLAT + +LIBRARY ITEST + +DESCRIPTION 'Microsoft (R) OLE 2.0 Proxy/Stub DLL 1.00' + +EXPORTS + +#if defined(i386) + + DllGetClassObject=DllGetClassObject@12 @1 + DllCanUnloadNow=DllCanUnloadNow@0 @2 + +#elif defined(_MIPS_) + + DllGetClassObject @1 + DllCanUnloadNow @2 + +#endif // i386 - MIPS + +#endif // FLAT diff --git a/private/oleutest/cmarshal/idl/test.reg b/private/oleutest/cmarshal/idl/test.reg new file mode 100644 index 000000000..4a67b2593 --- /dev/null +++ b/private/oleutest/cmarshal/idl/test.reg @@ -0,0 +1,26 @@ + +; registry entries for ITest interface. these map the interfaces +; to the proxy/stub code in itest.dll + + +\Registry\MACHINE\SOFTWARE\Classes\Interface\{60000494-AB0F-101A-B4AE-08002B30612C} + = ITest +\Registry\MACHINE\SOFTWARE\Classes\Interface\{60000494-AB0F-101A-B4AE-08002B30612C}\ProxyStubClsid + = {60000494-AB0F-101A-B4AE-08002B30612C} + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{60000494-AB0F-101A-B4AE-08002B30612C} + = CPrxyITest +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{60000494-AB0F-101A-B4AE-08002B30612C}\InprocServer + = itest.dll + +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{60000430-AB0F-101A-B4AE-08002B30612C} + = CTestCF +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{60000430-AB0F-101A-B4AE-08002B30612C}\LocalServer + = app.exe +\Registry\MACHINE\SOFTWARE\Classes\CLSID\{60000430-AB0F-101A-B4AE-08002B30612C}\InprocServer + = cmarshal.dll + + + + +
\ No newline at end of file |