Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.06.24;
Скачать: CL | DM;

Вниз

импорт функций в 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 вся ветка

Текущий архив: 2007.06.24;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.013 c
2-1180337637
Rimd
2007-05-28 11:33
2007.06.24
TDownloadUrl и его Event


2-1180403402
Александр_Н
2007-05-29 05:50
2007.06.24
Возник вопрос по Delphi


4-1168592324
Цукор5
2007-01-12 11:58
2007.06.24
CheckBox.Checked аналог на API


1-1177485787
Dioman
2007-04-25 11:23
2007.06.24
смена сочетаний клавиш в delphi


15-1180518122
Empleado
2007-05-30 13:42
2007.06.24
Нет под рукой Висты, не могу посмотреть ...