🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.controls
Article #13

Passing Pointer to Structure?

#13
From: Christian Barmala
Date: Tue, 15 Dec 1998 00:00
22 lines
2217 bytes
I want to wrap a classic C-API into ActiveX controls. This wrapper is
necessary, because Active Server Pages can only call ActiveX controls
and not "ordinary" DLLs.

The API is typical for C: The first function allocates memory for a
structure, fills it and returns a pointer to this structure. This
pointer is called a session handle and it is passed to the next function
which returns again a pointer (a login handle), which has to be passed
to the third function. On termination of the program you deallocate the
login and session handle.

In my opinion, it is very natural to pack the functions to allocate and
deallocate the session in one ActiveX object and the functions for the
login in another ActiveX object. However in this case I have to pass a
pointer to the session to the object which handles login. Because
ActiveX controls are based upon Automation, control and container can
only exchange Automation types (long,BOOL,OLE_COLOR, LPDISPATCH,...). So
how do I pass this pointer (either a pointer to the native C structure
or a pointer to the first ActiveX object containing the pointer to the C
structure)?

Christian Barmala <christian.barmala@gmx.net>
Technical Details
Message-ID: <36760DF0.C4CDA7EE@gmx.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114f01,9440ca5fcac3647f,start
X-Google-Attributes: gid114f01,public
X-Google-Thread: f5214,9440ca5fcac3647f,start
X-Google-Attributes: gidf5214,public
X-Google-Thread: f7033,9440ca5fcac3647f,start
X-Google-Attributes: gidf7033,public
From: Christian Barmala <christian.barmala@gmx.net>
Subject: Passing Pointer to Structure?
Date: 1998/12/15
Message-ID: <36760DF0.C4CDA7EE@gmx.net>
X-Deja-AN: 422407487
Content-Transfer-Encoding: 7bit
X-Accept-Language: de-DE,en
Content-Type: text/plain; charset=us-ascii
X-Posting-Server-Note: This article has been posted on a newsserver of Xlink Internet Services. It does not necessarily represent the opinion of Xlink. Please report abuses to news-support@xlink.net
Organization: Posted on a server of Xlink Internet Services. Mit Sicherheit!
Mime-Version: 1.0
Newsgroups: comp.os.ms-windows.programmer.controls,microsoft.public.activex.programming.control.webdc,borland.public.delphi.activex.controls.writing