Problems converting from 16 bit to 32 bit 
Author Message
 Problems converting from 16 bit to 32 bit

I am converting a 16 bit (VB4) project to 32 bit. The project as such
runs, but it uses an external DLL which also has been converted from 16 to
32 bit. The first call to this DLL gives "Specified DLL function not
found". The DLL is found and loaded. Do I have to change the function
declarations for the DLL in any way? Today they look like:

Declare Function PFStart Lib "Lisalib.dll" (StartRec As Startdata) As
Integer

--
----------------------------
Frank Johannessen
GG Data AS, Norway



Sun, 20 Dec 1998 03:00:00 GMT  
 Problems converting from 16 bit to 32 bit

Quote:

> I am converting a 16 bit (VB4) project to 32 bit. The project as such
> runs, but it uses an external DLL which also has been converted from 16 to
> 32 bit. The first call to this DLL gives "Specified DLL function not
> found". The DLL is found and loaded. Do I have to change the function
> declarations for the DLL in any way? Today they look like:

> Declare Function PFStart Lib "Lisalib.dll" (StartRec As Startdata) As
> Integer

Sounds like you need to talk to the folks that converted the DLL from 16
to 32 bit; you're telling us that you can find and load the DLL itself,
but they may have gotten cute during the DLL conversion and fiddled with
the function name. Whoever converted the DLL from 16 to 32 bit can confirm
your calling syntax (or tell you how it has changed in the 32-bit version.)

--
===========================================================================
Philippe D. Nave, Jr. | We're sorry - all our .sigs are busy right now.
Denver, Colorado USA  | Please re-read this message, and the next available



Sun, 20 Dec 1998 03:00:00 GMT  
 Problems converting from 16 bit to 32 bit


Quote:

>I am converting a 16 bit (VB4) project to 32 bit. The project as such
>runs, but it uses an external DLL which also has been converted from 16 to
>32 bit. The first call to this DLL gives "Specified DLL function not
>found". The DLL is found and loaded. Do I have to change the function
>declarations for the DLL in any way? Today they look like:
>Declare Function PFStart Lib "Lisalib.dll" (StartRec As Startdata) As
>Integer

More important, what is the DLL declaration?
If you're using VC++, declare the C++ function this way:

extern "C" __stdcall int PFStart(Startdata *StartRec) { ... }

and then export it with a DEF file.

If you're not able to change the DLL, then you need to find out the
"exported" name of the function.  To avoid changing a lot of code use the
Alias clause:

Declare Function PFStart Lib "Lisalib.dll" Alias "<realname>" (StartRec As
Startdata) As Long

--
Henry S. Takeuchi

Seattle, Washington (USA)



Fri, 25 Dec 1998 03:00:00 GMT  
 Problems converting from 16 bit to 32 bit


Quote:


>>32 bit. The first call to this DLL gives "Specified DLL function not
>>found". The DLL is found and loaded. Do I have to change the function
>>declarations for the DLL in any way? Today they look like:
>More important, what is the DLL declaration?
>If you're using VC++, declare the C++ function this way:

>extern "C" __stdcall int PFStart(Startdata *StartRec) { ... }

>and then export it with a DEF file.

>If you're not able to change the DLL, then you need to find out the
>"exported" name of the function.  To avoid changing a lot of code use the
>Alias clause:

Also, I think dll function names are case sensitive for 32 bit where they are
not for 16 bit. Another reason you may have to use an alias.


Sat, 26 Dec 1998 03:00:00 GMT  
 Problems converting from 16 bit to 32 bit



Quote:

>>If you're not able to change the DLL, then you need to find out the
>>"exported" name of the function.  To avoid changing a lot of code use the
>>Alias clause:
>Also, I think dll function names are case sensitive for 32 bit where they are
>not for 16 bit. Another reason you may have to use an alias.

Although 32-bit DLL function names are case sensitive, in the absence of a
Lib clause, VB4-32 uses the exact name as written in the Declare.

Another reason for needing Alias is the use of characters not valid in VB
names.

--
Henry S. Takeuchi

Seattle, Washington (USA)



Mon, 28 Dec 1998 03:00:00 GMT  
 Problems converting from 16 bit to 32 bit



Quote:

>>If you're not able to change the DLL, then you need to find out the
>>"exported" name of the function.  To avoid changing a lot of code use the
>>Alias clause:
>Also, I think dll function names are case sensitive for 32 bit where they are
>not for 16 bit. Another reason you may have to use an alias.

Although 32-bit DLL function names are case sensitive, in the absence of a
Alias clause, VB4-32 uses the exact name as written in the Declare.

Another reason for needing Alias is the use of characters not valid in VB
names.

--
Henry S. Takeuchi

Seattle, Washington (USA)



Tue, 29 Dec 1998 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Desperate for help Converting 16 bit app to 32 bit

2. Convert 16-bit vbp to 32-bit?

3. Converting 16 bit to 32 bit

4. Convert 32-BIT MDB Database to 16-bit database

5. Converting Reports from 16-bit to 32-bit??

6. converting 16-bit VB4/Access2 to 32-bit

7. Converting a VB4.0 16 Bit app to VB5 32 bit

8. URGENT! Convert 32-bit to 16-bit

9. Converting 16 bit to 32 bit VB 4.0 Pro

10. 8-bit, 16-bit & 32-bit Colour

11. HELP: VB4-16 bit to VB5-32 bit problem

 

 
Powered by phpBB® Forum Software