At link time, any program that calls a particular API function must be linked to a library (.LIB) containing information about the function. Link-time libraries provide information that allows the operating system dynamically to link the appropriate dynamic link library (.DLL) to a program at program load time. The default directory where each API is installed is given.
Note: You can use dynamic loading and address resolution instead of the import libraries specified here. See the IBM OS/2 Programming Toolkit online programming information or the OS/2 Technical Library, Programming Guides for more information about these techniques.
If calling any of the following APIs, a program must be linked to the NETAPI.LIB library (stored in \IBMLAN\NETSRC\OS2\LIB):
NetAccessAdd NetAccessApply NetAccessCheck NetAccessDel NetAccessEnum NetAccessGetInfo NetAccessGetUserPerms NetAccessSetInfo NetAlertRaise NetAlertStart NetAlertStop NetAliasAdd NetAliasDel NetAliasEnum NetAliasGetInfo NetAliasSetInfo NetAppAdd NetAppDel NetAppEnum NetAppGetInfo NetAppSetInfo NetAuditClear NetAuditRead NetAuditWrite NetBiosClose NetBiosEnum NetBiosGetInfo NetBiosOpen NetBiosSubmit NetCharDevControl NetCharDevEnum NetCharDevGetInfo NetCharDevQEnum NetCharDevQGetInfo NetCharDevQPurge NetCharDevQPurgeSelf NetCharDevQSetInfo NetConfigGet2 NetConfigGetAll2 NetConnectionEnum NetCreateRIPLMachine NetDASDAdd NetDASDCheck NetDASDCtl NetDASDDel NetDASDEnum NetDASDGetInfo NetDASDSetInfo NetDeleteRIPLMachine NetErrorLogClear NetErrorLogRead NetErrorLogWrite NetFileClose2 NetFileEnum2 NetFileGetInfo2 NetGetDCName NetGetRIPLMachine NetGroupAdd NetGroupAddUser NetGroupDel NetGroupDelUser NetGroupEnum NetGroupGetInfo NetGroupGetUsers NetGroupSetInfo NetGroupSetUsers NetHandleGetInfo NetHandleSetInfo NetLogonEnum NetMessageBufferSend NetMessageFileSend NetMessageLogFileGet NetMessageLogFileSet NetMessageNameAdd NetMessageNameDel NetMessageNameEnum NetMessageNameFwd NetMessageNameGetInfo NetMessageNameUnFwd NetRemoteCopy NetRemoteExec NetRemoteMove NetRemoteTOD NetServerAdminCommand NetServerDiskEnum NetServerEnum2 NetServerGetInfo NetServerSetInfo NetServiceControl NetServiceEnum NetServiceGetInfo NetServiceInstall NetServiceStatus NetSessionDel NetSessionEnum NetSessionGetInfo NetSetRIPLMachine NetShareAdd NetShareCheck NetShareDel NetShareEnum NetShareGetInfo NetShareSetInfo NetStatisticsGet2 NetUseAdd NetUseDel NetUseEnum NetUseGetInfo NetUserAdd NetUserDCDBInit NetUserDel NetUserEnum NetUserGetAppSel NetUserGetGroups NetUserGetInfo NetUserGetLogonAsn NetUserModalsGet NetUserModalsSet NetUserPasswordSet NetUserSetAppSel NetUserSetGroups NetUserSetInfo NetUserSetLogonAsn NetUserValidate2 NetWkstaGetInfo NetWkstaSetInfo NetWkstaSetUID2
If calling any of the following APIs, a program must be linked to the NETAPI32.LIB library (stored in \IBMLAN\NETSRC\OS2\LIB):
Net32AccessAdd Net32AccessApply Net32AccessCheck Net32AccessDel Net32AccessEnum Net32AccessGetInfo Net32AccessGetUserPerms Net32AccessSetInfo Net32AlertRaise Net32AlertStart Net32AlertStop Net32AliasAdd Net32AliasDel Net32AliasEnum Net32AliasGetInfo Net32AliasSetInfo Net32AppAdd Net32AppDel Net32AppEnum Net32AppGetInfo Net32AppSetInfo Net32AuditClear Net32AuditRead Net32AuditWrite Net32CharDevControl Net32CharDevEnum Net32CharDevGetInfo Net32CharDevQEnum Net32CharDevQGetInfo Net32CharDevQPurge Net32CharDevQPurgeSelf Net32CharDevQSetInfo Net32ConfigGet2 Net32ConfigGetAll2 Net32ConnectionEnum Net32CreateRIPLMachine Net32DASDAdd Net32DASDCheck Net32DASDCtl Net32DASDDel Net32DASDEnum Net32DASDGetInfo Net32DASDSetInfo Net32DelRIPLMachine Net32EnumRIPLMachine Net32ErrorLogClear Net32ErrorLogRead Net32ErrorLogWrite Net32FileClose2 Net32FileEnum2 Net32FileGetInfo2 Net32GetDCName Net32GetRIPLMachineInfo Net32GroupAdd Net32GroupAddUser Net32GroupDel Net32GroupDelUser Net32GroupEnum Net32GroupGetInfo Net32GroupGetUsers Net32GroupSetInfo Net32GroupSetUsers Net32LogonEnum Net32MessageBufferSend Net32MessageFileSend Net32MessageLogFileGet Net32MessageLogFileSet Net32MessageNameAdd Net32MessageNameDel Net32MessageNameEnum Net32MessageNameFwd Net32MessageNameGetInfo Net32MessageNameUnFwd Net32RemoteCopy Net32RemoteExec Net32RemoteMove Net32RemoteTOD Net32ServerAdminCommand Net32ServerDiskEnum Net32ServerEnum2 Net32ServerGetInfo Net32ServerSetInfo Net32ServiceControl Net32ServiceEnum Net32ServiceGetInfo Net32ServiceInstall Net32ServiceStatus Net32SessionDel Net32SessionEnum Net32SessionGetInfo Net32SetRIPLMachineInfo Net32ShareAdd Net32ShareCheck Net32ShareDel Net32ShareEnum Net32ShareGetInfo Net32ShareSetInfo Net32StatisticsGet2 Net32UseAdd Net32UseDel Net32UseEnum Net32UseGetInfo Net32UserAdd Net32UserDCDBInit Net32UserDel Net32UserEnum Net32UserGetAppSel Net32UserGetGroups Net32UserGetInfo Net32UserGetLogonAsn Net32UserModalsGet Net32UserModalsSet Net32UserPasswordSet Net32UserSetAppSel Net32UserSetGroups Net32UserSetInfo Net32UserSetLogonAsn Net32UserValidate2 Net32WkstaGetInfo Net32WkstaSetInfo NetBios32Close NetBios32Enum NetBios32GetInfo NetBios32Open NetBios32Submit
If calling any of the following APIs, a program must be linked to the HPFS386.LIB library (stored in \IBMLAN\NETSRC\OS2\LIB):
HPFS386GetInfo HPFS386GetInfo16
If calling any of the following APIs, a program must be linked to either the OS2286.LIB library (for 16-bit applications) or the OS2386.LIB library (for 32-bit applications):
DosBufReset or 32-bit DosResetBuffer DosCallNmPipe or 32-bit DosCallNPipe DosClose DosConnectNmPipe or 32-bit DosConnectNPipe DosDisConnectNmPipe or 32-bit DosDisConnectNPipe DosMakeNmPipe or 32-bit DosCreateNPipe DosOpen DosPeekNmPipe or 32-bit DosPeekNPipe DosPrintDestAdd or 32-bit SplCreateDevice DosPrintDestControl or 32-bit SplControlDevice DosPrintDestDel or 32-bit SplDeleteDevice DosPrintDestEnum or 32-bit SplEnumDevice DosPrintDestGetInfo or 32-bit SplQueryDevice DosPrintDestSetInfo or 32-bit SplSetDevice DosPrintJobContinue or 32-bit SplReleaseJob DosPrintJobDel or 32-bit SplDeleteJob DosPrintJobEnum or 32-bit SplEnumJob DosPrintJobGetId DosPrintJobGetInfo or 32-bit SplQueryJob DosPrintJobPause or 32-bit SplHoldJob DosPrintJobSetInfo or 32-bit SplSetJob DosPrintQAdd or 32-bit SplCreateQueue DosPrintQContinue or 32-bit SplReleaseQueue DosPrintQDel or 32-bit SplDeleteQueue DosPrintQEnum or 32-bit SplEnumQueue DosPrintQGetInfo or 32-bit SplQueryQueue DosPrintQPause or 32-bit SplHoldQueue DosPrintQPurge or 32-bit SplPurgeQueue DosPrintQSetInfo or 32-bit SplSetQueue DosQFHandState or 32-bit DosQueryFHState DosQHandState or 32-bit DosQueryHType DosQNmPHandState or 32-bit DosQueryNPHState DosQNmPipeInfo or 32-bit DosQueryNPipeInfo DosQNmPipeSemState or 32-bit DosQueryNPipeSemState DosRead DosReadAsync DosSetFHandState or 32-bit DosSetFHState DosSetNmPHandState or 32-bit DosSetNPHState DosSetNmPipeSem or 32-bit DosSetNPipeSem DosTransactNmPipe or 32-bit DosTransactNPipe DosWaitNmPipe or 32-bit DosWaitNPipe DosWrite DosWriteAsync SplQmAbort SplQmClose SplQmEndDoc SplQmOpen SplQmStartDoc SplQmWrite
If calling any of the following APIs, a program must be linked to the MAILSLOT.LIB library (stored in \IBMLAN\NETSRC\OS2\LIB):
DosDeleteMailslot DosMailslotInfo DosMakeMailslot DosPeekMailslot DosReadMailslot DosWriteMailslot Dos32DeleteMailslot Dos32MailslotInfo Dos32MakeMailslot Dos32PeekMailslot Dos32ReadMailslot Dos32WriteMailslot
If calling any of the following APIs, a program must be linked to the UPM.LIB library (stored in \IBMLAN\NETSRC\OS2\LIB by default):
UPMELOCL UPMELOCU UPMEULGF UPMEULGN UPMEUSRL U32ELOCL U32ELOCU U32EULGF U32EULGN U32EUSRL
If you are writing an application that is to run on LAN Server Version 2.0 or 3.0, you must link your application to NETOEM.LIB as well as the NETAPI.LIB library (or NETAPI32.LIB) library. Link to the NETOEM.LIB library before the other library files; for example:
link myprogram,,,netoem.LIB+netapi.LIB+os2.LIB;LAN Server installs the NETOEM.LIB library in the same directory as the other library files \IBMLAN\NETSRC\OS2\LIB by default.