1
{******************************************************************************}
3
{ Lan Manager Buffer API interface Unit for Object Pascal }
5
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
6
{ Corporation. All Rights Reserved. }
8
{ The original file is: lmapibuf.h, released November 2001. The original }
9
{ Pascal code is: LmApiBuf.pas, released Februari 2002. The initial developer }
10
{ of the Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
12
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
13
{ Marcel van Brakel. All Rights Reserved. }
15
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
17
{ You may retrieve the latest version of this file at the Project JEDI }
18
{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
20
{ The contents of this file are used with permission, subject to the Mozilla }
21
{ Public License Version 1.1 (the "License"); you may not use this file except }
22
{ in compliance with the License. You may obtain a copy of the License at }
23
{ http://www.mozilla.org/MPL/MPL-1.1.html }
25
{ Software distributed under the License is distributed on an "AS IS" basis, }
26
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
27
{ the specific language governing rights and limitations under the License. }
29
{ Alternatively, the contents of this file may be used under the terms of the }
30
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
31
{ provisions of the LGPL License are applicable instead of those above. }
32
{ If you wish to allow use of your version of this file only under the terms }
33
{ of the LGPL License and not to allow others to use your version of this file }
34
{ under the MPL, indicate your decision by deleting the provisions above and }
35
{ replace them with the notice and other provisions required by the LGPL }
36
{ License. If you do not delete the provisions above, a recipient may use }
37
{ your version of this file under either the MPL or the LGPL License. }
39
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
41
{******************************************************************************}
43
// $Id: JwaLmApiBuf.pas,v 1.11 2007/09/05 11:58:50 dezipaitor Exp $
45
{$IFNDEF JWA_OMIT_SECTIONS_LM}
49
{$ENDIF JWA_OMIT_SECTIONS_LM}
52
{$HPPEMIT '#include "lmapibuf.h"'}
55
{$IFNDEF JWA_OMIT_SECTIONS_LM}
61
JwaLmCons, JwaWinType;
62
{$ENDIF JWA_OMIT_SECTIONS_LM}
64
{$IFNDEF JWA_IMPLEMENTATIONSECTION}
66
// Function Prototypes
69
function NetApiBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
70
{$EXTERNALSYM NetApiBufferAllocate}
71
function NetApiBufferFree(Buffer: LPVOID): NET_API_STATUS; stdcall;
72
{$EXTERNALSYM NetApiBufferFree}
73
function NetApiBufferReallocate(OldBuffer: LPVOID; NewByteCount: DWORD; var NewBuffer: LPVOID): NET_API_STATUS; stdcall;
74
{$EXTERNALSYM NetApiBufferReallocate}
75
function NetApiBufferSize(Buffer: LPVOID; var ByteCount: DWORD): NET_API_STATUS; stdcall;
76
{$EXTERNALSYM NetApiBufferSize}
79
// The following private function will go away eventually.
80
// Call NetApiBufferAllocate instead.
83
function NetapipBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
84
{$EXTERNALSYM NetapipBufferAllocate}
86
{$ENDIF JWA_IMPLEMENTATIONSECTION}
88
{$IFNDEF JWA_OMIT_SECTIONS_LM}
91
{$ENDIF JWA_OMIT_SECTIONS_LM}
93
{$IFNDEF JWA_INTERFACESECTION}
98
_NetApiBufferAllocate: Pointer;
100
function NetApiBufferAllocate;
102
GetProcedureAddress(_NetApiBufferAllocate, netapi32, 'NetApiBufferAllocate');
106
JMP [_NetApiBufferAllocate]
111
_NetApiBufferFree: Pointer;
113
function NetApiBufferFree;
115
GetProcedureAddress(_NetApiBufferFree, netapi32, 'NetApiBufferFree');
119
JMP [_NetApiBufferFree]
124
_NetApiBufferReallocate: Pointer;
126
function NetApiBufferReallocate;
128
GetProcedureAddress(_NetApiBufferReallocate, netapi32, 'NetApiBufferReallocate');
132
JMP [_NetApiBufferReallocate]
137
_NetApiBufferSize: Pointer;
139
function NetApiBufferSize;
141
GetProcedureAddress(_NetApiBufferSize, netapi32, 'NetApiBufferSize');
145
JMP [_NetApiBufferSize]
150
_NetapipBufferAllocate: Pointer;
152
function NetapipBufferAllocate;
154
GetProcedureAddress(_NetapipBufferAllocate, netapi32, 'NetapipBufferAllocate');
158
JMP [_NetapipBufferAllocate]
164
function NetApiBufferAllocate; external netapi32 name 'NetApiBufferAllocate';
165
function NetApiBufferFree; external netapi32 name 'NetApiBufferFree';
166
function NetApiBufferReallocate; external netapi32 name 'NetApiBufferReallocate';
167
function NetApiBufferSize; external netapi32 name 'NetApiBufferSize';
168
function NetapipBufferAllocate; external netapi32 name 'NetapipBufferAllocate';
170
{$ENDIF DYNAMIC_LINK}
172
{$ENDIF JWA_INTERFACESECTION}
174
{$IFNDEF JWA_OMIT_SECTIONS_LM}
176
{$ENDIF JWA_OMIT_SECTIONS_LM}