Author: nyadav
Date: Mon May 30 11:32:19 2011
New Revision: 52005
URL:
http://svn.reactos.org/svn/reactos?rev=52005&view=rev
Log:
[AUDSRV] connect audio server and client
Added:
branches/nyadav-audio-branch/base/services/testc/ (with props)
branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt (with props)
branches/nyadav-audio-branch/base/services/testc/Hello.h (with props)
branches/nyadav-audio-branch/base/services/testc/Hello_c.c (with props)
branches/nyadav-audio-branch/base/services/testc/Helloc.c (with props)
branches/nyadav-audio-branch/base/services/tests/ (with props)
branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt (with props)
branches/nyadav-audio-branch/base/services/tests/Hello.h (with props)
branches/nyadav-audio-branch/base/services/tests/Hello_s.c (with props)
branches/nyadav-audio-branch/base/services/tests/Hellop.c (with props)
branches/nyadav-audio-branch/base/services/tests/Hellos.c (with props)
Modified:
branches/nyadav-audio-branch/base/services/CMakeLists.txt
branches/nyadav-audio-branch/base/services/audsrv/audsrv.c
branches/nyadav-audio-branch/base/services/audsrv/rpc.c
branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c
branches/nyadav-audio-branch/dll/win32/audsrvapi/dllmain.c
branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/CMakeLists.txt
branches/nyadav-audio-branch/include/reactos/idl/audsrvrpc.idl
Modified: branches/nyadav-audio-branch/base/services/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/CMakeLists.txt [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/CMakeLists.txt [iso-8859-1] Mon May 30
11:32:19 2011
@@ -7,6 +7,8 @@
add_subdirectory(svchost)
add_subdirectory(tcpsvcs)
add_subdirectory(telnetd)
+add_subdirectory(tests)
+add_subdirectory(testc)
#add_subdirectory(tftpd)
add_subdirectory(umpnpmgr)
add_subdirectory(wlansvc)
Modified: branches/nyadav-audio-branch/base/services/audsrv/audsrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/audsrv/audsrv.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/audsrv/audsrv.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -460,7 +460,7 @@
/*For Temporary Debug purpose, If there is any argument it acts as simple command line
app,otherwise it is a NTSERVICE*/
if(argc==1)
{
-printf("Under Construction.Please User audsrv.exe -n to start as normal command line
application.\n");
+printf("Under Construction.Please Use audsrv.exe -n to start as normal command line
application.\n");
MyHeap = HeapCreate(0, 1024 * 256, 0);
if (!MyHeap)
Modified: branches/nyadav-audio-branch/base/services/audsrv/rpc.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/audsrv/rpc.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/base/services/audsrv/rpc.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -19,25 +19,24 @@
RPC_STATUS Status;
InitializeListHead(&LogHandleListHead);
-printf("reached\n");
- Status = RpcServerUseProtseqEpW(L"ncacn_np", 20,
L"\\pipe\\EventLog", NULL);
+ Status = RpcServerUseProtseqEp(L"ncacn_np", 20,
L"\\pipe\\audsrv", NULL);
if (Status != RPC_S_OK)
{
- DPRINT("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
+ printf("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
return 0;
}
- Status = RpcServerRegisterIf(audsrv_v0_0_s_ifspec, NULL, NULL);
+ Status = RpcServerRegisterIfEx(audsrv_v0_0_s_ifspec, NULL, NULL, 0,
RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL );
if (Status != RPC_S_OK)
{
- DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
+ printf("RpcServerRegisterIf() failed (Status %lx)\n", Status);
return 0;
}
- Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE);
+ Status = RpcServerListen(1, 20, FALSE);
if (Status != RPC_S_OK)
{
- DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
+ printf("RpcServerListen() failed (Status %lx)\n", Status);
}
return 0;
@@ -46,9 +45,10 @@
/*************************RPC Functions**********************************/
-NTSTATUS AUDInitStream( AUDSRV_HANDLE *streamthread)
+NTSTATUS AUDInitStream( IN RPC_BINDING_HANDLE hBinding)
{
UNIMPLEMENTED;/*Coolest Macro I have ever seen*/
+ printf("Client Connected and called server's procedure\n");
return STATUS_NOT_IMPLEMENTED;
}
/*************************************************************************/
Propchange: branches/nyadav-audio-branch/base/services/testc/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon May 30 11:32:19 2011
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: branches/nyadav-audio-branch/base/services/testc/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: branches/nyadav-audio-branch/base/services/testc/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/nyadav-audio-branch/base/services/testc/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt (added)
+++ branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt [iso-8859-1] Mon May
30 11:32:19 2011
@@ -1,0 +1,13 @@
+
+set_unicode()
+
+list(APPEND SOURCE
+ Helloc.c
+ hello_c.c)
+
+add_executable(testc ${SOURCE})
+add_definitions(-D__USE_CRTIMP)
+target_link_libraries(testc ${PSEH_LIB})
+set_module_type(testc win32cui)
+add_importlibs(testc advapi32 rpcrt4 msvcrt kernel32 ntdll user32 ksuser setupapi)
+add_cab_target(testc 1)
Propchange: branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/testc/CMakeLists.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/testc/Hello.h
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/testc/Hello.h (added)
+++ branches/nyadav-audio-branch/base/services/testc/Hello.h [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,45 @@
+/*** Autogenerated by WIDL 0.4-SVN from Hello.idl - Do not edit ***/
+
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef __WIDL_HELLO_H
+#define __WIDL_HELLO_H
+
+/* Forward declarations */
+
+/* Headers for imported files */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*****************************************************************************
+ * hello interface (v1.0)
+ */
+#ifndef __hello_INTERFACE_DEFINED__
+#define __hello_INTERFACE_DEFINED__
+
+extern RPC_IF_HANDLE hello_v1_0_c_ifspec;
+extern RPC_IF_HANDLE hello_v1_0_s_ifspec;
+void HelloProc(
+ handle_t h1,
+ unsigned char *pszString);
+
+void Shutdown(
+ handle_t h1);
+
+
+#endif /* __hello_INTERFACE_DEFINED__ */
+
+/* Begin additional prototypes for all interfaces */
+
+
+/* End additional prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WIDL_HELLO_H */
Propchange: branches/nyadav-audio-branch/base/services/testc/Hello.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/testc/Hello.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/testc/Hello_c.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/testc/Hello_c.c (added)
+++ branches/nyadav-audio-branch/base/services/testc/Hello_c.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,679 @@
+/*** Autogenerated by WIDL 0.4-SVN from Hello.idl - Do not edit ***/
+#include <string.h>
+#ifdef _ALPHA_
+#include <stdarg.h>
+#endif
+
+#include "Hello.h"
+
+#ifndef DECLSPEC_HIDDEN
+#define DECLSPEC_HIDDEN
+#endif
+
+#ifndef _WIN64
+
+#ifndef USE_COMPILER_EXCEPTIONS
+
+#include "wine/exception.h"
+#undef RpcTryExcept
+#undef RpcExcept
+#undef RpcEndExcept
+#undef RpcTryFinally
+#undef RpcFinally
+#undef RpcEndFinally
+#undef RpcExceptionCode
+#undef RpcAbnormalTermination
+
+struct __exception_frame;
+typedef int (*__filter_func)(struct __exception_frame *);
+typedef void (*__finally_func)(struct __exception_frame *);
+
+#define __DECL_EXCEPTION_FRAME \
+ EXCEPTION_REGISTRATION_RECORD frame; \
+ __filter_func filter; \
+ __finally_func finally; \
+ sigjmp_buf jmp; \
+ DWORD code; \
+ unsigned char abnormal_termination; \
+ unsigned char filter_level; \
+ unsigned char finally_level;
+
+struct __exception_frame
+{
+ __DECL_EXCEPTION_FRAME
+};
+
+static inline void __widl_unwind_target(void)
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame
*)__wine_get_frame();
+ if (exc_frame->finally_level > exc_frame->filter_level)
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ __wine_pop_frame( &exc_frame->frame );
+ }
+ exc_frame->filter_level = 0;
+ siglongjmp( exc_frame->jmp, 1 );
+}
+
+static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,
+ EXCEPTION_REGISTRATION_RECORD *frame,
+ CONTEXT *context,
+ EXCEPTION_REGISTRATION_RECORD **pdispatcher )
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame *)frame;
+
+ if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND |
EH_NESTED_CALL))
+ {
+ if (exc_frame->finally_level && (record->ExceptionFlags &
(EH_UNWINDING | EH_EXIT_UNWIND)))
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ }
+ return ExceptionContinueSearch;
+ }
+ exc_frame->code = record->ExceptionCode;
+ if (exc_frame->filter_level && exc_frame->filter( exc_frame ) ==
EXCEPTION_EXECUTE_HANDLER)
+ __wine_rtl_unwind( frame, record, __widl_unwind_target );
+ return ExceptionContinueSearch;
+}
+
+#define RpcTryExcept \
+ if (!sigsetjmp( __frame->jmp, 0 )) \
+ { \
+ if (!__frame->finally_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->filter_level = __frame->finally_level + 1;
+
+#define RpcExcept(expr) \
+ if (!__frame->finally_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->filter_level = 0; \
+ } \
+ else \
+
+#define RpcEndExcept
+
+#define RpcExceptionCode() (__frame->code)
+
+#define RpcTryFinally \
+ if (!__frame->filter_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->finally_level = __frame->filter_level + 1;
+
+#define RpcFinally \
+ if (!__frame->filter_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->finally_level = 0;
+
+#define RpcEndFinally
+
+#define RpcAbnormalTermination() (__frame->abnormal_termination)
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { \
+ __frame->frame.Handler = __widl_exception_handler; \
+ __frame->filter = (__filter_func)(filter_func); \
+ __frame->finally = (__finally_func)(finally_func); \
+ __frame->abnormal_termination = 0; \
+ __frame->filter_level = 0; \
+ __frame->finally_level = 0; \
+ } while (0)
+
+#else /* USE_COMPILER_EXCEPTIONS */
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { (void)(filter_func); } while(0)
+
+#define __DECL_EXCEPTION_FRAME \
+ DWORD code;
+
+#endif /* USE_COMPILER_EXCEPTIONS */
+
+#define TYPE_FORMAT_STRING_SIZE 7
+#define PROC_FORMAT_STRING_SIZE 13
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[TYPE_FORMAT_STRING_SIZE];
+} MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[PROC_FORMAT_STRING_SIZE];
+} MIDL_PROC_FORMAT_STRING;
+
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/*****************************************************************************
+ * hello interface
+ */
+
+static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
+{
+ sizeof(RPC_CLIENT_INTERFACE),
+ {{0x906b0ce0,0xc70b,0x1067,{0xb3,0x17,0x00,0xdd,0x01,0x06,0x62,0xda}},{1,0}},
+ {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+RPC_IF_HANDLE hello_v1_0_c_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)&
hello___RpcClientInterface;
+
+static const MIDL_STUB_DESC hello_StubDesc;
+
+static RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
+
+struct __frame_HelloProc
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ RPC_BINDING_HANDLE _Handle;
+};
+
+static void __finally_HelloProc( struct __frame_HelloProc *__frame )
+{
+ NdrFreeBuffer(&__frame->_StubMsg);
+}
+
+void HelloProc(
+ handle_t h1,
+ unsigned char *pszString)
+{
+ struct __frame_HelloProc __f, * const __frame = &__f;
+ RPC_MESSAGE _RpcMessage;
+ __frame->_Handle = 0;
+
+ RpcExceptionInit( 0, __finally_HelloProc );
+ if (!pszString)
+ {
+ RpcRaiseException(RPC_X_NULL_REF_POINTER);
+ }
+
+ RpcTryFinally
+ {
+ NdrClientInitializeNew(&_RpcMessage, &__frame->_StubMsg,
&hello_StubDesc, 0);
+ __frame->_Handle = h1;
+
+ __frame->_StubMsg.BufferLength = 0;
+
+ NdrConformantStringBufferSize(
+ &__frame->_StubMsg,
+ (unsigned char *)pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4]);
+
+ NdrGetBuffer(&__frame->_StubMsg, __frame->_StubMsg.BufferLength,
__frame->_Handle);
+
+
+ NdrConformantStringMarshall(
+ &__frame->_StubMsg,
+ (unsigned char *)pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4]);
+
+ NdrSendReceive(&__frame->_StubMsg, __frame->_StubMsg.Buffer);
+
+ __frame->_StubMsg.BufferStart = _RpcMessage.Buffer;
+ __frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart +
_RpcMessage.BufferLength;
+
+ }
+ RpcFinally
+ {
+ __finally_HelloProc( __frame );
+ }
+ RpcEndFinally
+}
+
+struct __frame_Shutdown
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ RPC_BINDING_HANDLE _Handle;
+};
+
+static void __finally_Shutdown( struct __frame_Shutdown *__frame )
+{
+ NdrFreeBuffer(&__frame->_StubMsg);
+}
+
+void Shutdown(
+ handle_t h1)
+{
+ struct __frame_Shutdown __f, * const __frame = &__f;
+ RPC_MESSAGE _RpcMessage;
+ __frame->_Handle = 0;
+
+ RpcExceptionInit( 0, __finally_Shutdown );
+ RpcTryFinally
+ {
+ NdrClientInitializeNew(&_RpcMessage, &__frame->_StubMsg,
&hello_StubDesc, 1);
+ __frame->_Handle = h1;
+
+ __frame->_StubMsg.BufferLength = 0;
+
+ NdrGetBuffer(&__frame->_StubMsg, __frame->_StubMsg.BufferLength,
__frame->_Handle);
+
+
+ NdrSendReceive(&__frame->_StubMsg, __frame->_StubMsg.Buffer);
+
+ __frame->_StubMsg.BufferStart = _RpcMessage.Buffer;
+ __frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart +
_RpcMessage.BufferLength;
+
+ }
+ RpcFinally
+ {
+ __finally_Shutdown( __frame );
+ }
+ RpcEndFinally
+}
+
+#if !defined(__RPC_WIN32__)
+#error Invalid build platform for this stub.
+#endif
+
+static const MIDL_STUB_DESC hello_StubDesc =
+{
+ (void *)& hello___RpcClientInterface,
+ MIDL_user_allocate,
+ MIDL_user_free,
+ {
+ &hello__MIDL_AutoBindHandle,
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ __MIDL_TypeFormatString.Format,
+ 1, /* -error bounds_check flag */
+ 0x10001, /* Ndr library version */
+ 0,
+ 0x50100a4, /* MIDL Version 5.1.164 */
+ 0,
+ 0,
+ 0, /* notify & notify_flag routine table */
+ 1, /* Flags */
+ 0, /* Reserved3 */
+ 0, /* Reserved4 */
+ 0 /* Reserved5 */
+};
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+{
+ 0,
+ {
+/* 0 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 2 (parameter pszString) */
+ 0x4d, /* FC_IN_PARAM */
+ 0x01,
+ NdrFcShort(0x2), /* type offset = 2 */
+/* 6 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+/* 8 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 10 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+{
+ 0,
+ {
+ NdrFcShort(0x0),
+/* 2 (unsigned char *) */
+ 0x11, 0x8, /* FC_RP [simple_pointer] */
+/* 4 */
+ 0x22, /* FC_C_CSTRING */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+
+#else /* _WIN64 */
+
+#ifndef USE_COMPILER_EXCEPTIONS
+
+#include "wine/exception.h"
+#undef RpcTryExcept
+#undef RpcExcept
+#undef RpcEndExcept
+#undef RpcTryFinally
+#undef RpcFinally
+#undef RpcEndFinally
+#undef RpcExceptionCode
+#undef RpcAbnormalTermination
+
+struct __exception_frame;
+typedef int (*__filter_func)(struct __exception_frame *);
+typedef void (*__finally_func)(struct __exception_frame *);
+
+#define __DECL_EXCEPTION_FRAME \
+ EXCEPTION_REGISTRATION_RECORD frame; \
+ __filter_func filter; \
+ __finally_func finally; \
+ sigjmp_buf jmp; \
+ DWORD code; \
+ unsigned char abnormal_termination; \
+ unsigned char filter_level; \
+ unsigned char finally_level;
+
+struct __exception_frame
+{
+ __DECL_EXCEPTION_FRAME
+};
+
+static inline void __widl_unwind_target(void)
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame
*)__wine_get_frame();
+ if (exc_frame->finally_level > exc_frame->filter_level)
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ __wine_pop_frame( &exc_frame->frame );
+ }
+ exc_frame->filter_level = 0;
+ siglongjmp( exc_frame->jmp, 1 );
+}
+
+static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,
+ EXCEPTION_REGISTRATION_RECORD *frame,
+ CONTEXT *context,
+ EXCEPTION_REGISTRATION_RECORD **pdispatcher )
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame *)frame;
+
+ if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND |
EH_NESTED_CALL))
+ {
+ if (exc_frame->finally_level && (record->ExceptionFlags &
(EH_UNWINDING | EH_EXIT_UNWIND)))
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ }
+ return ExceptionContinueSearch;
+ }
+ exc_frame->code = record->ExceptionCode;
+ if (exc_frame->filter_level && exc_frame->filter( exc_frame ) ==
EXCEPTION_EXECUTE_HANDLER)
+ __wine_rtl_unwind( frame, record, __widl_unwind_target );
+ return ExceptionContinueSearch;
+}
+
+#define RpcTryExcept \
+ if (!sigsetjmp( __frame->jmp, 0 )) \
+ { \
+ if (!__frame->finally_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->filter_level = __frame->finally_level + 1;
+
+#define RpcExcept(expr) \
+ if (!__frame->finally_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->filter_level = 0; \
+ } \
+ else \
+
+#define RpcEndExcept
+
+#define RpcExceptionCode() (__frame->code)
+
+#define RpcTryFinally \
+ if (!__frame->filter_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->finally_level = __frame->filter_level + 1;
+
+#define RpcFinally \
+ if (!__frame->filter_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->finally_level = 0;
+
+#define RpcEndFinally
+
+#define RpcAbnormalTermination() (__frame->abnormal_termination)
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { \
+ __frame->frame.Handler = __widl_exception_handler; \
+ __frame->filter = (__filter_func)(filter_func); \
+ __frame->finally = (__finally_func)(finally_func); \
+ __frame->abnormal_termination = 0; \
+ __frame->filter_level = 0; \
+ __frame->finally_level = 0; \
+ } while (0)
+
+#else /* USE_COMPILER_EXCEPTIONS */
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { (void)(filter_func); } while(0)
+
+#define __DECL_EXCEPTION_FRAME \
+ DWORD code;
+
+#endif /* USE_COMPILER_EXCEPTIONS */
+
+#define TYPE_FORMAT_STRING_SIZE 7
+#define PROC_FORMAT_STRING_SIZE 13
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[TYPE_FORMAT_STRING_SIZE];
+} MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[PROC_FORMAT_STRING_SIZE];
+} MIDL_PROC_FORMAT_STRING;
+
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/*****************************************************************************
+ * hello interface
+ */
+
+static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
+{
+ sizeof(RPC_CLIENT_INTERFACE),
+ {{0x906b0ce0,0xc70b,0x1067,{0xb3,0x17,0x00,0xdd,0x01,0x06,0x62,0xda}},{1,0}},
+ {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+RPC_IF_HANDLE hello_v1_0_c_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)&
hello___RpcClientInterface;
+
+static const MIDL_STUB_DESC hello_StubDesc;
+
+static RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
+
+struct __frame_HelloProc
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ RPC_BINDING_HANDLE _Handle;
+};
+
+static void __finally_HelloProc( struct __frame_HelloProc *__frame )
+{
+ NdrFreeBuffer(&__frame->_StubMsg);
+}
+
+void HelloProc(
+ handle_t h1,
+ unsigned char *pszString)
+{
+ struct __frame_HelloProc __f, * const __frame = &__f;
+ RPC_MESSAGE _RpcMessage;
+ __frame->_Handle = 0;
+
+ RpcExceptionInit( 0, __finally_HelloProc );
+ if (!pszString)
+ {
+ RpcRaiseException(RPC_X_NULL_REF_POINTER);
+ }
+
+ RpcTryFinally
+ {
+ NdrClientInitializeNew(&_RpcMessage, &__frame->_StubMsg,
&hello_StubDesc, 0);
+ __frame->_Handle = h1;
+
+ __frame->_StubMsg.BufferLength = 0;
+
+ NdrConformantStringBufferSize(
+ &__frame->_StubMsg,
+ (unsigned char *)pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4]);
+
+ NdrGetBuffer(&__frame->_StubMsg, __frame->_StubMsg.BufferLength,
__frame->_Handle);
+
+
+ NdrConformantStringMarshall(
+ &__frame->_StubMsg,
+ (unsigned char *)pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4]);
+
+ NdrSendReceive(&__frame->_StubMsg, __frame->_StubMsg.Buffer);
+
+ __frame->_StubMsg.BufferStart = _RpcMessage.Buffer;
+ __frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart +
_RpcMessage.BufferLength;
+
+ }
+ RpcFinally
+ {
+ __finally_HelloProc( __frame );
+ }
+ RpcEndFinally
+}
+
+struct __frame_Shutdown
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ RPC_BINDING_HANDLE _Handle;
+};
+
+static void __finally_Shutdown( struct __frame_Shutdown *__frame )
+{
+ NdrFreeBuffer(&__frame->_StubMsg);
+}
+
+void Shutdown(
+ handle_t h1)
+{
+ struct __frame_Shutdown __f, * const __frame = &__f;
+ RPC_MESSAGE _RpcMessage;
+ __frame->_Handle = 0;
+
+ RpcExceptionInit( 0, __finally_Shutdown );
+ RpcTryFinally
+ {
+ NdrClientInitializeNew(&_RpcMessage, &__frame->_StubMsg,
&hello_StubDesc, 1);
+ __frame->_Handle = h1;
+
+ __frame->_StubMsg.BufferLength = 0;
+
+ NdrGetBuffer(&__frame->_StubMsg, __frame->_StubMsg.BufferLength,
__frame->_Handle);
+
+
+ NdrSendReceive(&__frame->_StubMsg, __frame->_StubMsg.Buffer);
+
+ __frame->_StubMsg.BufferStart = _RpcMessage.Buffer;
+ __frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart +
_RpcMessage.BufferLength;
+
+ }
+ RpcFinally
+ {
+ __finally_Shutdown( __frame );
+ }
+ RpcEndFinally
+}
+
+#if !defined(__RPC_WIN64__)
+#error Invalid build platform for this stub.
+#endif
+
+static const MIDL_STUB_DESC hello_StubDesc =
+{
+ (void *)& hello___RpcClientInterface,
+ MIDL_user_allocate,
+ MIDL_user_free,
+ {
+ &hello__MIDL_AutoBindHandle,
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ __MIDL_TypeFormatString.Format,
+ 1, /* -error bounds_check flag */
+ 0x10001, /* Ndr library version */
+ 0,
+ 0x50100a4, /* MIDL Version 5.1.164 */
+ 0,
+ 0,
+ 0, /* notify & notify_flag routine table */
+ 1, /* Flags */
+ 0, /* Reserved3 */
+ 0, /* Reserved4 */
+ 0 /* Reserved5 */
+};
+
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+{
+ 0,
+ {
+/* 0 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 2 (parameter pszString) */
+ 0x4d, /* FC_IN_PARAM */
+ 0x01,
+ NdrFcShort(0x2), /* type offset = 2 */
+/* 6 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+/* 8 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 10 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+{
+ 0,
+ {
+ NdrFcShort(0x0),
+/* 2 (unsigned char *) */
+ 0x11, 0x8, /* FC_RP [simple_pointer] */
+/* 4 */
+ 0x22, /* FC_C_CSTRING */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+
+#endif /* _WIN64 */
Propchange: branches/nyadav-audio-branch/base/services/testc/Hello_c.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/testc/Hello_c.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/testc/Helloc.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/testc/Helloc.c (added)
+++ branches/nyadav-audio-branch/base/services/testc/Helloc.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,63 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include "hello.h" // header file generated by MIDL compiler
+
+void __cdecl wmain(int argc, char **argv)
+{
+ RPC_STATUS status;
+
+ unsigned char * pszStringBinding = NULL;
+ unsigned char * pszString = "hello, world";
+
+ // Use a convenience function to concatenate the elements of
+ // the string binding into the proper sequence.
+ status =
RpcStringBindingCompose(NULL,L"ncacn_np",NULL,L"\\pipe\\audsrv",NULL,&pszStringBinding);
+ printf("RpcStringBindingCompose returned 0x%x\n", status);
+printf("**%s**\n",pszStringBinding);
+ // Set the binding handle that will be used to bind to the server.
+ status = RpcBindingFromStringBinding(pszStringBinding,
+ &hello_v1_0_c_ifspec);
+ printf("RpcBindingFromStringBinding returned 0x%x\n", status);
+
+
+ printf("Calling the remote procedure 'HelloProc'\n");
+ printf("Print the string '%s' on the server\n", pszString);
+
+ RpcTryExcept {
+ HelloProc(hello_v1_0_c_ifspec,pszString); // make call with user message
+ printf("Calling the remote procedure 'Shutdown'\n");
+ Shutdown(hello_v1_0_c_ifspec); // shut down the server side
+ }
+ RpcExcept(1) {
+ status = RpcExceptionCode();
+ printf("Runtime reported exception 0x%lx = %ld\n", status, status);
+
+
+ }
+ RpcEndExcept
+
+ // The calls to the remote procedures are complete.
+ // Free the string and the binding handle
+ status = RpcStringFree(&pszStringBinding); // remote calls done; unbind
+ printf("RpcStringFree returned 0x%x\n", status);
+
+ status = RpcBindingFree(&hello_v1_0_c_ifspec); // remote calls done; unbind
+ printf("RpcBindingFree returned 0x%x\n", status);
+ if (status) {
+ printf("4Error %d",status);
+ }
+
+ exit(0);
+
+} // end main()
+
+void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
+{
+ return(malloc(len));
+}
+
+void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
+{
+ free(ptr);
+}
Propchange: branches/nyadav-audio-branch/base/services/testc/Helloc.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/testc/Helloc.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: branches/nyadav-audio-branch/base/services/tests/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon May 30 11:32:19 2011
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: branches/nyadav-audio-branch/base/services/tests/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: branches/nyadav-audio-branch/base/services/tests/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/nyadav-audio-branch/base/services/tests/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt (added)
+++ branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt [iso-8859-1] Mon May
30 11:32:19 2011
@@ -1,0 +1,15 @@
+
+set_unicode()
+
+list(APPEND SOURCE
+ Hellos.c
+ Hellop.c
+ hello_s.c)
+
+add_executable(tests ${SOURCE})
+add_definitions(-D__USE_CRTIMP)
+target_link_libraries(tests ${PSEH_LIB})
+
+set_module_type(tests win32cui)
+add_importlibs(tests advapi32 rpcrt4 msvcrt kernel32 ntdll user32 ksuser setupapi)
+add_cab_target(tests 1)
Propchange: branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/tests/CMakeLists.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/tests/Hello.h
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/tests/Hello.h (added)
+++ branches/nyadav-audio-branch/base/services/tests/Hello.h [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,45 @@
+/*** Autogenerated by WIDL 0.4-SVN from Hello.idl - Do not edit ***/
+
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef __WIDL_HELLO_H
+#define __WIDL_HELLO_H
+
+/* Forward declarations */
+
+/* Headers for imported files */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*****************************************************************************
+ * hello interface (v1.0)
+ */
+#ifndef __hello_INTERFACE_DEFINED__
+#define __hello_INTERFACE_DEFINED__
+
+extern RPC_IF_HANDLE hello_v1_0_c_ifspec;
+extern RPC_IF_HANDLE hello_v1_0_s_ifspec;
+void HelloProc(
+ handle_t h1,
+ unsigned char *pszString);
+
+void Shutdown(
+ handle_t h1);
+
+
+#endif /* __hello_INTERFACE_DEFINED__ */
+
+/* Begin additional prototypes for all interfaces */
+
+
+/* End additional prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WIDL_HELLO_H */
Propchange: branches/nyadav-audio-branch/base/services/tests/Hello.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/tests/Hello.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/tests/Hello_s.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/tests/Hello_s.c (added)
+++ branches/nyadav-audio-branch/base/services/tests/Hello_s.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,824 @@
+/*** Autogenerated by WIDL 0.4-SVN from Hello.idl - Do not edit ***/
+#include <string.h>
+
+#include "Hello.h"
+
+#ifndef DECLSPEC_HIDDEN
+#define DECLSPEC_HIDDEN
+#endif
+
+#ifndef _WIN64
+
+#ifndef USE_COMPILER_EXCEPTIONS
+
+#include "wine/exception.h"
+#undef RpcTryExcept
+#undef RpcExcept
+#undef RpcEndExcept
+#undef RpcTryFinally
+#undef RpcFinally
+#undef RpcEndFinally
+#undef RpcExceptionCode
+#undef RpcAbnormalTermination
+
+struct __exception_frame;
+typedef int (*__filter_func)(struct __exception_frame *);
+typedef void (*__finally_func)(struct __exception_frame *);
+
+#define __DECL_EXCEPTION_FRAME \
+ EXCEPTION_REGISTRATION_RECORD frame; \
+ __filter_func filter; \
+ __finally_func finally; \
+ sigjmp_buf jmp; \
+ DWORD code; \
+ unsigned char abnormal_termination; \
+ unsigned char filter_level; \
+ unsigned char finally_level;
+
+struct __exception_frame
+{
+ __DECL_EXCEPTION_FRAME
+};
+
+static inline void __widl_unwind_target(void)
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame
*)__wine_get_frame();
+ if (exc_frame->finally_level > exc_frame->filter_level)
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ __wine_pop_frame( &exc_frame->frame );
+ }
+ exc_frame->filter_level = 0;
+ siglongjmp( exc_frame->jmp, 1 );
+}
+
+static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,
+ EXCEPTION_REGISTRATION_RECORD *frame,
+ CONTEXT *context,
+ EXCEPTION_REGISTRATION_RECORD **pdispatcher )
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame *)frame;
+
+ if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND |
EH_NESTED_CALL))
+ {
+ if (exc_frame->finally_level && (record->ExceptionFlags &
(EH_UNWINDING | EH_EXIT_UNWIND)))
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ }
+ return ExceptionContinueSearch;
+ }
+ exc_frame->code = record->ExceptionCode;
+ if (exc_frame->filter_level && exc_frame->filter( exc_frame ) ==
EXCEPTION_EXECUTE_HANDLER)
+ __wine_rtl_unwind( frame, record, __widl_unwind_target );
+ return ExceptionContinueSearch;
+}
+
+#define RpcTryExcept \
+ if (!sigsetjmp( __frame->jmp, 0 )) \
+ { \
+ if (!__frame->finally_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->filter_level = __frame->finally_level + 1;
+
+#define RpcExcept(expr) \
+ if (!__frame->finally_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->filter_level = 0; \
+ } \
+ else \
+
+#define RpcEndExcept
+
+#define RpcExceptionCode() (__frame->code)
+
+#define RpcTryFinally \
+ if (!__frame->filter_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->finally_level = __frame->filter_level + 1;
+
+#define RpcFinally \
+ if (!__frame->filter_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->finally_level = 0;
+
+#define RpcEndFinally
+
+#define RpcAbnormalTermination() (__frame->abnormal_termination)
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { \
+ __frame->frame.Handler = __widl_exception_handler; \
+ __frame->filter = (__filter_func)(filter_func); \
+ __frame->finally = (__finally_func)(finally_func); \
+ __frame->abnormal_termination = 0; \
+ __frame->filter_level = 0; \
+ __frame->finally_level = 0; \
+ } while (0)
+
+#else /* USE_COMPILER_EXCEPTIONS */
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { (void)(filter_func); } while(0)
+
+#define __DECL_EXCEPTION_FRAME \
+ DWORD code;
+
+#endif /* USE_COMPILER_EXCEPTIONS */
+
+struct __server_frame
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+};
+
+static int __server_filter( struct __server_frame *__frame )
+{
+ return (__frame->code == STATUS_ACCESS_VIOLATION) ||
+ (__frame->code == STATUS_DATATYPE_MISALIGNMENT) ||
+ (__frame->code == RPC_X_BAD_STUB_DATA) ||
+ (__frame->code == RPC_S_INVALID_BOUND);
+}
+
+#define TYPE_FORMAT_STRING_SIZE 7
+#define PROC_FORMAT_STRING_SIZE 13
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[TYPE_FORMAT_STRING_SIZE];
+} MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[PROC_FORMAT_STRING_SIZE];
+} MIDL_PROC_FORMAT_STRING;
+
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/*****************************************************************************
+ * hello interface
+ */
+
+static RPC_DISPATCH_TABLE hello_v1_0_DispatchTable;
+static const MIDL_SERVER_INFO hello_ServerInfo;
+
+static const RPC_SERVER_INTERFACE hello___RpcServerInterface =
+{
+ sizeof(RPC_SERVER_INTERFACE),
+ {{0x906b0ce0,0xc70b,0x1067,{0xb3,0x17,0x00,0xdd,0x01,0x06,0x62,0xda}},{1,0}},
+ {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
+ &hello_v1_0_DispatchTable,
+ 0,
+ 0,
+ 0,
+ &hello_ServerInfo,
+ 0,
+};
+RPC_IF_HANDLE hello_v1_0_s_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)&
hello___RpcServerInterface;
+
+static const MIDL_STUB_DESC hello_StubDesc;
+
+struct __frame_hello_HelloProc
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ handle_t h1;
+ unsigned char * pszString;
+};
+
+static void __finally_hello_HelloProc( struct __frame_hello_HelloProc *__frame )
+{
+
+ NdrPointerFree(
+ &__frame->_StubMsg,
+ (unsigned char *)__frame->pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[2]);
+
+}
+
+void __RPC_STUB hello_HelloProc( PRPC_MESSAGE _pRpcMessage )
+{
+ struct __frame_hello_HelloProc __f, * const __frame = &__f;
+
+ NdrServerInitializeNew(
+ _pRpcMessage,
+ &__frame->_StubMsg,
+ &hello_StubDesc);
+
+ RpcExceptionInit( __server_filter, __finally_hello_HelloProc );
+ __frame->pszString = 0;
+
+ __frame->h1 = _pRpcMessage->Handle;
+
+ RpcTryFinally
+ {
+ RpcTryExcept
+ {
+ if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) !=
NDR_LOCAL_DATA_REPRESENTATION)
+ NdrConvert(&__frame->_StubMsg,
(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[0]);
+
+
+ NdrConformantStringUnmarshall(
+ &__frame->_StubMsg,
+ (unsigned char **)&__frame->pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4],
+ 0);
+
+ if (__frame->_StubMsg.Buffer > __frame->_StubMsg.BufferEnd)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ }
+ RpcExcept(RPC_BAD_STUB_DATA_EXCEPTION_FILTER)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ RpcEndExcept
+
+ HelloProc(
+ __frame->h1,
+ __frame->pszString);
+ }
+ RpcFinally
+ {
+ __finally_hello_HelloProc( __frame );
+ }
+ RpcEndFinally
+
+ _pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char
*)_pRpcMessage->Buffer;
+}
+
+struct __frame_hello_Shutdown
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ handle_t h1;
+};
+
+static void __finally_hello_Shutdown( struct __frame_hello_Shutdown *__frame )
+{
+
+}
+
+void __RPC_STUB hello_Shutdown( PRPC_MESSAGE _pRpcMessage )
+{
+ struct __frame_hello_Shutdown __f, * const __frame = &__f;
+
+ NdrServerInitializeNew(
+ _pRpcMessage,
+ &__frame->_StubMsg,
+ &hello_StubDesc);
+
+ RpcExceptionInit( __server_filter, __finally_hello_Shutdown );
+
+ __frame->h1 = _pRpcMessage->Handle;
+
+ RpcTryFinally
+ {
+ RpcTryExcept
+ {
+ if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) !=
NDR_LOCAL_DATA_REPRESENTATION)
+ NdrConvert(&__frame->_StubMsg,
(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[8]);
+
+
+ if (__frame->_StubMsg.Buffer > __frame->_StubMsg.BufferEnd)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ }
+ RpcExcept(RPC_BAD_STUB_DATA_EXCEPTION_FILTER)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ RpcEndExcept
+
+ Shutdown(
+ __frame->h1);
+ }
+ RpcFinally
+ {
+ __finally_hello_Shutdown( __frame );
+ }
+ RpcEndFinally
+
+ _pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char
*)_pRpcMessage->Buffer;
+}
+
+#if !defined(__RPC_WIN32__)
+#error Invalid build platform for this stub.
+#endif
+
+static const unsigned short hello_FormatStringOffsetTable[] =
+{
+ 0, /* HelloProc */
+ 8, /* Shutdown */
+};
+
+static const MIDL_STUB_DESC hello_StubDesc =
+{
+ (void *)& hello___RpcServerInterface,
+ MIDL_user_allocate,
+ MIDL_user_free,
+ {
+ 0,
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ __MIDL_TypeFormatString.Format,
+ 1, /* -error bounds_check flag */
+ 0x10001, /* Ndr library version */
+ 0,
+ 0x50100a4, /* MIDL Version 5.1.164 */
+ 0,
+ 0,
+ 0, /* notify & notify_flag routine table */
+ 1, /* Flags */
+ 0, /* Reserved3 */
+ 0, /* Reserved4 */
+ 0 /* Reserved5 */
+};
+
+static RPC_DISPATCH_FUNCTION hello_table[] =
+{
+ hello_HelloProc,
+ hello_Shutdown,
+ 0
+};
+static RPC_DISPATCH_TABLE hello_v1_0_DispatchTable =
+{
+ 2,
+ hello_table
+};
+
+static const SERVER_ROUTINE hello_ServerRoutineTable[] =
+{
+ (SERVER_ROUTINE)HelloProc,
+ (SERVER_ROUTINE)Shutdown,
+};
+
+static const MIDL_SERVER_INFO hello_ServerInfo =
+{
+ &hello_StubDesc,
+ hello_ServerRoutineTable,
+ __MIDL_ProcFormatString.Format,
+ hello_FormatStringOffsetTable,
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+{
+ 0,
+ {
+/* 0 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 2 (parameter pszString) */
+ 0x4d, /* FC_IN_PARAM */
+ 0x01,
+ NdrFcShort(0x2), /* type offset = 2 */
+/* 6 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+/* 8 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 10 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+{
+ 0,
+ {
+ NdrFcShort(0x0),
+/* 2 (unsigned char *) */
+ 0x11, 0x8, /* FC_RP [simple_pointer] */
+/* 4 */
+ 0x22, /* FC_C_CSTRING */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+
+#else /* _WIN64 */
+
+#ifndef USE_COMPILER_EXCEPTIONS
+
+#include "wine/exception.h"
+#undef RpcTryExcept
+#undef RpcExcept
+#undef RpcEndExcept
+#undef RpcTryFinally
+#undef RpcFinally
+#undef RpcEndFinally
+#undef RpcExceptionCode
+#undef RpcAbnormalTermination
+
+struct __exception_frame;
+typedef int (*__filter_func)(struct __exception_frame *);
+typedef void (*__finally_func)(struct __exception_frame *);
+
+#define __DECL_EXCEPTION_FRAME \
+ EXCEPTION_REGISTRATION_RECORD frame; \
+ __filter_func filter; \
+ __finally_func finally; \
+ sigjmp_buf jmp; \
+ DWORD code; \
+ unsigned char abnormal_termination; \
+ unsigned char filter_level; \
+ unsigned char finally_level;
+
+struct __exception_frame
+{
+ __DECL_EXCEPTION_FRAME
+};
+
+static inline void __widl_unwind_target(void)
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame
*)__wine_get_frame();
+ if (exc_frame->finally_level > exc_frame->filter_level)
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ __wine_pop_frame( &exc_frame->frame );
+ }
+ exc_frame->filter_level = 0;
+ siglongjmp( exc_frame->jmp, 1 );
+}
+
+static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,
+ EXCEPTION_REGISTRATION_RECORD *frame,
+ CONTEXT *context,
+ EXCEPTION_REGISTRATION_RECORD **pdispatcher )
+{
+ struct __exception_frame *exc_frame = (struct __exception_frame *)frame;
+
+ if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND |
EH_NESTED_CALL))
+ {
+ if (exc_frame->finally_level && (record->ExceptionFlags &
(EH_UNWINDING | EH_EXIT_UNWIND)))
+ {
+ exc_frame->abnormal_termination = 1;
+ exc_frame->finally( exc_frame );
+ }
+ return ExceptionContinueSearch;
+ }
+ exc_frame->code = record->ExceptionCode;
+ if (exc_frame->filter_level && exc_frame->filter( exc_frame ) ==
EXCEPTION_EXECUTE_HANDLER)
+ __wine_rtl_unwind( frame, record, __widl_unwind_target );
+ return ExceptionContinueSearch;
+}
+
+#define RpcTryExcept \
+ if (!sigsetjmp( __frame->jmp, 0 )) \
+ { \
+ if (!__frame->finally_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->filter_level = __frame->finally_level + 1;
+
+#define RpcExcept(expr) \
+ if (!__frame->finally_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->filter_level = 0; \
+ } \
+ else \
+
+#define RpcEndExcept
+
+#define RpcExceptionCode() (__frame->code)
+
+#define RpcTryFinally \
+ if (!__frame->filter_level) \
+ __wine_push_frame( &__frame->frame ); \
+ __frame->finally_level = __frame->filter_level + 1;
+
+#define RpcFinally \
+ if (!__frame->filter_level) \
+ __wine_pop_frame( &__frame->frame ); \
+ __frame->finally_level = 0;
+
+#define RpcEndFinally
+
+#define RpcAbnormalTermination() (__frame->abnormal_termination)
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { \
+ __frame->frame.Handler = __widl_exception_handler; \
+ __frame->filter = (__filter_func)(filter_func); \
+ __frame->finally = (__finally_func)(finally_func); \
+ __frame->abnormal_termination = 0; \
+ __frame->filter_level = 0; \
+ __frame->finally_level = 0; \
+ } while (0)
+
+#else /* USE_COMPILER_EXCEPTIONS */
+
+#define RpcExceptionInit(filter_func,finally_func) \
+ do { (void)(filter_func); } while(0)
+
+#define __DECL_EXCEPTION_FRAME \
+ DWORD code;
+
+#endif /* USE_COMPILER_EXCEPTIONS */
+
+struct __server_frame
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+};
+
+static int __server_filter( struct __server_frame *__frame )
+{
+ return (__frame->code == STATUS_ACCESS_VIOLATION) ||
+ (__frame->code == STATUS_DATATYPE_MISALIGNMENT) ||
+ (__frame->code == RPC_X_BAD_STUB_DATA) ||
+ (__frame->code == RPC_S_INVALID_BOUND);
+}
+
+#define TYPE_FORMAT_STRING_SIZE 7
+#define PROC_FORMAT_STRING_SIZE 13
+
+typedef struct _MIDL_TYPE_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[TYPE_FORMAT_STRING_SIZE];
+} MIDL_TYPE_FORMAT_STRING;
+
+typedef struct _MIDL_PROC_FORMAT_STRING
+{
+ short Pad;
+ unsigned char Format[PROC_FORMAT_STRING_SIZE];
+} MIDL_PROC_FORMAT_STRING;
+
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
+
+/*****************************************************************************
+ * hello interface
+ */
+
+static RPC_DISPATCH_TABLE hello_v1_0_DispatchTable;
+static const MIDL_SERVER_INFO hello_ServerInfo;
+
+static const RPC_SERVER_INTERFACE hello___RpcServerInterface =
+{
+ sizeof(RPC_SERVER_INTERFACE),
+ {{0x906b0ce0,0xc70b,0x1067,{0xb3,0x17,0x00,0xdd,0x01,0x06,0x62,0xda}},{1,0}},
+ {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
+ &hello_v1_0_DispatchTable,
+ 0,
+ 0,
+ 0,
+ &hello_ServerInfo,
+ 0,
+};
+RPC_IF_HANDLE hello_v1_0_s_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)&
hello___RpcServerInterface;
+
+static const MIDL_STUB_DESC hello_StubDesc;
+
+struct __frame_hello_HelloProc
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ handle_t h1;
+ unsigned char * pszString;
+};
+
+static void __finally_hello_HelloProc( struct __frame_hello_HelloProc *__frame )
+{
+
+ NdrPointerFree(
+ &__frame->_StubMsg,
+ (unsigned char *)__frame->pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[2]);
+
+}
+
+void __RPC_STUB hello_HelloProc( PRPC_MESSAGE _pRpcMessage )
+{
+ struct __frame_hello_HelloProc __f, * const __frame = &__f;
+
+ NdrServerInitializeNew(
+ _pRpcMessage,
+ &__frame->_StubMsg,
+ &hello_StubDesc);
+
+ RpcExceptionInit( __server_filter, __finally_hello_HelloProc );
+ __frame->pszString = 0;
+
+ __frame->h1 = _pRpcMessage->Handle;
+
+ RpcTryFinally
+ {
+ RpcTryExcept
+ {
+ if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) !=
NDR_LOCAL_DATA_REPRESENTATION)
+ NdrConvert(&__frame->_StubMsg,
(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[0]);
+
+
+ NdrConformantStringUnmarshall(
+ &__frame->_StubMsg,
+ (unsigned char **)&__frame->pszString,
+ (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[4],
+ 0);
+
+ if (__frame->_StubMsg.Buffer > __frame->_StubMsg.BufferEnd)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ }
+ RpcExcept(RPC_BAD_STUB_DATA_EXCEPTION_FILTER)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ RpcEndExcept
+
+ HelloProc(
+ __frame->h1,
+ __frame->pszString);
+ }
+ RpcFinally
+ {
+ __finally_hello_HelloProc( __frame );
+ }
+ RpcEndFinally
+
+ _pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char
*)_pRpcMessage->Buffer;
+}
+
+struct __frame_hello_Shutdown
+{
+ __DECL_EXCEPTION_FRAME
+ MIDL_STUB_MESSAGE _StubMsg;
+ handle_t h1;
+};
+
+static void __finally_hello_Shutdown( struct __frame_hello_Shutdown *__frame )
+{
+
+}
+
+void __RPC_STUB hello_Shutdown( PRPC_MESSAGE _pRpcMessage )
+{
+ struct __frame_hello_Shutdown __f, * const __frame = &__f;
+
+ NdrServerInitializeNew(
+ _pRpcMessage,
+ &__frame->_StubMsg,
+ &hello_StubDesc);
+
+ RpcExceptionInit( __server_filter, __finally_hello_Shutdown );
+
+ __frame->h1 = _pRpcMessage->Handle;
+
+ RpcTryFinally
+ {
+ RpcTryExcept
+ {
+ if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) !=
NDR_LOCAL_DATA_REPRESENTATION)
+ NdrConvert(&__frame->_StubMsg,
(PFORMAT_STRING)&__MIDL_ProcFormatString.Format[8]);
+
+
+ if (__frame->_StubMsg.Buffer > __frame->_StubMsg.BufferEnd)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ }
+ RpcExcept(RPC_BAD_STUB_DATA_EXCEPTION_FILTER)
+ {
+ RpcRaiseException(RPC_X_BAD_STUB_DATA);
+ }
+ RpcEndExcept
+
+ Shutdown(
+ __frame->h1);
+ }
+ RpcFinally
+ {
+ __finally_hello_Shutdown( __frame );
+ }
+ RpcEndFinally
+
+ _pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char
*)_pRpcMessage->Buffer;
+}
+
+#if !defined(__RPC_WIN64__)
+#error Invalid build platform for this stub.
+#endif
+
+static const unsigned short hello_FormatStringOffsetTable[] =
+{
+ 0, /* HelloProc */
+ 8, /* Shutdown */
+};
+
+static const MIDL_STUB_DESC hello_StubDesc =
+{
+ (void *)& hello___RpcServerInterface,
+ MIDL_user_allocate,
+ MIDL_user_free,
+ {
+ 0,
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ __MIDL_TypeFormatString.Format,
+ 1, /* -error bounds_check flag */
+ 0x10001, /* Ndr library version */
+ 0,
+ 0x50100a4, /* MIDL Version 5.1.164 */
+ 0,
+ 0,
+ 0, /* notify & notify_flag routine table */
+ 1, /* Flags */
+ 0, /* Reserved3 */
+ 0, /* Reserved4 */
+ 0 /* Reserved5 */
+};
+
+static RPC_DISPATCH_FUNCTION hello_table[] =
+{
+ hello_HelloProc,
+ hello_Shutdown,
+ 0
+};
+static RPC_DISPATCH_TABLE hello_v1_0_DispatchTable =
+{
+ 2,
+ hello_table
+};
+
+static const SERVER_ROUTINE hello_ServerRoutineTable[] =
+{
+ (SERVER_ROUTINE)HelloProc,
+ (SERVER_ROUTINE)Shutdown,
+};
+
+static const MIDL_SERVER_INFO hello_ServerInfo =
+{
+ &hello_StubDesc,
+ hello_ServerRoutineTable,
+ __MIDL_ProcFormatString.Format,
+ hello_FormatStringOffsetTable,
+ 0,
+ 0,
+ 0,
+ 0
+};
+
+static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
+{
+ 0,
+ {
+/* 0 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 2 (parameter pszString) */
+ 0x4d, /* FC_IN_PARAM */
+ 0x01,
+ NdrFcShort(0x2), /* type offset = 2 */
+/* 6 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+/* 8 (parameter h1) */
+ 0x4e, /* FC_IN_PARAM_BASETYPE */
+ 0x0f, /* FC_IGNORE */
+/* 10 (void) */
+ 0x5b, /* FC_END */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
+{
+ 0,
+ {
+ NdrFcShort(0x0),
+/* 2 (unsigned char *) */
+ 0x11, 0x8, /* FC_RP [simple_pointer] */
+/* 4 */
+ 0x22, /* FC_C_CSTRING */
+ 0x5c, /* FC_PAD */
+ 0x0
+ }
+};
+
+
+#endif /* _WIN64 */
Propchange: branches/nyadav-audio-branch/base/services/tests/Hello_s.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/tests/Hello_s.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/tests/Hellop.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/tests/Hellop.c (added)
+++ branches/nyadav-audio-branch/base/services/tests/Hellop.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,58 @@
+// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
+// PARTICULAR PURPOSE.
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+/****************************************************************************
+ Microsoft RPC
+
+ Hello Example
+
+ FILE: hellop.c
+
+ PURPOSE: Remote procedures that are linked with the server
+ side of RPC distributed application
+
+ FUNCTIONS: HelloProc() - prints "hello, world" or other string
+ sent by client to server
+
+ COMMENTS: This version of the distributed application that prints
+ "hello, world" (or other string) on the server features
+ a client that manages its connection to the server.
+ It uses the binding handle hello_IfHandle, defined in
+ the file hello.h.
+
+****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "hello.h" // header file generated by MIDL compiler
+
+void HelloProc(IN RPC_BINDING_HANDLE hBinding,unsigned char * pszString)
+{
+ printf("%s\n", pszString);
+}
+
+void Shutdown(IN RPC_BINDING_HANDLE hBinding)
+{
+ RPC_STATUS status;
+
+ printf("Calling RpcMgmtStopServerListening\n");
+ status = RpcMgmtStopServerListening(NULL);
+ printf("RpcMgmtStopServerListening returned: 0x%x\n", status);
+ if (status) {
+ exit(status);
+ }
+
+ printf("Calling RpcServerUnregisterIf\n");
+ status = RpcServerUnregisterIf(NULL, NULL, FALSE);
+ printf("RpcServerUnregisterIf returned 0x%x\n", status);
+ if (status) {
+ exit(status);
+ }
+}
+
+/* end file hellop.c */
Propchange: branches/nyadav-audio-branch/base/services/tests/Hellop.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/tests/Hellop.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: branches/nyadav-audio-branch/base/services/tests/Hellos.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
==============================================================================
--- branches/nyadav-audio-branch/base/services/tests/Hellos.c (added)
+++ branches/nyadav-audio-branch/base/services/tests/Hellos.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,0 +1,33 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include "hello.h" // header file generated by MIDL compiler
+#include "string.h"
+
+void __cdecl wmain(int argc, char * argv[])
+{
+ RPC_STATUS status;
+
+ status = RpcServerUseProtseqEp(L"ncacn_np", 20, L"\\pipe\\audsrv",
NULL);
+ printf("RpcServerUseProtseqEp returned 0x%x\n", status);
+
+ status = RpcServerRegisterIfEx(hello_v1_0_s_ifspec, NULL, NULL, 0,
RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL );
+ printf("RpcServerRegisterIfEx returned 0x%x\n", status);
+
+ printf("Calling RpcServerListen\n");
+
+ status = RpcServerListen(1,20,FALSE);
+ printf("RpcServerListen returned: 0x%x\n", status);
+
+
+}
+
+void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
+{
+ return(malloc(len));
+}
+
+void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
+{
+ free(ptr);
+}
Propchange: branches/nyadav-audio-branch/base/services/tests/Hellos.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/nyadav-audio-branch/base/services/tests/Hellos.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/dll/win32/audsrvapi/audsrvapi.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,19 +1,44 @@
#include "audsrvapi.h"
/*All the wrappers for Remote Function should be here*/
-int status = 0; /*There can be any structure which can hold the connection status*/
-/*Every Function should ensure connection*/
-
+int status = 0;
/*Initialize an audio stream
*Return -1 if callbacks are NULL pointers
*/
WINAPI int initstream (ClientStream * clientstream,LONG frequency,int channels,int
bitspersample, ULONG channelmask,int volume,int mute,float balance)
{
+ RPC_STATUS status;
+ unsigned char * pszStringBinding = NULL;
+
+
if(clientstream == NULL ) return -1;
if (clientstream->callbacks.OpenComplete == NULL ||
clientstream->callbacks.BufferCopied == NULL || clientstream->callbacks.PlayComplete
== NULL) return -2;
/*Validity of all other data will be checked at server*/
/*Check Connection Status If not connected call Connect()*/
/*If connected Properly call the remote audsrv_initstream() function*/
+ status =
RpcStringBindingCompose(NULL,L"ncacn_np",NULL,L"\\pipe\\audsrv",
NULL,&pszStringBinding);
+
+ status = RpcBindingFromStringBinding(pszStringBinding, &audsrv_v0_0_c_ifspec);
+
+ if (status) printf("Connection Problem p %d \n",status);
+
+ status = RpcStringFree(&pszStringBinding);
+
+ if (status) printf("Problem Freeing String : %d \n",status);
+
+
+ RpcTryExcept
+ {
+ AUDInitStream (&audsrv_v0_0_c_ifspec);
+ }
+ RpcExcept(1)
+ {
+ status = RpcExceptionCode();
+ printf("Runtime reported exception 0x%lx = %ld\n", status, status);
+ }
+ RpcEndExcept
+ status = RpcBindingFree(&audsrv_v0_0_c_ifspec);
+ if (status == RPC_S_INVALID_BINDING) printf("Error : %d Invalid RPC S
HANDLE\n",status);
/*Analyse the return by the function*/
/*Currently Suppose the return is 0 and a valid streamid is returned*/
clientstream->stream = &status;
@@ -24,7 +49,7 @@
return 0;
}
-WINAPI int playaudio ( ClientStream * clientstream)
+WINAPI int playaudio ( ClientStream * clientstream )
{
/*This is an ActiveScheduler*/
clientstream->callbacks.OpenComplete(0);
@@ -47,7 +72,6 @@
WINAPI int stopaudio (ClientStream * clientstream )
{
/*Server Side termination is remaining*/
- /*Check Connection Status If not connected call Connect()*/
/*If connected Properly call the remote audsrv_stop() function*/
clientstream->dead = 1; /*Client Side termination*/
}
@@ -67,4 +91,19 @@
}
WINAPI int GetBalance(ClientStream * clientstream ,float * balance)
{
+}
+
+
+/******************************************************/
+/* MIDL allocate and free */
+/******************************************************/
+
+void __RPC_FAR * __RPC_USER midl_user_allocate(SIZE_T len)
+{
+ return(malloc(len));
+}
+
+void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
+{
+ free(ptr);
}
Modified: branches/nyadav-audio-branch/dll/win32/audsrvapi/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/dll/win32/a…
==============================================================================
--- branches/nyadav-audio-branch/dll/win32/audsrvapi/dllmain.c [iso-8859-1] (original)
+++ branches/nyadav-audio-branch/dll/win32/audsrvapi/dllmain.c [iso-8859-1] Mon May 30
11:32:19 2011
@@ -1,18 +1,20 @@
#include "audsrvapi.h"
+
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
-{
+{
+
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
- break;
+ break;
}
return TRUE;
}
Modified: branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/drivers/wdm…
==============================================================================
--- branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/CMakeLists.txt
[iso-8859-1] (original)
+++ branches/nyadav-audio-branch/drivers/wdm/audio/backpln/audclient/CMakeLists.txt
[iso-8859-1] Mon May 30 11:32:19 2011
@@ -8,3 +8,4 @@
set_module_type(audclient win32cui)
add_importlibs(audclient audsrvapi advapi32 user32 ksuser setupapi msvcrt kernel32)
add_cab_target(audclient 1)
+add_dependencies(audclient audsrvapi)
Modified: branches/nyadav-audio-branch/include/reactos/idl/audsrvrpc.idl
URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/include/rea…
==============================================================================
--- branches/nyadav-audio-branch/include/reactos/idl/audsrvrpc.idl [iso-8859-1]
(original)
+++ branches/nyadav-audio-branch/include/reactos/idl/audsrvrpc.idl [iso-8859-1] Mon May 30
11:32:19 2011
@@ -37,6 +37,6 @@
interface audsrv
{
- NTSTATUS AUDInitStream([in] AUDSRV_HANDLE *streamthread);
+ NTSTATUS AUDInitStream([in] handle_t h1);
}