Thread View: comp.os.ms-windows.programmer.misc
2 messages
2 total messages
Started by S�bastien Jean
Wed, 04 Nov 1998 00:00
Can not call a 16-bit (VC 1.5) from a 32 Bit app
Author: S�bastien Jean
Date: Wed, 04 Nov 1998 00:00
Date: Wed, 04 Nov 1998 00:00
123 lines
3732 bytes
3732 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: Can not call a 16-bit (VC 1.5) from a 32 Bit app
Author: Mickey Williams
Date: Fri, 06 Nov 1998 00:00
Date: Fri, 06 Nov 1998 00:00
22 lines
1908 bytes
1908 bytes
S�bastien Jean wrote in message <71qth8$73o$1@news.pubnix.net>... [snip - basically trying to build 16-bit DLL to be called from 32-bit land] >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 ... > "Error opening obrspen.dll" You must implement a thunk. BTW, it's not possible to thunk from a 32-bit executable to a 16-bit DLL in the operating system formerly known as Windows NT. --- Mickey Williams Author - Programming Windows NT Unleashed Teach Yourself Visual C++ in 24 Hours Essential Visual C++
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