{{tag>category:"OpenInsight 32-Bit" author:"Jim Vaughan" author:"Pat McNerthney"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== DLL parameter types (OpenInsight 32-Bit) ==== === At 08 DEC 2004 06:08:10PM Jim Vaughan wrote: === I am unsure how to define a couple of paramter types for a DLL. From ????.H int FUNCTYPE direct_transfer(char far *target); char * FUNCTYPE CKTimeString(char *stringbuf, ULONG cktime); Is the following correct? INT PASCAL direct_transfer(LPACHAR) LPACHAR PASCAL CKTimeString(LPACHAR, ULONG) or is this correct? INT PASCAL direct_transfer(LPACHAR) LPACHAR PASCAL CKTimeString(ACHAR, ULONG) I am unsure about the difference between the following char * char far * are these both pointers or not? ---- === At 08 DEC 2004 08:25PM Pat McNerthney wrote: === Jim, Both the PASCAL calling sequence and the far pointer data type are remanents of the 16-bit Windows world and are no longer used in 32-bit Windows. If any of the "char *" parameters are suppose to be null terminated strings, I would declare those as LPASTR. The problem is "char *" can either mean the pointer to a buffer of an array of characters, or it can mean a pointer to a null terminated string of characters. So your declarations like this: INT STDCALL direct_transfer(LPACHAR) LPACHAR STDCALL CKTimeString(LPACHAR, ULONG) are the closest. It is hard to say which of the LPACHAR's should really be LPASTR's without a description of what the function expects. Pat ---- === At 08 DEC 2004 08:41PM Jim Vaughan wrote: === Great and thanks Pat, I will set them all as LPACHAR and see if everything works. [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=ABBCEB0D0E887F5485256F64007F176A|View this thread on the Works forum...]]