Impossible to pass a pointer to an integer in a DLL function from LibreOffice Basic

In the 4.4.1.2 version of LibreOffice basic passing a pointer to a dll function seems to fail.
Here is the LibreOffice call :

Declare Function InitializeDll Lib “MyLib.dll” (ByRef lIdDll As Long) As Long

Here is the C function

int InitializeDll(unsigned long *id)
{
*id = 10;
return 0;
}

In this last version, the value sent in lIdDll is not readable and cannot be evaluated. The C affectation leads to a crash. Did anyone notice this in its program?