当前位置:首页 科普知识 ConfigurePort

ConfigurePort

发布时间:2023-09-14 01:10:55

Long,非零表示成功,零表示失败。会设置GetLastError If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. 说

ConfigurePort介绍

Long,非零表示成功,零表示失败。会设置GetLastError If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. 说

ConfigurePort

ConfigurePort简介

api函数名:ConfigurePort

操作系统:Requires Windows 95 or later

参数表:

pName———— String,欲对其端口进行配置的一台服务器的名字。对于本地系统,请设为vbNullString

hwnd ———— Long,对话框父窗口的句柄

pPortName ————String,端口名

?pName————Points to a null-terminated string that specifies the name of the server on which the specified port exists. If this parameter is NULL, the port is local.

?hWnd————Identifies the parent window of the port-configuration dialog box.

ConfigurePort

?pPortName————Points to a null-terminated string that specifies the name of the port to be configured.

针对指定的端口,启动一个端口配置对话框 The ConfigurePort function displays the port-configuration dialog box for a port on the specified server. 声明:

Declare Function ConfigurePort Lib "winspool.drv" Alias "ConfigurePortA" (ByVal pName As String, ByVal hwnd As Long, ByVal pPortName As String) As Long

ConfigurePort在C#中使用

导入库:winspool.drv

***.Net中运用

命名空间 using System.Runtime.InteropServices;

导入库 

函数原型 public static extern int ConfigurePort (string pName,int hwnd,string pPortName );

ConfigurePort

参数说明 //pName String,欲对其端口进行配置的一台服务器的名字

//hwnd Long,对话框父窗口的句柄

//pPortName String,端口名

返回值 非零表示成功,零表示失败。

温馨提示:
本文【ConfigurePort】由作者 爱百科 转载提供。 该文观点仅代表作者本人, 自学教育网 信息发布平台,仅提供信息存储空间服务, 若存在侵权问题,请及时联系管理员或作者进行删除。
(c)2008-2025 自学教育网 All Rights Reserved 汕头市灵创科技有限公司
粤ICP备2024240640号-6