Skip to main content
iduque
Associate
Jun 21, 2021 10:16 AM UTC
Solved

CubeProgrammer_API not setting verbosity level

I have managed to use the CubeProgrammer_API.dll in a visual studio C# project.

Everything seems to be working properly but when I try to set the verbosity level nothing changes. It seems to be fixed to level 2. This is the code I'm using:

[DllImport("CubeProgrammer_API.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "setVerbosityLevel")]
internal static extern void setVerbosityLevel([MarshalAs(UnmanagedType.I4)] int level);
 
*/ And the C# function: /*
public static void setVerbosityLevel(cubeProgrammerVerbosityLevel level)
{
 NativeMethods.setVerbosityLevel((int)level);
}

Thanks in advance!

This topic has been closed for replies.
Houda GHABRI
Houda GHABRIBest answer
ST Employee
Jun 23, 2021 9:59 AM UTC

Hi @iduque​ ,

As mentioned in the API template projects, we need to indicate the verbosity level like following :

  

 extern unsigned int verbosityLevel;

   /* Set DLL verbosity level */

   verbosityLevel = VERBOSITY_LEVEL_3;

   setVerbosityLevel(verbosityLevel);

The extern verbosityLevel variable is used to pass the level to the dipslayManager functions into the DLL.

Please try and tell me if it is OK.

If your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

2 replies

Houda GHABRI
Houda GHABRIBest answer
ST Employee
Jun 23, 2021 9:59 AM UTC

Hi @iduque​ ,

As mentioned in the API template projects, we need to indicate the verbosity level like following :

  

 extern unsigned int verbosityLevel;

   /* Set DLL verbosity level */

   verbosityLevel = VERBOSITY_LEVEL_3;

   setVerbosityLevel(verbosityLevel);

The extern verbosityLevel variable is used to pass the level to the dipslayManager functions into the DLL.

Please try and tell me if it is OK.

If your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

Houda GHABRI
ST Employee
Jul 1, 2021 11:20 AM UTC

Hi @iduque​ ,

I hope you are already trying the solution suggested by me and  that it worked for you :) .

If not do not hesitate to send me the log error.

Houda