全部的在下面的URL中:<br>ftp://delphi-jedi.org/api/LanManager.zip<br><br>你要的函数:<br>{******************************************************************}<br>{ }<br>{ Borland Delphi Runtime Library }<br>{ LanManager share functions for Windows NT interface unit }<br>{ }<br>{ Portions created by Microsoft are }<br>{ Copyright (C) 1995-1999 Microsoft Corporation. }<br>{ All Rights Reserved. }<br>{ }<br>{ The original file is: lmmsg.h, released 14 Nov 1998. }<br>{ The original Pascal code is: LmMsg.pas, released 11 Jan 2000. }<br>{ The initial developer of the Pascal code is Petr Vones }<br>{ (petr.v@mujmail.cz). }<br>{ }<br>{ Portions created by Petr Vones are }<br>{ Copyright (C) 2000 Petr Vones }<br>{ }<br>{ Obtained through: }<br>{ }<br>{ Joint Endeavour of Delphi Innovators (Project JEDI) }<br>{ }<br>{ You may retrieve the latest version of this file at the Project }<br>{ JEDI home page, located at http://delphi-jedi.org }<br>{ }<br>{ The contents of this file are used with permission, subject to }<br>{ the Mozilla Public License Version 1.1 (the "License"); you may }<br>{ not use this file except in compliance with the License. You may }<br>{ obtain a copy of the License at }<br>{ http://www.mozilla.org/MPL/MPL-1.1.html }<br>{ }<br>{ Software distributed under the License is distributed on an }<br>{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }<br>{ implied. See the License for the specific language governing }<br>{ rights and limitations under the License. }<br>{ }<br>{******************************************************************}<br><br>unit LmMsg;<br><br>{$I LANMAN.INC}<br><br>{$ALIGN ON}<br>{$MINENUMSIZE 4}<br>{$WEAKPACKAGEUNIT}<br><br>interface<br><br>uses<br> Windows, LmCons;<br><br>(*$HPPEMIT '#include <netcons.h>'*)<br>(*$HPPEMIT '#include <lmmsg.h>'*)<br><br><br>{$EXTERNALSYM NetMessageNameAdd}<br>function NetMessageNameAdd(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;<br><br>{$EXTERNALSYM NetMessageNameEnum}<br>function NetMessageNameEnum(servername: LPCWSTR; level: DWORD; bufptr: Pointer;<br> prefmaxlen: DWORD; var entriesread: DWORD; var totalentries: DWORD;<br> resume_handle: PDWORD): NET_API_STATUS; stdcall;<br><br>{$EXTERNALSYM NetMessageNameGetInfo}<br>function NetMessageNameGetInfo(servername: LPCWSTR; msgname: LPCWSTR;<br> level: DWORD; var bufptr: Pointer): NET_API_STATUS; stdcall;<br><br>{$EXTERNALSYM NetMessageNameDel}<br>function NetMessageNameDel(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;<br><br>{$EXTERNALSYM NetMessageBufferSend}<br>function NetMessageBufferSend(servername: LPCWSTR; msgname: LPCWSTR;<br> fromname: LPCWSTR; buf: Pointer; buflen: DWORD): NET_API_STATUS; stdcall;<br><br>type<br> PMsgInfo0 = ^TMsgInfo0;<br> {$EXTERNALSYM _MSG_INFO_0}<br> _MSG_INFO_0 = record<br> msgi0_name: LPWSTR;<br> end;<br> TMsgInfo0 = _MSG_INFO_0;<br> {$EXTERNALSYM MSG_INFO_0}<br> MSG_INFO_0 = _MSG_INFO_0;<br><br> PMsgInfo1 = ^TMsgInfo1;<br> {$EXTERNALSYM _MSG_INFO_1}<br> _MSG_INFO_1 = record<br> msgi1_name: LPWSTR;<br> msgi1_forward_flag: DWORD;<br> msgi1_forward: LPWSTR;<br> end;<br> TMsgInfo1 = _MSG_INFO_1;<br> {$EXTERNALSYM MSG_INFO_1}<br> MSG_INFO_1 = _MSG_INFO_1;<br><br><br>// Values for msgi1_forward_flag.<br><br>const<br> {$EXTERNALSYM MSGNAME_NOT_FORWARDED}<br> MSGNAME_NOT_FORWARDED = $00; // Name not forwarded<br> {$EXTERNALSYM MSGNAME_FORWARDED_TO}<br> MSGNAME_FORWARDED_TO = $04; // Name forward to remote station<br> {$EXTERNALSYM MSGNAME_FORWARDED_FROM}<br> MSGNAME_FORWARDED_FROM = $10; // Name forwarded from remote station<br><br>implementation<br><br>function NetMessageNameAdd; external netapi32lib name 'NetMessageNameAdd';<br>function NetMessageNameEnum; external netapi32lib name 'NetMessageNameEnum';<br>function NetMessageNameGetInfo; external netapi32lib name 'NetMessageNameGetInfo';<br>function NetMessageNameDel; external netapi32lib name 'NetMessageNameDel';<br>function NetMessageBufferSend; external netapi32lib name 'NetMessageBufferSend';<br><br>end.<br>