Help needed with 16bit to 32bit API calls migration (using VB 4.0) 
Author Message
 Help needed with 16bit to 32bit API calls migration (using VB 4.0)

Hi there,

I already posted the following message, but haven't been able to connect to
the news server since then because of technical difficulties.   Since my
message, and any possible reply does not seem to existe anymore, I am
posting this again since I haven't solved my problem yet.

have written a program using the 16 bit version of VB 4.0.  I want to
compile it under the 32 bit.  I thought I would only need to change the DLL
name (i.e. GDI32 instead of GDI etc.) and possibly some parameter type from
integers to longs, but I keep getting messages telling me that the function
cannot be found.  What am I missing?

Thanks for you help,

--
                                 +-+
+--------------------------------------------------------------------+

|(J.A.I.S.V.O.P.M.M.U.G.S.M.F.) | http://www.*-*-*.com/ ~db405/ |

+--------------------------------------------------------------------+
                                 | |
                                 \ /



Wed, 01 May 2002 03:00:00 GMT  
 Help needed with 16bit to 32bit API calls migration (using VB 4.0)

Quote:
>Hi there,

>I already posted the following message, but haven't been able to connect to
>the news server since then because of technical difficulties.   Since my
>message, and any possible reply does not seem to existe anymore, I am
>posting this again since I haven't solved my problem yet.

>have written a program using the 16 bit version of VB 4.0.  I want to
>compile it under the 32 bit.  I thought I would only need to change the DLL
>name (i.e. GDI32 instead of GDI etc.) and possibly some parameter type from
>integers to longs, but I keep getting messages telling me that the function
>cannot be found.  What am I missing?

In many cases, what you tried should work, but not all 16-bit APIs have 32-bit
counterparts.  Maybe if you post the code that doesn't work someone can figure
out what's wrong.

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner



Wed, 01 May 2002 03:00:00 GMT  
 Help needed with 16bit to 32bit API calls migration (using VB 4.0)

Quote:

>have written a program using the 16 bit version of VB 4.0.  I want to
>compile it under the 32 bit.  I thought I would only need to change the DLL
>name (i.e. GDI32 instead of GDI etc.) and possibly some parameter type from
>integers to longs, but I keep getting messages telling me that the function
>cannot be found.  What am I missing?

If it is a string-related function, you may have to append and "A".
Usually, people use an alias with that name. Check it by looking it up
in the WIN32API.TXT file, if you muist.

And second, all integer related numeric parameters must be converted to
"long". But you probably knew that.

--
        Bart.



Wed, 01 May 2002 03:00:00 GMT  
 Help needed with 16bit to 32bit API calls migration (using VB 4.0)
I am a rank newbie, haven't even finished my first vb project, but the
following may or may not address your problem:

This is from an extract from msvb 6.0 developer';s workshop
"One of the main reasons byte arrays were created was to allow the
passsing binary buffers to and from the 32bit api functions. one of
the differences to be aware of between 16bit and 32bit vb applications
is that 32bit version strings are assumed to contain unicode
characters, which require 2 bytes for each character. The system
automatically converts 2 byte unicode sequienceses to 1 byte ansi
characters, but if the string contains binary data the contents can
become unintelligible.  to prevent problems, you should get into the
habit of passing only character data in strings and passing binary
data in byte arrays."
There's a bunch more stuff about passsing unsigned integers. I hope
this steers you in the right direction at least. I'm a newbie and
don't even understand how to use these api calls -- but i'm learning.
Art


Quote:

>Hi there,

>I already posted the following message, but haven't been able to connect to
>the news server since then because of technical difficulties.   Since my
>message, and any possible reply does not seem to existe anymore, I am
>posting this again since I haven't solved my problem yet.

>have written a program using the 16 bit version of VB 4.0.  I want to
>compile it under the 32 bit.  I thought I would only need to change the DLL
>name (i.e. GDI32 instead of GDI etc.) and possibly some parameter type from
>integers to longs, but I keep getting messages telling me that the function
>cannot be found.  What am I missing?

>Thanks for you help,



Sat, 04 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Call 16bit ODBC API from VB5 32bit

2. Need sample of Thunk code to call 16bit from 32bit Comm functions

3. : VC++ (16bit) client with VB 4.0 Enterprise (32bit) OLE server

4. vb 4.0 16bit to vb 6.0 help needed

5. vb 4.0 16bit to vb 6.0 help needed

6. Calling 16bit functions from 32bit VB

7. Q: 16bit API -> 32bit API

8. Accessing 32bit Access from a 16bit VB app using ODBC

9. Using the SendMesage API call in VB 4.0

10. Using VB resources in VB 4.0 (32bit)...

11. Help - Common code for 16bit and 32bit VB Application

12. Help - Common code for 16bit and 32bit VB Application

 

 
Powered by phpBB® Forum Software