483 views
in Platform Packages by

Hello,

I would like to create a class which contains three methods, and in each of those methods (let call them MethodA, MethodB and MethodC), I have a specific native code.
My questione now is to know how to declare a variable within the native environment of MethodA, so that it is available also in the native environment of MethodB and MethodC.

Of course, the given variable is not a standard type that can be cast, but in my case a FILE type from string.h.

Thank you,

1 Answer

0 votes
by

Hello Krzysztof,

use Inline code member to 'inject' a definition of your desired static C variable inside the generated code. Then the native code existing inside the three methods can access the variable. Important: ensure that the Inline code is generated before the class containing the methods. Note Order column in Inspector window.

I hope it helps you further.

best regards

Paul Banach

by
Thank you very much.
It works.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...