๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2962

Re: Call a 16 DLL under a 32 BIT app

#2962
From: Doug Reilly
Date: Wed, 04 Nov 1998 00:00
134 lines
4165 bytes
In general, you cannot just call a 16 bit DLL from a 32 bit program.  You
need to Thunk to that DLL.  There are articles on this in MSDN, if you have
access to that.


S๏ฟฝbastien Jean wrote in message <71qs1p$4vb$1@news.pubnix.net>...
>Hi,
>
>I need help to develop a 16-BIT DLL.
>
>
>I'm using Microsoft Visual C++ version 1.52 (16 bits)
>
>
>
>I choose
>
> Project type = Windows Dynamic-link library (DLL)
>
>SO, when I build and compile the DLL file , there is not error message.
>When I try to call, with VB 32bit under Win 95, or PowerBuilder 32-bit
under
>win95, one
>of this 2 functions below... It's always say ...
>
> int OBRS_EnablePenClick
> int OBRS_DisablePenClick
>
>
>
>   "Error opening obrspen.dll"
>
>
>
>Maybe I forget to set something in Visual C ??!!
>
>Can someone help me with my problem ??????? ASAP ??!!
>
>A have to deliver something for friday......
>
>
>
>Write my at sebastien.jean@cn.ca at any time....
>or after 5pm.. at sebasj@arobas.net
>
>
>
>Here find my DEF file
>
>//--------------------------------------------------------------------
>; ObrsPen.def : Declares the module parameters for the DLL.
>
>LIBRARY      "OBRSPEN"
>DESCRIPTION  'OBRSPEN Windows Dynamic Link Library'
>
>EXPORTS
> OBRS_EnablePenClick
> OBRS_DisablePenClick
>    ; Explicit exports can go here
>//--------------------------------------------------------------------
>
>
>
>
>Here the content of my .C file
>
>//--------------------------------------------------------------------
>#include <windows.h>
>#include <direct.h>
>#include <stdio.h>
>#include <io.h>
>#include <time.h>
>#include <memory.h>
>#include <string.h>
>
>#include "obrspen.h"
>
>//******************************************************
>//
>// Procedure: OBRS_EnablePenClick
>//
>// Description: This procedure activate the right click
>//              on the pen driver.
>//
>// Input: None
>//
>// Output: None
>//
>//******************************************************
>int FAR PASCAL OBRS_EnablePenClick(void){
>
>bla bla bla
>
> return 1;
>}
>
>
>//******************************************************
>//
>// Procedure: OBRS_DisablePenClick
>//
>// Description: This procedure desactivate the right
>//              click on the pen driver.
>//
>// Input: None
>//
>// Output: None
>//
>//******************************************************
>int FAR PASCAL OBRS_DisablePenClick(void){
>
>bla bla bla...
>
> return 1;
>}
>
>
>//--------------------------------------------------------------------
>
>
>
>Here the content of my .H
>
>
>//--------------------------------------------------------------------
>
>int FAR PASCAL OBRS_EnablePenClick(void);
>int FAR PASCAL OBRS_DisablePenClick(void);
>
>//--------------------------------------------------------------------
>
>
>
>
Technical Details
Message-ID: <71r9qd$pdn@news.webspan.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <71qs1p$4vb$1@news.pubnix.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 113dfb,d2fbcb8f0423f89e
X-Google-Attributes: gid113dfb,public
X-Google-Thread: 112bcc,d2fbcb8f0423f89e
X-Google-Attributes: gid112bcc,public
X-Google-Thread: fe37d,d2fbcb8f0423f89e
X-Google-Attributes: gidfe37d,public
X-Google-Thread: fa08f,d2fbcb8f0423f89e
X-Google-Attributes: gidfa08f,public
X-Google-Thread: f935d,d2fbcb8f0423f89e
X-Google-Attributes: gidf935d,public
X-Google-Thread: 105df1,d2fbcb8f0423f89e
X-Google-Attributes: gid105df1,public
X-Google-Thread: 114950,d2fbcb8f0423f89e
X-Google-Attributes: gid114950,public
From: "Doug Reilly" <dreilly@webspan.net>
Subject: Re: Call a 16 DLL under a 32 BIT app
Date: 1998/11/04
Message-ID: <71r9qd$pdn@news.webspan.net>
X-Deja-AN: 408554343
References: <71qs1p$4vb$1@news.pubnix.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Report-Abuse-To: abuse@mail.webspan.net
Organization: WebSpan Inc., New Jersey
NNTP-Posting-Date: 04 Nov 1998 23:33:17 EST
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.vxd,comp.os.ms-windows.programmer.win32,francom.programmation,microsoft.public.win16.programmer.gdi,microsoft.public.win16.programmer.kernel,microsoft.public.win16.programmer.pen,micr