Memory allocation OpcUa_SnPrintfA
Moderator: uasdkc
-
- Sr. Member
- Posts: 14
- Joined: 09 May 2016, 15:31
Memory allocation OpcUa_SnPrintfA
I can't find any documentation on the function OpcUa_SnPrintfA. Does it allocate memory like 'asprintf' or do I still need to explicitely allocate memory?
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Memory allocation OpcUa_SnPrintfA
Hello,
The macro is directly mapped onto the function snprintf, you need to allocate the needed buffer by yourself (see http://www.cplusplus.com/reference/cstdio/snprintf/).
The macro is directly mapped onto the function snprintf, you need to allocate the needed buffer by yourself (see http://www.cplusplus.com/reference/cstdio/snprintf/).
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Sr. Member
- Posts: 14
- Joined: 09 May 2016, 15:31
Re: Memory allocation OpcUa_SnPrintfA
Thanks for the answer.
Fortunately I also discovered the UaProvider_CustomProvider_NodeIdCreate() function which also handles allocation and does pretty much what I needed.
Fortunately I also discovered the UaProvider_CustomProvider_NodeIdCreate() function which also handles allocation and does pretty much what I needed.