Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2007.06.24;
Скачать: [xml.tar.bz2];

Вниз

импорт функций в delphi 7   Найти похожие ветки 

 
gibz ©   (2007-01-14 13:59) [0]

есть функция в mprapi.dll

DWORD MprAdminServerConnect(
LPWSTR lpwsServerName,
MPR_SERVER_HANDLE* phMprServer
);

Parameters

lpwsServerName
[in] Pointer to a null-terminated Unicode string that specifies the name of the remote server.
phMprServer
[out] Pointer to a HANDLE variable that receives a handle to the server. Use this handle in subsequent calls to administer the server.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Подскажите каким образом ее можно импортировать и использовать в Delphi


 
властелин колхоза   (2007-01-14 16:09) [1]

function MprAdminServerConnect(
lpwsServerName:PWideChar;
var phMprServer:MPR_SERVER_HANDLE
):DWORD;stdcall;external "mprapi.dll"


 
gibz ©   (2007-01-14 19:02) [2]

извини что все спрашиваю, новичок в delphi, подскажи каким образом описать и связать фун-ю
DWORD MprAdminServerGetInfo(
MPR_SERVER_HANDLE hMprServer,
DWORD dwLevel,
LPBYTE* lplpBuffer
);

Parameters

hMprServer
[in] Handle to the router to query. Obtain this handle by calling MprAdminServerConnect.
dwLevel
[in] Specifies the level of the information requested. This parameter may be zero or one.

Windows Server 2003 and Windows 2000 Server: This parameter must be zero.

lplpBuffer
[out] Pointer to a pointer variable. On successful return, this pointer variable points to a MPR_SERVER_0 or MPR_SERVER_1 structure depending on the value of dwLevel.

Windows Server 2003 and Windows 2000 Server: This variable points to a buffer that receives the retrieved information.

с типом данных
The MPR_SERVER_0 structure contains information for a particular router.

typedef struct MPR_SERVER_0 {
BOOL fLanOnlyMode;
DWORD dwUpTime;
DWORD dwTotalPorts;
DWORD dwPortsInUse;
} MPR_SERVER_0,
*PMPR_SERVER_0;
Members

fLanOnlyMode
Specifies whether the Demand Dial Manager (DDM) is running on the router. If TRUE, the DDM is not running on the router; if FALSE, the DDM is running on the router.
dwUpTime
Specifies the elapsed time, in seconds, since the router was started.
dwTotalPorts
Specifies the number of ports on the system.
dwPortsInUse
Specifies the number of ports currently in use.


 
властелин колхоза   (2007-01-14 19:20) [3]

Во наглеет человек, забавно даже... ;-)

function MprAdminServerGetInfo(
hMprServer:MPR_SERVER_HANDLE;
dwLevel:DWORD;
var lplpBuffer:Pointer;
):DWORD;stdcall;external "mprapi.dll";

type
 MPR_SERVER_0=record
   fLanOnlyMode:BOOL;
   dwUpTime:DWORD;
   dwTotalPorts:DWORD;
   dwPortsInUse:DWORD;
 end;

Вот только что там в записи с выравниванием будет -- предсказать не берусь.


 
gibz ©   (2007-01-14 20:25) [4]

и последний вопрос где можно глянуть приведение типов c++ -> delphi
простых типов нашел а остальных нет


 
ors_archangel ©   (2007-01-14 20:39) [5]

Пость сюда, какие есть :)  чего уже!


 
gibz ©   (2007-01-14 21:22) [6]


> Пость сюда, какие есть :)  чего уже!

а ты типа местный юморист :)


 
gibz ©   (2007-01-14 21:48) [7]

http://delphiworld.narod.ru/base/c_and_delphi_types.html
таки нашел


 
ors_archangel ©   (2007-01-15 01:19) [8]


> а ты типа местный юморист :)

Мой способ шутить - говорить правду :))



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2007.06.24;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.044 c
2-1180607028
Шакал
2007-05-31 14:23
2007.06.24
Добавить значение в уже имеющуюся строку


15-1180524116
Andy BitOff
2007-05-30 15:21
2007.06.24
Как вы думаете ...


2-1180877122
Core Thousand
2007-06-03 17:25
2007.06.24
Кол-во вкладок в TtabControl


15-1180210891
No_Dead
2007-05-27 00:21
2007.06.24
Пропадает сигнал((


15-1180327638
Slider007
2007-05-28 08:47
2007.06.24
Установленные пиратские Вин 2000/ХР и лицензия





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский