Поиск:

Ответ в темуСоздание новой темы Создание опроса
> как связать указатель со структурой 
:(
    Опции темы
gibz
Дата 20.1.2007, 18:26 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 3
Регистрация: 15.1.2007

Репутация: нет
Всего: нет



модераторам:
перенесите в соответствующую тему, просматривал не ту ветку форума, запостил не туда куда надо.
сорри.
функция
Код

DWORD MprAdminPortEnum(
  RAS_SERVER_HANDLE hRasServer,
  DWORD dwLevel,
  HANDLE hConnection,
  LPBYTE* lplpbBuffer,
  DWORD dwPrefMaxLen,
  LPDWORD lpdwEntriesRead,
  LPDWORD lpdwTotalEntries,
  LPDWORD lpdwResumeHandle
);


Parameters

hRasServer
[in] A handle to the RAS server whose ports are to be enumerated. To obtain this handle, call MprAdminServerConnect.
dwLevel
[in] A value that specifies the level of data that is returned in the enumeration. This parameter must be zero.
hConnection
[in] A handle to a connection for which the active ports are enumerated. If this parameter is INVALID_HANDLE_VALUE, all the ports in use or available for use by RRAS are enumerated. To obtain this handle, call MprAdminConnectionEnum.
lplpbBuffer
[out] A pointer to a pointer variable that, on a successful return, points to an array of RAS_PORT_0. To free this memory, call MprAdminBufferFree.
dwPrefMaxLen
[in] A value that specifies the preferred maximum length of returned data, in 8-bit bytes. If this parameter is -1, the buffer that is returned is large enough to hold all available data.
lpdwEntriesRead
[out] A pointer to a DWORD variable. This variable receives the total number of ports that are enumerated from the current resume position.
lpdwTotalEntries
[out] A pointer to a DWORD variable. This variable receives the total number of ports that could have been enumerated from the current resume position.
lpdwResumeHandle
[in] A pointer to a DWORD variable. On successful execution, this parameter specifies a handle that can be used to resume the enumeration. This parameter should be zero on the first call and left unchanged on subsequent calls. If the return code is ERROR_MORE_DATA, the call can be reissued with the handle to retrieve more data. If the handle is NULL on return, the enumeration cannot be continued. This handle is invalid for other types of error returns.


структура
Код

typedef struct _RAS_CONNECTION_0 {
  HANDLE hConnection;
  HANDLE hInterface;
  DWORD dwConnectDuration;
  ROUTER_INTERFACE_TYPE dwInterfaceType;
  DWORD dwConnectionFlags;
  WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN + 1];
  WCHAR wszUserName[UNLEN + 1];
  WCHAR wszLogonDomain[DNLEN + 1];
  WCHAR wszRemoteComputer[NETBIOS_NAME_LEN + 1];
} RAS_CONNECTION_0, 
 *PRAS_CONNECTION_0;


пишу так
Код

RAS_CONNECTION_0* RasCon0;
MprAdminConnectionEnum(ServerHandle,0,&RasCon0,0,&EntRead,&TotEnt,&Resume);

компилятор ругается

Код

error C2664: 'MprAdminConnectionEnum' : cannot convert parameter 3 from 'struct _RAS_CONNECTION_0 ** ' to 'unsigned char ** '



Это сообщение отредактировал(а) gibz - 20.1.2007, 18:33
PM MAIL   Вверх
nworm
Дата 20.1.2007, 20:47 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 502
Регистрация: 22.10.2005

Репутация: нет
Всего: 8



Функция MprAdminConnectionEnum не описана.
Тут вроде есть что-то похожее на правильный вызов подобной функции

Это сообщение отредактировал(а) nworm - 20.1.2007, 21:40
PM MAIL WWW   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "C++: Базы данных"
chipset

Данный форум предназначен для обсуждения вопросов прямым образом связанных с C++ и БД. Так, вопросы только по C++ следует задавать в C++:Общие вопросы а вопросы по абстрактным БД в Базах данных или в соответствующих под-форумах.

Благодарим за понимание.


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, chipset.

 
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | C/C++: Базы данных | Следующая тема »


 




[ Время генерации скрипта: 0.0842 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.