Skip to main content
iduque
Associate
June 21, 2021
Solved

CubeProgrammer_API not setting verbosity level

  • June 21, 2021
  • 2 replies
  • 1238 views

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.
Best answer by Houda GHABRI

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
June 23, 2021

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
July 1, 2021

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