Browse Source

Make lib_symbol use a template for the function type

tags/1.9.6
falkTX 11 years ago
parent
commit
67bbd7e152
18 changed files with 80 additions and 52 deletions
  1. +0
    -10
      source/backend/plugin/CarlaPluginInternal.cpp
  2. +17
    -6
      source/backend/plugin/CarlaPluginInternal.hpp
  3. +1
    -1
      source/backend/plugin/DssiPlugin.cpp
  4. +1
    -1
      source/backend/plugin/LadspaPlugin.cpp
  5. +3
    -3
      source/backend/plugin/Lv2Plugin.cpp
  6. +2
    -2
      source/backend/plugin/VstPlugin.cpp
  7. +0
    -8
      source/bridges-ui/CarlaBridgeClient.cpp
  8. +15
    -3
      source/bridges-ui/CarlaBridgeClient.hpp
  9. +1
    -1
      source/bridges-ui/CarlaBridgeUI-LV2.cpp
  10. +2
    -2
      source/bridges-ui/CarlaBridgeUI-VST.cpp
  11. +6
    -6
      source/discovery/carla-discovery.cpp
  12. +1
    -1
      source/includes/CarlaDefines.h
  13. +1
    -1
      source/modules/jackbridge/JackBridge1.cpp
  14. +1
    -1
      source/modules/jackbridge/JackBridgeExport.cpp
  15. +3
    -1
      source/tests/CarlaUtils3.cpp
  16. +18
    -0
      source/tests/Makefile
  17. +6
    -3
      source/utils/CarlaLibUtils.hpp
  18. +2
    -2
      source/utils/CarlaShmUtils.hpp

+ 0
- 10
source/backend/plugin/CarlaPluginInternal.cpp View File

@@ -684,11 +684,6 @@ bool CarlaPlugin::ProtectedData::libClose() noexcept
return ret; return ret;
} }


void* CarlaPlugin::ProtectedData::libSymbol(const char* const symbol) const noexcept
{
return lib_symbol(lib, symbol);
}

bool CarlaPlugin::ProtectedData::uiLibOpen(const char* const fname, const bool canDelete) noexcept bool CarlaPlugin::ProtectedData::uiLibOpen(const char* const fname, const bool canDelete) noexcept
{ {
uiLib = sLibCounter.open(fname, canDelete); uiLib = sLibCounter.open(fname, canDelete);
@@ -702,11 +697,6 @@ bool CarlaPlugin::ProtectedData::uiLibClose() noexcept
return ret; return ret;
} }


void* CarlaPlugin::ProtectedData::uiLibSymbol(const char* const symbol) const noexcept
{
return lib_symbol(uiLib, symbol);
}

// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


void CarlaPlugin::ProtectedData::tryTransient() noexcept void CarlaPlugin::ProtectedData::tryTransient() noexcept


+ 17
- 6
source/backend/plugin/CarlaPluginInternal.hpp View File

@@ -21,6 +21,7 @@
#include "CarlaPlugin.hpp" #include "CarlaPlugin.hpp"
#include "CarlaPluginThread.hpp" #include "CarlaPluginThread.hpp"


#include "CarlaLibUtils.hpp"
#include "CarlaOscUtils.hpp" #include "CarlaOscUtils.hpp"
#include "CarlaStateUtils.hpp" #include "CarlaStateUtils.hpp"


@@ -330,13 +331,23 @@ struct CarlaPlugin::ProtectedData {


static const char* libError(const char* const filename) noexcept; static const char* libError(const char* const filename) noexcept;


bool libOpen(const char* const filename) noexcept;
bool libClose() noexcept;
void* libSymbol(const char* const symbol) const noexcept;
bool libOpen(const char* const filename) noexcept;
bool libClose() noexcept;


bool uiLibOpen(const char* const filename, const bool canDelete) noexcept;
bool uiLibClose() noexcept;
void* uiLibSymbol(const char* const symbol) const noexcept;
bool uiLibOpen(const char* const filename, const bool canDelete) noexcept;
bool uiLibClose() noexcept;

template<typename Func>
Func libSymbol(const char* const symbol) const noexcept
{
return lib_symbol<Func>(lib, symbol);
}

template<typename Func>
Func uiLibSymbol(const char* const symbol) const noexcept
{
return lib_symbol<Func>(uiLib, symbol);
}


// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Misc // Misc


+ 1
- 1
source/backend/plugin/DssiPlugin.cpp View File

@@ -2025,7 +2025,7 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// get DLL main entry // get DLL main entry


const DSSI_Descriptor_Function descFn = (DSSI_Descriptor_Function)pData->libSymbol("dssi_descriptor");
const DSSI_Descriptor_Function descFn = pData->libSymbol<DSSI_Descriptor_Function>("dssi_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {


+ 1
- 1
source/backend/plugin/LadspaPlugin.cpp View File

@@ -1551,7 +1551,7 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// get DLL main entry // get DLL main entry


const LADSPA_Descriptor_Function descFn = (LADSPA_Descriptor_Function)pData->libSymbol("ladspa_descriptor");
const LADSPA_Descriptor_Function descFn = pData->libSymbol<LADSPA_Descriptor_Function>("ladspa_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {


+ 3
- 3
source/backend/plugin/Lv2Plugin.cpp View File

@@ -4581,7 +4581,7 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// try to get DLL main entry via new mode // try to get DLL main entry via new mode


if (const LV2_Lib_Descriptor_Function libDescFn = (LV2_Lib_Descriptor_Function)pData->libSymbol("lv2_lib_descriptor"))
if (const LV2_Lib_Descriptor_Function libDescFn = pData->libSymbol<LV2_Lib_Descriptor_Function>("lv2_lib_descriptor"))
{ {
// ----------------------------------------------------------- // -----------------------------------------------------------
// all ok, get lib descriptor // all ok, get lib descriptor
@@ -4609,7 +4609,7 @@ public:
// ----------------------------------------------------------- // -----------------------------------------------------------
// get DLL main entry (old mode) // get DLL main entry (old mode)


const LV2_Descriptor_Function descFn = (LV2_Descriptor_Function)pData->libSymbol("lv2_descriptor");
const LV2_Descriptor_Function descFn = pData->libSymbol<LV2_Descriptor_Function>("lv2_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {
@@ -5110,7 +5110,7 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// get UI DLL main entry // get UI DLL main entry


LV2UI_DescriptorFunction uiDescFn = (LV2UI_DescriptorFunction)pData->uiLibSymbol("lv2ui_descriptor");
LV2UI_DescriptorFunction uiDescFn = pData->uiLibSymbol<LV2UI_DescriptorFunction>("lv2ui_descriptor");


if (uiDescFn == nullptr) if (uiDescFn == nullptr)
{ {


+ 2
- 2
source/backend/plugin/VstPlugin.cpp View File

@@ -2212,11 +2212,11 @@ public:
// --------------------------------------------------------------- // ---------------------------------------------------------------
// get DLL main entry // get DLL main entry


VST_Function vstFn = (VST_Function)pData->libSymbol("VSTPluginMain");
VST_Function vstFn = pData->libSymbol<VST_Function>("VSTPluginMain");


if (vstFn == nullptr) if (vstFn == nullptr)
{ {
vstFn = (VST_Function)pData->libSymbol("main");
vstFn = pData->libSymbol<VST_Function>("main");


if (vstFn == nullptr) if (vstFn == nullptr)
{ {


+ 0
- 8
source/bridges-ui/CarlaBridgeClient.cpp View File

@@ -245,14 +245,6 @@ bool CarlaBridgeClient::uiLibClose()
return closed; return closed;
} }


void* CarlaBridgeClient::uiLibSymbol(const char* const symbol)
{
CARLA_SAFE_ASSERT_RETURN(fUI.lib != nullptr, nullptr);
carla_debug("CarlaBridgeClient::uiLibSymbol(\"%s\")", symbol);

return lib_symbol(fUI.lib, symbol);
}

const char* CarlaBridgeClient::uiLibError() const char* CarlaBridgeClient::uiLibError()
{ {
carla_debug("CarlaBridgeClient::uiLibError()"); carla_debug("CarlaBridgeClient::uiLibError()");


+ 15
- 3
source/bridges-ui/CarlaBridgeClient.hpp View File

@@ -20,6 +20,7 @@


#include "CarlaBridgeOsc.hpp" #include "CarlaBridgeOsc.hpp"
#include "CarlaBridgeToolkit.hpp" #include "CarlaBridgeToolkit.hpp"
#include "CarlaLibUtils.hpp"


CARLA_BRIDGE_START_NAMESPACE CARLA_BRIDGE_START_NAMESPACE


@@ -91,11 +92,22 @@ protected:


void* getContainerId(); void* getContainerId();
void* getContainerId2(); void* getContainerId2();
bool uiLibOpen(const char* const filename);
bool uiLibClose();
void* uiLibSymbol(const char* const symbol);

// ---------------------------------------------------------------------

bool uiLibOpen(const char* const filename);
bool uiLibClose();
const char* uiLibError(); const char* uiLibError();


template<typename Func>
Func uiLibSymbol(const char* const symbol)
{
CARLA_SAFE_ASSERT_RETURN(fUI.lib != nullptr, nullptr);
carla_debug("CarlaBridgeClient::uiLibSymbol(\"%s\")", symbol);

return lib_symbol<Func>(fUI.lib, symbol);
}

// --------------------------------------------------------------------- // ---------------------------------------------------------------------


private: private:


+ 1
- 1
source/bridges-ui/CarlaBridgeUI-LV2.cpp View File

@@ -415,7 +415,7 @@ public:
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// get DLL main entry // get DLL main entry


const LV2UI_DescriptorFunction ui_descFn = (LV2UI_DescriptorFunction)uiLibSymbol("lv2ui_descriptor");
const LV2UI_DescriptorFunction ui_descFn = uiLibSymbol<LV2UI_DescriptorFunction>("lv2ui_descriptor");


if (ui_descFn == nullptr) if (ui_descFn == nullptr)
return false; return false;


+ 2
- 2
source/bridges-ui/CarlaBridgeUI-VST.cpp View File

@@ -72,10 +72,10 @@ public:
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// get DLL main entry // get DLL main entry


VST_Function vstFn = (VST_Function)uiLibSymbol("VSTPluginMain");
VST_Function vstFn = uiLibSymbol<VST_Function>("VSTPluginMain");


if (vstFn == nullptr) if (vstFn == nullptr)
vstFn = (VST_Function)uiLibSymbol("main");
vstFn = uiLibSymbol<VST_Function>("main");


if (vstFn == nullptr) if (vstFn == nullptr)
return false; return false;


+ 6
- 6
source/discovery/carla-discovery.cpp View File

@@ -403,7 +403,7 @@ private:


static void do_ladspa_check(void*& libHandle, const char* const filename, const bool doInit) static void do_ladspa_check(void*& libHandle, const char* const filename, const bool doInit)
{ {
LADSPA_Descriptor_Function descFn = (LADSPA_Descriptor_Function)lib_symbol(libHandle, "ladspa_descriptor");
LADSPA_Descriptor_Function descFn = lib_symbol<LADSPA_Descriptor_Function>(libHandle, "ladspa_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {
@@ -443,7 +443,7 @@ static void do_ladspa_check(void*& libHandle, const char* const filename, const
return; return;
} }


descFn = (LADSPA_Descriptor_Function)lib_symbol(libHandle, "ladspa_descriptor");
descFn = lib_symbol<LADSPA_Descriptor_Function>(libHandle, "ladspa_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {
@@ -636,7 +636,7 @@ static void do_ladspa_check(void*& libHandle, const char* const filename, const


static void do_dssi_check(void*& libHandle, const char* const filename, const bool doInit) static void do_dssi_check(void*& libHandle, const char* const filename, const bool doInit)
{ {
DSSI_Descriptor_Function descFn = (DSSI_Descriptor_Function)lib_symbol(libHandle, "dssi_descriptor");
DSSI_Descriptor_Function descFn = lib_symbol<DSSI_Descriptor_Function>(libHandle, "dssi_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {
@@ -684,7 +684,7 @@ static void do_dssi_check(void*& libHandle, const char* const filename, const bo
return; return;
} }


descFn = (DSSI_Descriptor_Function)lib_symbol(libHandle, "dssi_descriptor");
descFn = lib_symbol<DSSI_Descriptor_Function>(libHandle, "dssi_descriptor");


if (descFn == nullptr) if (descFn == nullptr)
{ {
@@ -1144,11 +1144,11 @@ static void do_lv2_check(const char* const bundle, const bool doInit)
#ifndef CARLA_OS_MAC #ifndef CARLA_OS_MAC
static void do_vst_check(void*& libHandle, const bool doInit) static void do_vst_check(void*& libHandle, const bool doInit)
{ {
VST_Function vstFn = (VST_Function)lib_symbol(libHandle, "VSTPluginMain");
VST_Function vstFn = lib_symbol<VST_Function>(libHandle, "VSTPluginMain");


if (vstFn == nullptr) if (vstFn == nullptr)
{ {
vstFn = (VST_Function)lib_symbol(libHandle, "main");
vstFn = lib_symbol<VST_Function>(libHandle, "main");


if (vstFn == nullptr) if (vstFn == nullptr)
{ {


+ 1
- 1
source/includes/CarlaDefines.h View File

@@ -228,7 +228,7 @@ private: \
# ifdef BUILDING_CARLA # ifdef BUILDING_CARLA
# define CARLA_API __declspec (dllexport) # define CARLA_API __declspec (dllexport)
# else # else
# define CARLA_API __declspec (imexport)
# define CARLA_API __declspec (dllimport)
# endif # endif
# else # else
# define CARLA_API __attribute__ ((visibility("default"))) # define CARLA_API __attribute__ ((visibility("default")))


+ 1
- 1
source/modules/jackbridge/JackBridge1.cpp View File

@@ -368,7 +368,7 @@ struct JackBridge {
} }


#define JOIN(a, b) a ## b #define JOIN(a, b) a ## b
#define LIB_SYMBOL(NAME) JOIN(NAME, _ptr) = (jacksym_##NAME)lib_symbol(lib, "jack_" #NAME);
#define LIB_SYMBOL(NAME) JOIN(NAME, _ptr) = lib_symbol<jacksym_##NAME>(lib, "jack_" #NAME);


LIB_SYMBOL(get_version) LIB_SYMBOL(get_version)
LIB_SYMBOL(get_version_string) LIB_SYMBOL(get_version_string)


+ 1
- 1
source/modules/jackbridge/JackBridgeExport.cpp View File

@@ -34,7 +34,7 @@ public:
#endif #endif
CARLA_SAFE_ASSERT_RETURN(lib != nullptr,); CARLA_SAFE_ASSERT_RETURN(lib != nullptr,);


func = (jackbridge_exported_function_type)lib_symbol(lib, "jackbridge_get_exported_functions");
func = lib_symbol<jackbridge_exported_function_type>(lib, "jackbridge_get_exported_functions");
CARLA_SAFE_ASSERT_RETURN(func != nullptr,); CARLA_SAFE_ASSERT_RETURN(func != nullptr,);
} }




+ 3
- 1
source/tests/CarlaUtils3.cpp View File

@@ -71,6 +71,8 @@ static void test_CarlaJuceUtils()


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


typedef void (*nullFunc)();

static void test_CarlaLibUtils() noexcept static void test_CarlaLibUtils() noexcept
{ {
void* const libNot = lib_open("/libzzzzz..."); void* const libNot = lib_open("/libzzzzz...");
@@ -80,7 +82,7 @@ static void test_CarlaLibUtils() noexcept
void* const lib = lib_open("/usr/lib/liblo.so"); void* const lib = lib_open("/usr/lib/liblo.so");
CARLA_SAFE_ASSERT_RETURN(lib != nullptr,); CARLA_SAFE_ASSERT_RETURN(lib != nullptr,);


void* const libS = lib_symbol(lib, "lo_server_new");
const nullFunc libS = lib_symbol<nullFunc>(lib, "lo_server_new");
CARLA_SAFE_ASSERT(libS != nullptr); CARLA_SAFE_ASSERT(libS != nullptr);


const bool closed = lib_close(lib); const bool closed = lib_close(lib);


+ 18
- 0
source/tests/Makefile View File

@@ -52,7 +52,9 @@ TARGETS += ansi-pedantic-test_cxx11
TARGETS += CarlaRingBuffer TARGETS += CarlaRingBuffer
TARGETS += CarlaString TARGETS += CarlaString
TARGETS += CarlaUtils1 TARGETS += CarlaUtils1
ifneq ($(WIN32),true)
TARGETS += CarlaUtils2 TARGETS += CarlaUtils2
endif
TARGETS += CarlaUtils3 TARGETS += CarlaUtils3
TARGETS += CarlaUtils4 TARGETS += CarlaUtils4
TARGETS += Exceptions TARGETS += Exceptions
@@ -82,15 +84,21 @@ ansi-pedantic-test_cxx11: ansi-pedantic-test.cpp ../backend/Carla*.h ../includes


CarlaRingBuffer: CarlaRingBuffer.cpp ../utils/CarlaRingBuffer.hpp CarlaRingBuffer: CarlaRingBuffer.cpp ../utils/CarlaRingBuffer.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


CarlaString: CarlaString.cpp ../utils/CarlaString.hpp CarlaString: CarlaString.cpp ../utils/CarlaString.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


CarlaUtils1: CarlaUtils1.cpp ../utils/*.hpp CarlaUtils1: CarlaUtils1.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


CarlaUtils2: CarlaUtils2.cpp ../utils/*.hpp CarlaUtils2: CarlaUtils2.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
@@ -99,24 +107,34 @@ CarlaUtils2: CarlaUtils2.cpp ../utils/*.hpp


CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ -ldl -lrt $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ -ldl -lrt
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
../modules/juce_core.a -ldl -lpthread -lrt ../modules/juce_core.a -ldl -lpthread -lrt
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


Exceptions: Exceptions.cpp Exceptions: Exceptions.cpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


Print: Print.cpp ../utils/CarlaUtils.hpp Print: Print.cpp ../utils/CarlaUtils.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


RDF: RDF.cpp ../modules/ladspa_rdf.hpp ../modules/lv2_rdf.hpp RDF: RDF.cpp ../modules/ladspa_rdf.hpp ../modules/lv2_rdf.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@
ifneq ($(WIN32),true)
./$@ && valgrind --leak-check=full ./$@ ./$@ && valgrind --leak-check=full ./$@
endif


# -------------------------------------------------------------- # --------------------------------------------------------------




+ 6
- 3
source/utils/CarlaLibUtils.hpp View File

@@ -67,17 +67,20 @@ bool lib_close(void* const lib) noexcept
* Get a library symbol (must not be null). * Get a library symbol (must not be null).
* Returns null if the symbol is not found. * Returns null if the symbol is not found.
*/ */
template<typename Func>
static inline static inline
void* lib_symbol(void* const lib, const char* const symbol) noexcept
Func lib_symbol(void* const lib, const char* const symbol) noexcept
{ {
CARLA_SAFE_ASSERT_RETURN(lib != nullptr, nullptr); CARLA_SAFE_ASSERT_RETURN(lib != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(symbol != nullptr && symbol[0] != '\0', nullptr); CARLA_SAFE_ASSERT_RETURN(symbol != nullptr && symbol[0] != '\0', nullptr);


try {
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
return (void*)::GetProcAddress((HMODULE)lib, symbol);
return (Func)::GetProcAddress((HMODULE)lib, symbol);
#else #else
return ::dlsym(lib, symbol);
return (Func)(uintptr_t)::dlsym(lib, symbol);
#endif #endif
} CARLA_SAFE_EXCEPTION_RETURN("lib_symbol", nullptr);
} }


/* /*


+ 2
- 2
source/utils/CarlaShmUtils.hpp View File

@@ -117,7 +117,7 @@ shm_t carla_shm_attach(const char* const filename) noexcept


try { try {
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
ret.shm = ::CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
ret.shm = ::CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
ret.map = nullptr; ret.map = nullptr;
#else #else
ret.fd = ::shm_open(filename, O_RDWR, 0); ret.fd = ::shm_open(filename, O_RDWR, 0);
@@ -174,7 +174,7 @@ void* carla_shm_map(shm_t& shm, const std::size_t size) noexcept


try { try {
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
const HANDLE map = ::CreateFileMapping(shm.shm, NULL, PAGE_READWRITE, size, size, NULL);
const HANDLE map = ::CreateFileMapping(shm.shm, nullptr, PAGE_READWRITE, size, size, nullptr);
CARLA_SAFE_ASSERT_RETURN(map != nullptr, nullptr); CARLA_SAFE_ASSERT_RETURN(map != nullptr, nullptr);


HANDLE ptr = ::MapViewOfFile(map, FILE_MAP_COPY, 0, 0, size); HANDLE ptr = ::MapViewOfFile(map, FILE_MAP_COPY, 0, 0, size);


Loading…
Cancel
Save