Declaring DLL-Imports for C#

Declaring DLL-Imports for C#

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



Hello
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
messages.
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 http://capi-sdk.ksware.de

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

using System.Runtime.InteropServices;
[DllImport("capi2032.dll",CharSet=CharSet.Auto)]
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
);

[DllImport("capi2032.dll",CharSet=CharSet.Auto)]
public static extern uint CAPI_PUT_MESSAGE(uint ApplID,IntPtr pCAPIMessage);

[DllImport("capi2032.dll",CharSet=CharSet.Auto)]
public static extern uint CAPI_GET_MESSAGE(
uint ApplID,
ref IntPtr ppCAPIMessage
);

[DllImport("capi2032.dll",CharSet=CharSet.Auto)]
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
Kay

 
 
 

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 http://www.capi.org/download/capi20-2.pdf

best regars
Kay

 
 
 

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

--
* Brad Schmidt                Extended Systems Inc.    *

* ph: (208) 322-7575 x6129    Boise, ID  83713         *
* fax: (208) 327-5006         http://www.extendsys.com *

2. Can't EXPLORE iPAQ

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

7. CALWIN32.DLL / NWCALLS.DLL

8. ONLINE-HELP-TEX and/or LATEX

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

10. capi & charp(c#)

11. Court Declares Caller*ID Illegal