widl: Make the generated global variables and functions hidden.
This commit is contained in:
parent
a30724304c
commit
0ad28a8592
|
@ -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
|
||||||
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) \
|
||||||
|
|
||||||
/* 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) \
|
||||||
/* 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
|
||||||
|
@ -286,6 +286,8 @@ ULONG WINAPI CStdStubBuffer2_Release(IRpcStubBuffer *This) \
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DLLDATA_GETPROXYDLLINFO(pfl, rclsid) \
|
#define DLLDATA_GETPROXYDLLINFO(pfl, rclsid) \
|
||||||
|
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
|
||||||
|
const CLSID **ppClsid) DECLSPEC_HIDDEN; \
|
||||||
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
|
void RPC_ENTRY GetProxyDllInfo(const ProxyFileInfo ***ppProxyFileInfo, \
|
||||||
const CLSID **ppClsid) \
|
const CLSID **ppClsid) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -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) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#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) \
|
||||||
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) \
|
||||||
|
|
||||||
#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) \
|
||||||
|
|
|
@ -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)
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
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);
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
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)
|
||||||
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)
|
||||||
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");
|
||||||
|
|
Loading…
Reference in New Issue