Declaring DLL-Imports for C#

Declaring DLL-Imports for C#

Post by Michael Meie » Mon, 09 Jun 2003 05:08:54

I'm trying to create a Class-Library for CAPI programming using C#. Does
anybody know how to declare the DLL-Imports of the functions contained in
capi2032.dll or has already done this?

Thanks, Michael


Declaring DLL-Imports for C#

Post by Kay-Uwe Schreine » Mon, 09 Jun 2003 16:12:36

I have writen a SDK for .NET, with this it's simple to send and receive CAPI
All messages and structs are full decoded. (in progress).
Each message and each struct ist a class with declared parameters.
If you are interesting, I can send you a beta version.
Short infos about this SDK you can find at

But if you not wish to use this, her is a sample.

using System.Runtime.InteropServices;
public static extern uint CAPI_REGISTER(
uint MessageBufferSize, // Size of Message Buffer
uint maxLogicalConnection, // Maximum number of logical connections
uint maxBDataBlocks, // Number of data blocks available simultaneously
uint maxBDataLen, //Maximum size of a data block
ref uint pApplID// Pointer to the location where COMMON-ISDN-API should
place the assigned application identification number

public static extern uint CAPI_PUT_MESSAGE(uint ApplID,IntPtr pCAPIMessage);

public static extern uint CAPI_GET_MESSAGE(
uint ApplID,
ref IntPtr ppCAPIMessage

public static extern uint CAPI_GET_VERSION(
ref uint pCAPIMajor,
ref uint pCAPIMinor,
ref uint pManufacturerMajor,
ref uint pManufacturerMinor

The definition of the many structs and sub structs are very difficult and
very time-consuming.
I have needed over 200 hours to complete it.

best regards


Declaring DLL-Imports for C#

Post by Kay-Uwe Schreine » Mon, 09 Jun 2003 16:42:36

Base informations can be found in COMMON-ISDN-API  Part II - Operating
Systems at

best regars


1. CALWIN32.DLL and NWSIPX32.DLL with MS Client?

From my experience with Novell's 32-bit client DLLs (in particular
CALWIN32.DLL and NWSIPX32.DLL), they require Novell's Client 32 software
to be loaded and used.  Their 16 bit equivalents, NWCALLS.DLL and
NWIPXSPX.DLL, could be used with either Novell's client or Microsoft's
client.  Has anybody else run into this same limitation?  Does anybody
know how these 32 bit DLLs can be used with Microsoft's client?  And if
not, why has Novell required the 32-bit DLLs to use the Novell's client
when the 16-bit DLLs can use either NWs or MSs client?


* Brad Schmidt                Extended Systems Inc.    *

* ph: (208) 322-7575 x6129    Boise, ID  83713         *
* fax: (208) 327-5006 *


3. Lost nwnetapi.dll and nwcalls.dll to Novell 3.12 needed badly

4. Solaris-7 on Intel disk question

5. 2 files needed - NWSETUP.DLL & LOCWIN16.DLL

6. BackgroundColor & uicontrol objects



9. What are lzexpand.dll & toolhelp.dll?

10. capi & charp(c#)

11. Court Declares Caller*ID Illegal