Thread View: comp.os.ms-windows.programmer.misc
2 messages
2 total messages
Started by S�bastien Jean
Wed, 04 Nov 1998 00:00
Call a 16 DLL under a 32 BIT app
Author: S�bastien Jean
Date: Wed, 04 Nov 1998 00:00
Date: Wed, 04 Nov 1998 00:00
123 lines
3716 bytes
3716 bytes
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);
//--------------------------------------------------------------------
Re: Call a 16 DLL under a 32 BIT app
Author: Doug Reilly
Date: Wed, 04 Nov 1998 00:00
Date: Wed, 04 Nov 1998 00:00
134 lines
4165 bytes
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);
>
>//--------------------------------------------------------------------
>
>
>
>
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