Simple API Question

I am using an API for some mail server software. I dont have much experience of VB APIs and the documentation with the API is poor. I have managed to get some stuff working but I dont understand it.

The API is Decalred as follows:

Public Declare Function AddDomain Lib "api" (ByVal Name As String, ByRef Buffer As Any, ByVal Size As Long) As Long

I understand that the Function returns a Long with 0 indicating sucess and any other number indicating an error message. I understand that Name is the domain name to add. What I dont understand is what the Buffer is and what the keyword Any means. The code below does work I just dont understand the buffer stuff. Any explanations please?

I dont see anything like that for this particular function (AddDomain). I do understand what you mean though. Am I right in thinking the buffer can be used to pass data in and to receive data back? That makes sense to me, I guess I was just confused since this seems redundant with the AddDomain function which seems to only return a Long to indicate success or failure.

I’ve seen a number of people looking for examples of how to access web services from VB6. I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…

Introduction
In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function. While writing that article I realized that no o…

Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…