Branch libreoffice-5-0-4
[LibreOffice.git] / bridges / test / inter_libs_exc / inter.cxx
blob0e8a85c7bc62ae5887546ff50e8bd330236ecc33
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <stdio.h>
21 #include "share.h"
23 #include <rtl/string.hxx>
24 #include <osl/module.hxx>
27 using namespace ::osl;
28 using namespace ::com::sun::star;
29 using namespace ::com::sun::star::uno;
31 extern "C" int main( int argc, char const * argv [] )
33 #ifdef SAL_W32
34 #define SAL_DLLPREFIX ""
35 #endif
36 Module mod_starter(
37 SAL_DLLPREFIX "starter" SAL_DLLEXTENSION,
38 SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
39 Module mod_thrower(
40 SAL_DLLPREFIX "thrower" SAL_DLLEXTENSION,
41 SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
43 typedef t_throws_exc (SAL_CALL * t_get_thrower)();
44 t_get_thrower get_thrower = (t_get_thrower)mod_thrower.getSymbol( "get_thrower" );
45 t_throws_exc thrower = (*get_thrower)();
47 typedef void (SAL_CALL * t_starter)( t_throws_exc );
48 t_starter start = (t_starter)mod_starter.getSymbol( "start" );
50 (*start)( thrower );
52 return 0;
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */