TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: David Sparrman
date: 1996-05-28 21:29:40
subject: Calling MSGAPI from Pascal

Hello All!


Is there anyone out there that can give me some help to get started using
MSGAPI32.DLL from Pascal?

I have the archive SQDEV200.ZIP which has all necessary headers to use
MSGAPI32.DLL in C programs. The problem is that I am not confident with C,
and haven't used it since 1986.

To use this .DLL from Pascal, I suppose one will have to translate some .h
files (at least MSGAPI.H) - but that should be no problem.

The biggest problem is how to call the .DLL functions from within a Pascal
program. Could anyone help me to write a small sample program showing this
crucial part?

The simplest possible program using MSGAPI would be something like:

  * Calling MsgOpenApi
  * Calling MsgCloseApi

C Definitions:

       sword MsgOpenApi(struct _minf *minf);
       sword MsgCloseApi(void);

       struct _minf
       {
           word req_version;
           word def_zone;
           word haveshare;

           void OS2FAR * (MAPIENTRY *palloc)(size_t size);
           void (MAPIENTRY *pfree)(void OS2FAR *ptr);
           void OS2FAR * (MAPIENTRY *repalloc)(void OS2FAR *ptr, size_t size);

           void far * (MAPIENTRY *farpalloc)(size_t size);
           void (MAPIENTRY *farpfree)(void far *ptr);
           void far * (MAPIENTRY *farrepalloc)(void far *ptr, size size);
       };

Concerning which Pascal compiler to use, either Speed Pascal or Virtual
Pascal will do.


regards,
        David

--- GoldED/2 2.50 UNREG
* Origin: Joshua BBS (2:206/141)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1
@PATH: 206/141 0 201/505 200 2104 109/347 18 13/25 396/1 270/101 712/515
@PATH: 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.