DLL 32 vs 16 bit in VB4 
Author Message
 DLL 32 vs 16 bit in VB4

Quote:

>Please let me know if any of my assumptions are wrong:

>-I cannot run a 32-bit dll from a 16-bit VB4 program
>-I cannot run a 16-bit dll from a 32-bit VB4 program

Looks right.

Quote:
>I have a 16-bit program that I need to convert to 32-bit.  Simple.  I just run
>the VB4-32-bit version, replace my dll with the 32-bit version and open my
>project.  But it doesn't work.  Says it can't load dll (run-time error 48 -
>error in loading dll).  What is the problem?

You cannot use a 16-bit DLL from within a 32-bit program. It's that
easy.

Either get a 32-bit version of that DLL, don't upgrade the program to
32-bit (I have my doubts that "upgrade" even is the correct
terminology... ;-), or use thunking.

You could create an OLE server in VB/16 that calls the DLL, and get your
requests through this external applet , from within your VB/32 program.
There are some docs available somewhere on Internet describing the
how... but I forgot where. I've not done this, so far, myself.

   HTH,
   Bart.



Tue, 25 Sep 2001 03:00:00 GMT  
 DLL 32 vs 16 bit in VB4
Well almost correct. You can call a 32 bit DLL from a 16 Bit by explicitly loading
the DLL before calling it. Look into LoadLibrary, GetProcAddress and FreeLibrary API
calls.
Quote:

>>-I cannot run a 32-bit dll from a 16-bit VB4 program
>>-I cannot run a 16-bit dll from a 32-bit VB4 program
>Your assumptions are correct.

>Tim



Thu, 27 Sep 2001 03:00:00 GMT  
 DLL 32 vs 16 bit in VB4
Quote:
>-I cannot run a 32-bit dll from a 16-bit VB4 program
>-I cannot run a 16-bit dll from a 32-bit VB4 program

Your assumptions are correct.

Tim



Fri, 28 Sep 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB4 16-bit vs 32-bit

2. VB4 16-bit vs 32-bit

3. Can VB4.0 32 Bit call a 16 bit DLL

4. 16 bit .dll's and 32 bit VB4

5. Russian(Cyrillic): vb4 32-bit works, but vb4 16-bit doesn't

6. 16 bit dll and 32 bit dll

7. 16 vs 32 bit OCX, DLL

8. Migrating 16-bit ODBC DLL (SQLServer) to 32-bit ODBC DLL (MS Access)

9. VB 16 bit vs 32 bit on NT machine

10. VB 4.0: 16 bit vs 32 bit

11. 16 bit vs 32 bit

12. Check for 32-bit vs. 16-bit OS

 

 
Powered by phpBB® Forum Software