🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.controls
1 messages
1 total messages Started by Christian Barmala Tue, 15 Dec 1998 00:00
Passing Pointer to Structure?
#13
Author: 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>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads