Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0ad28a85
Commit
0ad28a85
authored
Dec 01, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Make the generated global variables and functions hidden.
parent
a3072430
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
16 deletions
+35
-16
rpcproxy.h
include/rpcproxy.h
+16
-9
client.c
tools/widl/client.c
+6
-2
proxy.c
tools/widl/proxy.c
+5
-1
server.c
tools/widl/server.c
+8
-4
No files found.
include/rpcproxy.h
View file @
0ad28a85
...
@@ -125,7 +125,7 @@ typedef struct tagCStdPSFactoryBuffer
...
@@ -125,7 +125,7 @@ typedef struct tagCStdPSFactoryBuffer
#define STUB_FORWARDING_FUNCTION NdrStubForwardingFunction
#define STUB_FORWARDING_FUNCTION NdrStubForwardingFunction
ULONG
STDMETHODCALLTYPE
CStdStubBuffer2_Release
(
IRpcStubBuffer
*
This
);
ULONG
STDMETHODCALLTYPE
CStdStubBuffer2_Release
(
IRpcStubBuffer
*
This
)
DECLSPEC_HIDDEN
;
ULONG
STDMETHODCALLTYPE
NdrCStdStubBuffer2_Release
(
IRpcStubBuffer
*
This
,
IPSFactoryBuffer
*
pPSF
);
ULONG
STDMETHODCALLTYPE
NdrCStdStubBuffer2_Release
(
IRpcStubBuffer
*
This
,
IPSFactoryBuffer
*
pPSF
);
#define CStdStubBuffer_DELEGATING_METHODS 0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0
#define CStdStubBuffer_DELEGATING_METHODS 0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0
...
@@ -136,7 +136,7 @@ HRESULT WINAPI
...
@@ -136,7 +136,7 @@ HRESULT WINAPI
ULONG
WINAPI
ULONG
WINAPI
CStdStubBuffer_AddRef
(
IRpcStubBuffer
*
This
);
CStdStubBuffer_AddRef
(
IRpcStubBuffer
*
This
);
ULONG
WINAPI
ULONG
WINAPI
CStdStubBuffer_Release
(
IRpcStubBuffer
*
This
);
CStdStubBuffer_Release
(
IRpcStubBuffer
*
This
)
DECLSPEC_HIDDEN
;
ULONG
WINAPI
ULONG
WINAPI
NdrCStdStubBuffer_Release
(
IRpcStubBuffer
*
This
,
IPSFactoryBuffer
*
pPSF
);
NdrCStdStubBuffer_Release
(
IRpcStubBuffer
*
This
,
IPSFactoryBuffer
*
pPSF
);
HRESULT
WINAPI
HRESULT
WINAPI
...
@@ -233,10 +233,10 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -233,10 +233,10 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
/* macros used in dlldata.c files */
/* macros used in dlldata.c files */
#define EXTERN_PROXY_FILE(proxy) \
#define EXTERN_PROXY_FILE(proxy) \
EXTERN_C const ProxyFileInfo proxy##_ProxyFileInfo;
EXTERN_C const ProxyFileInfo proxy##_ProxyFileInfo
DECLSPEC_HIDDEN
;
#define PROXYFILE_LIST_START \
#define PROXYFILE_LIST_START \
const ProxyFileInfo *
aProxyFileList[]
= \
const ProxyFileInfo *
aProxyFileList[] DECLSPEC_HIDDEN
= \
{
{
#define REFERENCE_PROXY_FILE(proxy) \
#define REFERENCE_PROXY_FILE(proxy) \
...
@@ -251,11 +251,11 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -251,11 +251,11 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
/* define PROXY_CLSID_IS to specify the CLSID data of the PSFactoryBuffer */
/* define PROXY_CLSID_IS to specify the CLSID data of the PSFactoryBuffer */
/* define neither to use the GUID of the first interface */
/* define neither to use the GUID of the first interface */
#ifdef PROXY_CLSID
#ifdef PROXY_CLSID
# define CLSID_PSFACTORYBUFFER extern CLSID PROXY_CLSID;
# define CLSID_PSFACTORYBUFFER extern CLSID PROXY_CLSID
DECLSPEC_HIDDEN
;
#else
#else
# ifdef PROXY_CLSID_IS
# ifdef PROXY_CLSID_IS
# define CLSID_PSFACTORYBUFFER const CLSID CLSID_PSFactoryBuffer
=
\
# define CLSID_PSFACTORYBUFFER const CLSID CLSID_PSFactoryBuffer
DECLSPEC_HIDDEN;
\
PROXY_CLSID_IS;
const CLSID CLSID_PSFactoryBuffer =
PROXY_CLSID_IS;
# define PROXY_CLSID CLSID_PSFactoryBuffer
# define PROXY_CLSID CLSID_PSFactoryBuffer
# else
# else
# define CLSID_PSFACTORYBUFFER
# define CLSID_PSFACTORYBUFFER
...
@@ -287,6 +287,8 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -287,6 +287,8 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
#define DLLDATA_GETPROXYDLLINFO(pfl, rclsid) \
#define DLLDATA_GETPROXYDLLINFO(pfl, rclsid) \
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
const CLSID **ppClsid) DECLSPEC_HIDDEN; \
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
const CLSID **ppClsid) \
const CLSID **ppClsid) \
{ \
{ \
*ppProxyFileInfo = (pfl); \
*ppProxyFileInfo = (pfl); \
...
@@ -294,6 +296,7 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -294,6 +296,7 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
}
}
#define DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, factory) \
#define DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, factory) \
HRESULT WINAPI DLLGETCLASSOBJECT_ENTRY(REFCLSID rclsid, REFIID riid, void **ppv) DECLSPEC_HIDDEN; \
HRESULT WINAPI DLLGETCLASSOBJECT_ENTRY(REFCLSID rclsid, REFIID riid, \
HRESULT WINAPI DLLGETCLASSOBJECT_ENTRY(REFCLSID rclsid, REFIID riid, \
void **ppv) \
void **ppv) \
{ \
{ \
...
@@ -302,14 +305,16 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -302,14 +305,16 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
}
}
#define DLLCANUNLOADNOW(factory) \
#define DLLCANUNLOADNOW(factory) \
HRESULT WINAPI DLLCANUNLOADNOW_ENTRY(void) DECLSPEC_HIDDEN; \
HRESULT WINAPI DLLCANUNLOADNOW_ENTRY(void) \
HRESULT WINAPI DLLCANUNLOADNOW_ENTRY(void) \
{ \
{ \
return NdrDllCanUnloadNow((factory)); \
return NdrDllCanUnloadNow((factory)); \
}
}
#define REGISTER_PROXY_DLL_ROUTINES(pfl, factory_clsid) \
#define REGISTER_PROXY_DLL_ROUTINES(pfl, factory_clsid) \
HINSTANCE hProxyDll = NULL; \
HINSTANCE hProxyDll
DECLSPEC_HIDDEN
= NULL; \
\
\
BOOL WINAPI DLLMAIN_ENTRY(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) DECLSPEC_HIDDEN; \
BOOL WINAPI DLLMAIN_ENTRY(HINSTANCE hinstDLL, DWORD fdwReason, \
BOOL WINAPI DLLMAIN_ENTRY(HINSTANCE hinstDLL, DWORD fdwReason, \
LPVOID lpvReserved) \
LPVOID lpvReserved) \
{ \
{ \
...
@@ -321,11 +326,13 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -321,11 +326,13 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
return TRUE; \
return TRUE; \
} \
} \
\
\
HRESULT WINAPI DLLREGISTERSERVER_ENTRY(void) DECLSPEC_HIDDEN; \
HRESULT WINAPI DLLREGISTERSERVER_ENTRY(void) \
HRESULT WINAPI DLLREGISTERSERVER_ENTRY(void) \
{ \
{ \
return NdrDllRegisterProxy(hProxyDll, (pfl), (factory_clsid)); \
return NdrDllRegisterProxy(hProxyDll, (pfl), (factory_clsid)); \
} \
} \
\
\
HRESULT WINAPI DLLUNREGISTERSERVER_ENTRY(void) DECLSPEC_HIDDEN; \
HRESULT WINAPI DLLUNREGISTERSERVER_ENTRY(void) \
HRESULT WINAPI DLLUNREGISTERSERVER_ENTRY(void) \
{ \
{ \
return NdrDllUnregisterProxy(hProxyDll, (pfl), (factory_clsid)); \
return NdrDllUnregisterProxy(hProxyDll, (pfl), (factory_clsid)); \
...
@@ -340,7 +347,7 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
...
@@ -340,7 +347,7 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
#define DLLDATA_ROUTINES(pfl, factory_clsid) \
#define DLLDATA_ROUTINES(pfl, factory_clsid) \
CLSID_PSFACTORYBUFFER \
CLSID_PSFACTORYBUFFER \
CStdPSFactoryBuffer gPFactory = { NULL, 0, NULL, 0 }; \
CStdPSFactoryBuffer
DECLSPEC_HIDDEN
gPFactory = { NULL, 0, NULL, 0 }; \
DLLDATA_GETPROXYDLLINFO(pfl, factory_clsid) \
DLLDATA_GETPROXYDLLINFO(pfl, factory_clsid) \
DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, &gPFactory) \
DLLGETCLASSOBJECTROUTINE(pfl, factory_clsid, &gPFactory) \
DLLCANUNLOADNOW(&gPFactory) \
DLLCANUNLOADNOW(&gPFactory) \
...
...
tools/widl/client.c
View file @
0ad28a85
...
@@ -415,10 +415,10 @@ static void write_clientinterfacedecl(type_t *iface)
...
@@ -415,10 +415,10 @@ static void write_clientinterfacedecl(type_t *iface)
indent
--
;
indent
--
;
print_client
(
"};
\n
"
);
print_client
(
"};
\n
"
);
if
(
old_names
)
if
(
old_names
)
print_client
(
"RPC_IF_HANDLE %s_ClientIfHandle = (RPC_IF_HANDLE)& %s___RpcClientInterface;
\n
"
,
print_client
(
"RPC_IF_HANDLE %s_ClientIfHandle
DECLSPEC_HIDDEN
= (RPC_IF_HANDLE)& %s___RpcClientInterface;
\n
"
,
iface
->
name
,
iface
->
name
);
iface
->
name
,
iface
->
name
);
else
else
print_client
(
"RPC_IF_HANDLE %s%s_v%d_%d_c_ifspec = (RPC_IF_HANDLE)& %s___RpcClientInterface;
\n
"
,
print_client
(
"RPC_IF_HANDLE %s%s_v%d_%d_c_ifspec
DECLSPEC_HIDDEN
= (RPC_IF_HANDLE)& %s___RpcClientInterface;
\n
"
,
prefix_client
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
),
iface
->
name
);
prefix_client
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
),
iface
->
name
);
fprintf
(
client
,
"
\n
"
);
fprintf
(
client
,
"
\n
"
);
}
}
...
@@ -450,6 +450,10 @@ static void init_client(void)
...
@@ -450,6 +450,10 @@ static void init_client(void)
fprintf
(
client
,
"
\n
"
);
fprintf
(
client
,
"
\n
"
);
print_client
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_client
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_client
(
"
\n
"
);
print_client
(
"
\n
"
);
print_client
(
"#ifndef DECLSPEC_HIDDEN
\n
"
);
print_client
(
"#define DECLSPEC_HIDDEN
\n
"
);
print_client
(
"#endif
\n
"
);
print_client
(
"
\n
"
);
write_exceptions
(
client
);
write_exceptions
(
client
);
print_client
(
"
\n
"
);
print_client
(
"
\n
"
);
}
}
...
...
tools/widl/proxy.c
View file @
0ad28a85
...
@@ -109,6 +109,10 @@ static void init_proxy(const statement_list_t *stmts)
...
@@ -109,6 +109,10 @@ static void init_proxy(const statement_list_t *stmts)
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_proxy
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"#ifndef DECLSPEC_HIDDEN
\n
"
);
print_proxy
(
"#define DECLSPEC_HIDDEN
\n
"
);
print_proxy
(
"#endif
\n
"
);
print_proxy
(
"
\n
"
);
write_exceptions
(
proxy
);
write_exceptions
(
proxy
);
print_proxy
(
"
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"struct __proxy_frame
\n
"
);
print_proxy
(
"struct __proxy_frame
\n
"
);
...
@@ -817,7 +821,7 @@ void write_proxies(const statement_list_t *stmts)
...
@@ -817,7 +821,7 @@ void write_proxies(const statement_list_t *stmts)
fprintf
(
proxy
,
"}
\n
"
);
fprintf
(
proxy
,
"}
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
fprintf
(
proxy
,
"const ExtendedProxyFileInfo %s_ProxyFileInfo =
\n
"
,
file_id
);
fprintf
(
proxy
,
"const ExtendedProxyFileInfo %s_ProxyFileInfo
DECLSPEC_HIDDEN
=
\n
"
,
file_id
);
fprintf
(
proxy
,
"{
\n
"
);
fprintf
(
proxy
,
"{
\n
"
);
fprintf
(
proxy
,
" (const PCInterfaceProxyVtblList*)&_%s_ProxyVtblList,
\n
"
,
file_id
);
fprintf
(
proxy
,
" (const PCInterfaceProxyVtblList*)&_%s_ProxyVtblList,
\n
"
,
file_id
);
fprintf
(
proxy
,
" (const PCInterfaceStubVtblList*)&_%s_StubVtblList,
\n
"
,
file_id
);
fprintf
(
proxy
,
" (const PCInterfaceStubVtblList*)&_%s_StubVtblList,
\n
"
,
file_id
);
...
...
tools/widl/server.c
View file @
0ad28a85
...
@@ -266,7 +266,7 @@ static void write_dispatchtable(type_t *iface)
...
@@ -266,7 +266,7 @@ static void write_dispatchtable(type_t *iface)
print_server
(
"0
\n
"
);
print_server
(
"0
\n
"
);
indent
--
;
indent
--
;
print_server
(
"};
\n
"
);
print_server
(
"};
\n
"
);
print_server
(
"RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable =
\n
"
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
));
print_server
(
"
static
RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable =
\n
"
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
));
print_server
(
"{
\n
"
);
print_server
(
"{
\n
"
);
indent
++
;
indent
++
;
print_server
(
"%u,
\n
"
,
method_count
);
print_server
(
"%u,
\n
"
,
method_count
);
...
@@ -330,7 +330,7 @@ static void write_serverinterfacedecl(type_t *iface)
...
@@ -330,7 +330,7 @@ static void write_serverinterfacedecl(type_t *iface)
if
(
endpoints
)
write_endpoints
(
server
,
iface
->
name
,
endpoints
);
if
(
endpoints
)
write_endpoints
(
server
,
iface
->
name
,
endpoints
);
print_server
(
"
extern
RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable;
\n
"
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
));
print_server
(
"
static
RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable;
\n
"
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
));
fprintf
(
server
,
"
\n
"
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"static const RPC_SERVER_INTERFACE %s___RpcServerInterface =
\n
"
,
iface
->
name
);
print_server
(
"static const RPC_SERVER_INTERFACE %s___RpcServerInterface =
\n
"
,
iface
->
name
);
print_server
(
"{
\n
"
);
print_server
(
"{
\n
"
);
...
@@ -358,10 +358,10 @@ static void write_serverinterfacedecl(type_t *iface)
...
@@ -358,10 +358,10 @@ static void write_serverinterfacedecl(type_t *iface)
indent
--
;
indent
--
;
print_server
(
"};
\n
"
);
print_server
(
"};
\n
"
);
if
(
old_names
)
if
(
old_names
)
print_server
(
"RPC_IF_HANDLE %s_ServerIfHandle = (RPC_IF_HANDLE)& %s___RpcServerInterface;
\n
"
,
print_server
(
"RPC_IF_HANDLE %s_ServerIfHandle
DECLSPEC_HIDDEN
= (RPC_IF_HANDLE)& %s___RpcServerInterface;
\n
"
,
iface
->
name
,
iface
->
name
);
iface
->
name
,
iface
->
name
);
else
else
print_server
(
"RPC_IF_HANDLE %s%s_v%d_%d_s_ifspec = (RPC_IF_HANDLE)& %s___RpcServerInterface;
\n
"
,
print_server
(
"RPC_IF_HANDLE %s%s_v%d_%d_s_ifspec
DECLSPEC_HIDDEN
= (RPC_IF_HANDLE)& %s___RpcServerInterface;
\n
"
,
prefix_server
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
),
iface
->
name
);
prefix_server
,
iface
->
name
,
MAJORVERSION
(
ver
),
MINORVERSION
(
ver
),
iface
->
name
);
fprintf
(
server
,
"
\n
"
);
fprintf
(
server
,
"
\n
"
);
}
}
...
@@ -379,6 +379,10 @@ static void init_server(void)
...
@@ -379,6 +379,10 @@ static void init_server(void)
fprintf
(
server
,
"
\n
"
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_server
(
"#include
\"
%s
\"\n
"
,
header_name
);
print_server
(
"
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"#ifndef DECLSPEC_HIDDEN
\n
"
);
print_server
(
"#define DECLSPEC_HIDDEN
\n
"
);
print_server
(
"#endif
\n
"
);
print_server
(
"
\n
"
);
write_exceptions
(
server
);
write_exceptions
(
server
);
print_server
(
"
\n
"
);
print_server
(
"
\n
"
);
print_server
(
"struct __server_frame
\n
"
);
print_server
(
"struct __server_frame
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment