Calling 16-bit functions (DLL) from 32-bit App?

I've migrated a 16-bit app to a 32-bit app recently.  The one problem is
that we purchased a communications DLL from a third party who has since gone
out of business, so there's no chance at getting a 32-bit version.  The DLL
is 16-bit, and PowerBuilder (32-bit) has a problem opening the library.

Is there anyway to call functions in a 16-bit DLL from a 32-bit application?


0
chrisb01
12/16/1997 3:55:32 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

4 Replies
656 Views

Similar Articles

[PageSpeed] 42

Chris,

    Unfortunately not. Unless the DLL is 'thunkable', then it can't be
accessed from PB.  Who is/was the 3rd party vendor?
hth,
--
Anthony M. Perugini
Principal Consultant
CPDP, CPI, CSPdba, MCPS
Pinnacle Decision Systems Inc.  www.pinndec.com
aperugini@pinndec.com

chrisb01@msn.com wrote in message ...
>I've migrated a 16-bit app to a 32-bit app recently.  The one problem is
>that we purchased a communications DLL from a third party who has since
gone
>out of business, so there's no chance at getting a 32-bit version.  The DLL
>is 16-bit, and PowerBuilder (32-bit) has a problem opening the library.
>
>Is there anyway to call functions in a 16-bit DLL from a 32-bit
application?
>
>


begin 666 Anthony M Perugini.vcf
M0D5'24XZ5D-!4D0-"DXZ4&5R=6=I;FD[06YT:&]N>3M-#0I&3CI!;G1H;VYY
M($T@4&5R=6=I;FD-"D]21SI0:6YN86-L92!$96-I<VEO;B!3>7-T96US($EN
M8RX-"E1)5$Q%.E!R:6YC:7!A;"!#;VYS=6QT86YT#0I.3U1%.D-01% L($-0
M22P@0U-09&)A+"!-0U!3#0I414P[5T]22SM63TE#13HQ+3@P,"TR,SDM,C$R
M, T*5$5,.U=/4DL[1D%8.C(P,RTR,SDM-C0U,PT*0412.U=/4DLZ.SLY-R!7
M87-H:6YG=&]N($%V92X[3F]R=&@@2&%V96X[0U0[,#8T-S,[55-!#0I,04)%
M3#M73U)+.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z.3<@5V%S:&EN9W1O
M;B!!=F4N/3!$/3!!3F]R=&@@2&%V96XL($-4(# V-#<S/3!$/3!!55-!#0I5
M4DPZ:'1T<#HO+W=W=RYP:6YN9&5C+F-O;0T*14U!24P[4%)%1CM)3E1%4DY%
D5#IA<&5R=6=I;FE <&EN;F1E8RYC;VT-"D5.1#I60T%21 T*
`
end

0
Anthony
12/16/1997 6:08:51 PM
Silverware, Inc. based in Dallas.  The software is "Silverware Windows
Communications Toolkit."

When you stated "Unless the DLL is 'thunkable'," did you mean that if it is
thunkable, I would I have to create my own thunking layer... OR, if it is
thunkable, I could access it from PB without having to create my own
thunking layer?

If I have to create my own thunking layer, then I might as well re-write my
app to use Win32api calls or something.

Anthony M. Perugini wrote in message ...
>Chris,
>
>    Unfortunately not. Unless the DLL is 'thunkable', then it can't be
>accessed from PB.  Who is/was the 3rd party vendor?
>hth,
>--
>Anthony M. Perugini
>Principal Consultant
>CPDP, CPI, CSPdba, MCPS
>Pinnacle Decision Systems Inc.  www.pinndec.com
>aperugini@pinndec.com
>
>chrisb01@msn.com wrote in message ...
>>I've migrated a 16-bit app to a 32-bit app recently.  The one problem is
>>that we purchased a communications DLL from a third party who has since
>gone
>>out of business, so there's no chance at getting a 32-bit version.  The
DLL
>>is 16-bit, and PowerBuilder (32-bit) has a problem opening the library.
>>
>>Is there anyway to call functions in a 16-bit DLL from a 32-bit
>application?
>>
>>
>
>
>


0
chrisb01
12/16/1997 6:27:52 PM
Chris,

    If the DLL was written with a thunking layer, I believe 32bit
PowerBuilder would've been able to use it.  You may need to write your own
layer.   I have an implementation using communication with the WinAPI that
someone kindly gave to me.   I'm emailing you a zip file containing source
and demo app.

Hth,
--
Anthony M. Perugini
Principal Consultant
CPDP, CPI, CSPdba, MCPS
Pinnacle Decision Systems Inc.  www.pinndec.com
aperugini@pinndec.com

chrisb01@msn.com wrote in message ...
>Silverware, Inc. based in Dallas.  The software is "Silverware Windows
>Communications Toolkit."
>
>When you stated "Unless the DLL is 'thunkable'," did you mean that if it is
>thunkable, I would I have to create my own thunking layer... OR, if it is
>thunkable, I could access it from PB without having to create my own
>thunking layer?
>
>If I have to create my own thunking layer, then I might as well re-write my
>app to use Win32api calls or something.
>
>Anthony M. Perugini wrote in message ...
>>Chris,
>>
>>    Unfortunately not. Unless the DLL is 'thunkable', then it can't be
>>accessed from PB.  Who is/was the 3rd party vendor?
>>hth,
>>--
>>Anthony M. Perugini
>>Principal Consultant
>>CPDP, CPI, CSPdba, MCPS
>>Pinnacle Decision Systems Inc.  www.pinndec.com
>>aperugini@pinndec.com
>>
>>chrisb01@msn.com wrote in message ...
>>>I've migrated a 16-bit app to a 32-bit app recently.  The one problem is
>>>that we purchased a communications DLL from a third party who has since
>>gone
>>>out of business, so there's no chance at getting a 32-bit version.  The
>DLL
>>>is 16-bit, and PowerBuilder (32-bit) has a problem opening the library.
>>>
>>>Is there anyway to call functions in a 16-bit DLL from a 32-bit
>>application?
>>>
>>>
>>
>>
>>
>
>




begin 666 Anthony M Perugini.vcf
M0D5'24XZ5D-!4D0-"DXZ4&5R=6=I;FD[06YT:&]N>3M-#0I&3CI!;G1H;VYY
M($T@4&5R=6=I;FD-"D]21SI0:6YN86-L92!$96-I<VEO;B!3>7-T96US($EN
M8RX-"E1)5$Q%.E!R:6YC:7!A;"!#;VYS=6QT86YT#0I.3U1%.D-01% L($-0
M22P@0U-09&)A+"!-0U!3#0I414P[5T]22SM63TE#13HQ+3@P,"TR,SDM,C$R
M, T*5$5,.U=/4DL[1D%8.C(P,RTR,SDM-C0U,PT*0412.U=/4DLZ.SLY-R!7
M87-H:6YG=&]N($%V92X[3F]R=&@@2&%V96X[0U0[,#8T-S,[55-!#0I,04)%
M3#M73U)+.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z.3<@5V%S:&EN9W1O
M;B!!=F4N/3!$/3!!3F]R=&@@2&%V96XL($-4(# V-#<S/3!$/3!!55-!#0I5
M4DPZ:'1T<#HO+W=W=RYP:6YN9&5C+F-O;0T*14U!24P[4%)%1CM)3E1%4DY%
D5#IA<&5R=6=I;FE <&EN;F1E8RYC;VT-"D5.1#I60T%21 T*
`
end

0
Anthony
12/16/1997 8:12:44 PM
Chris,

I had the some problem some time ago. Thunking would be a possibility but Windows95 and WindowsNT don't have the same behavior it
would be quite difficult.
I solved the problem by using DDE. I wrote a small 16Bit DDE server in C that called the 16Bit DLL. My 32 Bit application
communicates through DDE with this server. This works fine and is quite easy.

However there are some hurdles to take:
- Windows NT returns handles which go beyond the scope of INTEGER, Windows95 does not, that means if your DLL need handles for
drawing or sending messages it has to go through the DDE Server.
- Speed: DDE isn't a very fast way to communicate but as long as you don't have 1000s of function calls that's no problem.

I can provide you more details if you're interested
HTH
Arthur Hefti, CPD/CPI


CATsoft Development GmbH, Switzerland, http://www.catsoft.ch
A Client/Server and Internet/Intranet Development Company

******************************************************
* Check out the Swiss PowerBuilder and I*net Conference Site
* at www.catsoft.ch/pbconf98.htm
******************************************************
----

chrisb01@msn.com wrote in article ...

>Silverware, Inc. based in Dallas.  The software is "Silverware Windows
>Communications Toolkit."
>
>When you stated "Unless the DLL is 'thunkable'," did you mean that if it is
>thunkable, I would I have to create my own thunking layer... OR, if it is
>thunkable, I could access it from PB without having to create my own
>thunking layer?
>
>If I have to create my own thunking layer, then I might as well re-write my
>app to use Win32api calls or something.
>
>Anthony M. Perugini wrote in message ...
>>Chris,
>>
>>    Unfortunately not. Unless the DLL is 'thunkable', then it can't be
>>accessed from PB.  Who is/was the 3rd party vendor?
>>hth,
>>--
>>Anthony M. Perugini
>>Principal Consultant
>>CPDP, CPI, CSPdba, MCPS
>>Pinnacle Decision Systems Inc.  www.pinndec.com
>>aperugini@pinndec.com
>>
>>chrisb01@msn.com wrote in message ...
>>>I've migrated a 16-bit app to a 32-bit app recently.  The one problem is
>>>that we purchased a communications DLL from a third party who has since
>>gone
>>>out of business, so there's no chance at getting a 32-bit version.  The
>DLL
>>>is 16-bit, and PowerBuilder (32-bit) has a problem opening the library.
>>>
>>>Is there anyway to call functions in a 16-bit DLL from a 32-bit
>>application?
>>>
>>>
>>
>>
>>
>
>


0
Arthur
12/17/1997 7:05:57 AM
Reply:

Similar Artilces:

Calling 16 bit dll from 32 bit Powerbuilder
I want to know if it is possible to call a function out of a 16 bit dll from within a Power Builder App that was compiled in 32 bit. If so, How ? Hi, No. This is not possible direclty. The most simple way is to get a 32bit version of that DLL, but you probably don't have that right? So, your in deep shit. You could create a thunking layer, which is a 32bit layer, converting 32bit calls to 16bit but this is not an easy task to do. Other option is creating a 16bit VB oleserver which calls your DLL. This ole server can be used within your 32bit PB environment. But first, try to g...

Calling 16 bit DLL from 32 bit PB app
Is it possible to call a 16 bit C DLL from a 32 bit PB application? If so, what is the correct calling convention in C. I am using PB 6.5.1 Thanks, Brian Wetzel wetzelb@mindless.com On Tue, 18 Apr 2000 17:24:23 -0500, "Brian Wetzel" <wetzelb@mindless.com> wrote: I seem to recall there used to be a white paper on the Sybase Web site describing how to access 16 bit ODBC from 32 bit PB. That makes me thing that it is possible, but I don't remember the specifics. You might want to check out the Sybase site and see if you can find anything. I'll check...

How to call a 16-bit app from a 32-bit powerb app? (WinNT,Win2k,WinXP)
Hi, In our powerbuilderapplication we call a little third-party16-bit dos application. The strange thing is that the third-party application runs if we start it manually, but it won't run if we start it from our pbapp!! Then we get the following fault... ntvdm-288 ..... 16-bits ms_dos subsystem ntvdm-288.248.2f0001 %systemroot%\system32\config.nt. The systemfile is not suited for ms-dos or ms-windows applications. Choose close or ..... The file is called from our powerbuilderapp with createprocess(.........) Thanks, ICE Try RUN( ) instead. /ck "ICE"...

16 bits CCmail and 32 bits Powerbuilder app
Does any one know how to create and send email to 16bits ccmail 2.2 from 32 bits powerbuilder application ? Thanks in advance Check out my site : http://members.xoom.com/sanskrut It may help you!! All the best in advance!! Nirav. Zakia Pirzada wrote: > Does any one know how to create and send email to 16bits ccmail 2.2 from > 32 bits powerbuilder application ? > > Thanks in advance ...

16 bit and 32 bit api calls from PB app.
Hi, i have an application that i want to run on both windows 3.1 and windows 95 pc's. however, i am making some api calls in this application. i would like to make 16 bit api calls if the pc is running 3.1 and 32 bit calls if it is 95. is there any way i can find out what operating system the pc has, as soon as my app is started up? any help will be greatly appreciated. thanks, Rohit Look at the environment object. This is what you need. Regards, Costas Tsaklas[TeamPS] Elevated Technologies, Inc. - New York www.elevatedtech.com Rohit Sankholkar wrote in message ...

Run 32-bit app from 16-bit app
We want to run Excel 97 (32-bit) from a PB app (16-bit PB5.0.2). We cannot get Excel 97 to run from a 16-bit PB app with the "Run(Excel.exe)" function. How can we get it to work? Is it any work-around, outside software or middle ware to enable us to do this? TIA, Soo ...

16-bit PB calling a 16-bit DLL?
I am trying to build a "bridge" between a PB program (originally a 32-bit .exe) and a 32-bit DLL (I can't change this to 16-bit); both work flawlessly when run as 32-bit under Windows 95. Now... when I try to convert the PB app to 16-bit, and call my bridge pgm (a 16-bit .dll compiled with the Watcom C/C++ compiler v 10.?), I get a message "error calling external function..." when I try to access the function (the .dll loads fine). I have checked the spelling; I think the prototypes are correct, I have looked for samples (to no avail), etc. Does anyone kno...

Run 32 bit app from 16 bit app
We want to run Excel 97 (32-bit) from a PB app (16-bit PB5.0.2). We cannot get Excel 97 to run from a 16-bit PB app with the "Run(Excel.exe)" function. How can we get it to work? Is it any work-around, outside software or middle ware to enable us to do this? TIA, Soo You can try using an excel OLE control and calling the ole_control.Activate(OFFSITE!) command to activate excel. Be careful though I have had difficulty using a 16-bit pb app making ole calls on a 23-bit OS like Win95 - it seems to cause big gpf's. Soo Lam wrote: > We want to run Excel 97 (...

Creating a "thunk" between a 16-bit DLL and 32-bit PB6 app
Here's my problem: I have a 16-bit DLL which is currently being used by an old PB 4.0 application that will eventually be upgraded to PB 6.0. (This DLL is a simplified interface DLL over the 16-bit winsock.dll for TCP/IP communication with a DEC/VAX server program.) Of course, this system was developed before my time and the source code for the DLL is nowhere to be found. I do have the function prototypes from the global external function declarations in the PB 4 app. I am developing a separate PB 6.0 application that will require the same communication conduit to the same s...

32 bit calling 16 bit
Hi! We're trying to upgrade an app from PB5.02 - 16 bit to 6.5. The trouble is that we call a lot of third-party 16 bit DLL's. Both our interface and the third party part does database calls (MS SQL Server 6.5 SP5). Can anyone shed some light on how we'd do this? (One friend mentioned we needed a "thunk" layer. Another didn't think you could "thunk" PB. I don't know enough about "thunk" to know what to think...). Thanks! Dennis Dennis, >We're trying to upgrade an app from PB5.02 - 16 bit to 6.5. The trouble is &...

Call 64bit dll's function from 32 bit delphi code on 64 bit OS
Is there any way or trick to call a function in 64 bit DLL from Delphi code? Any hardware manufacturer must compile their device drivers into 64bit code for 64 bit OS. So for example, graphic driver from NVidia is compiled to 64bit code for 64bit OS. Question is how to load 64 bit dll from 32 bit delphi code and call such function? I hope somebody has already dealing with that. Thanks > is how to load 64 bit dll from 32 bit delphi code and call such function? http://msdn.microsoft.com/en-us/library/aa384249(VS.85).aspx http://blogs.msdn.com/oldnewthing/archive/2008/10/20/9...

Changing 16 bit API calls to 32 bit API calls.
Hi. I have an application which i am migrating from 16 Bit PB4 to 32 bit PB5. I have the following 16 bit API calls in the application. Can someone please let me what the corresponding 32 bit API calls would be and what libraries i can find them in? Also, where can i find information on API calls? function int FindWindow(string lpClassName, string lpWindowName)LIBRARY "user.exe" function int Winhelp(int iWindowHandle, string lpszhelpfile, uint fuCommand, long dwData) Library "user.exe" function ULONG MAPISendDocuments(uLong ulUIParm, string lpszDelimChar, string ...

32 bit PowerBuilder and 16 bit executables
Hi, Well, I am glad to know that I'm not the only one having 32bit vs 16bit problems. We have a rather small app (6 pbls / an average of 4 objects per pbl). We are compiling this app as a 16 executable using PB5 32bit. The compile is good (I guess) but when I start the app I get an external reference error when the app tries to use a non visual residing in one of the DLLs. Now I have done all of the things that any good PB developer would do (specify all PBLs as PBDs, make sure all the DLLs are in the same directory as the EXE, make sure the EXE has a different name as the DL...

16 bit App running in 32 bit environment
Hi guys, We have a complaint from a user that our 16 bit PowerBuilder executable is running 'significantly faster' on his colleagues 16 bit Windows for Workgroups client than it is on his 32 bit NT client. We develop in a combination of WFW3.11 and Windows 95 16/32 bit environments and have never encountered this sort of performance issue and don't have the resources (at this time) to do any detailed study into it. Is there anything obvious that could be causing this ? Is there something technical I can tell the user to explain the performance hit? We will be supply...

Web resources about - Calling 16-bit functions (DLL) from 32-bit App? - sybase.powerbuilder.general

Talk:Trigonometric functions - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Mathematics , a collaborative effort to improve the coverage of Mathematics on Wikipedia. If ...

Fatally weak MD5 function torpedoes crypto protections in HTTPS and IPSEC
... US Navy ) If you thought MD5 was banished from HTTPS encryption, you'd be wrong. It turns out the fatally weak cryptographic hash function, ...

Learning F# – Passing Parameters to Functions
One of the first issues I faced when learning F# was finding out how to specify multiple parameters to a function. While this might sound obvious ...

HPE Offers Catalog of Virtual Network Functions for Telcos
The vendor's OpenNFV Solution Portal gives carriers a single place to find a range of VNFs that are pre-tested to run on their networks.

7 Useful Technical SEO Functions For Your E-commerce Website
This article was co-authored by Mate Dyekiss, SEO Strategist at IMI. An e-commerce website can create all the technical SEO issues onecan imagine: ...

Using AWS Lambda functions to create print ready files
... going to tell you about our processing architecture as well as at a recent performance improvement with the integration of AWS Lambda functions. ...

Madras HC asks police to allow Tipu’s birth anniversary function
... Station on a petition filed by Ismail, General Secretary of Thamizhaga Makkal Jananayaga Katchi, seeking grant of permission to hold the function. ...

Colorado governor: This Planned Parenthood shooting may be a function of inflammatory rhetoric from bloggers ...
Via Grabien , skip to 4:45 of the clip below for the key bit. I naively thought we were (mostly) done with “climate of hate” stupidity after ...

Surprise: Binge-Watching TV May Cause a Decline in Brain Function
With the second season of Transparent only a few days away, some bad news awaits us: According to a recent study and common sense, probably, ...

1964 Archival Footage of British Soldiers Under the Effects of LSD Losing the Ability to Properly Function ...
1964 archival footage of British soldiers being given LSD-25 while training the the field. Over time they lost their ability to properly function, ...

Resources last updated: 1/10/2016 4:10:52 PM