нужно использовать следующую функцию, но я в беде с аргументами:C++ указатель функции некорректных типам
В этом случае IP-адрес не заходящий.
cwbCO_SysHandle system;
LPSTR ipAddress = "";
ULONG ipLength = 32;
cwbCO_GetIPAddress(system, ipAddress, &ipLength);
Я знаю, что нужно передать указатель на LPSTR в качестве аргумента, но установив следующий код не работает либо:
cwbCO_SysHandle system;
LPSTR ipAddress = "";
ULONG ipLength = 32;
cwbCO_GetIPAddress(system, &ipAddress, &ipLength); //Incompatible types LPSTR* and LPSTR
Что такое правильный способ?
Синтаксис
UINT CWB_ENTRY cwbCO_GetIPAddress (система cwbCO_SysHandle, LPSTR IPAddress, длина PULONG);
Параметры
cwbCO_SysHandle система - вход
Handle that previously was returned by cwbCO_CreateSystem or cwbCO_CreateSystemLike. It is the
IBM i identification.
LPSTR IPAddress - выход
Pointer to a buffer that will contain the NULL-terminated IP address in dotted-decimal notation (in
the form "nnn.nnn.nnn.nnn" where each "nnn" is in the range of from 0 to 255).
PULONG длина - вход/выход
Pointer to the length of the IPAddress buffer. If the buffer is too small to hold the output, including
room for the terminating NULL, the size of the buffer
Удалить амперсанд, скорее всего, LPSTR уже является typedef, который является указателем. – v010dya