VB4.0 32/16 APIs call.... HELP 
Author Message
 VB4.0 32/16 APIs call.... HELP

I have developed an application using VB4.0/16 under  Win95 that reads and
writes to an INI file.  The application run wells on my system and also
under Win3.1 systems, but I have tried to run it under a different Win95
system and I get an error: could not load a DLL.  The point of failure is
when I try to call the GetPrivateProfileString API.

I do not quite understand the differences in DLLs... Could some one
possible expalin it to me.

Bob



Sun, 04 Jul 1999 03:00:00 GMT  
 VB4.0 32/16 APIs call.... HELP

' 32 Bit API Declarations for reading & writing INI files
 Declare Function GetPrivateProfileString Lib "Kernel32" Alias >>>>I have
developed an application using VB4.0/16 under  Win95 that reads and
writes to an INI file.  The application run wells on my system and also
under Win3.1 systems, but I have tried to run it under a different Win95
system and I get an error: could not load a DLL.  The point of failure is
when I try to call the GetPrivateProfileString API. <<<<<

"GetPrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName
As Any, ByVal lpDefault As String, ByVal lpRetunedString As String, ByVal
nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "Kernel32" Alias
"WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal
lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName As String) As
Long

There is a 32 bit version on AOL's download library which I could send to
you if you are interested. Above is the call to the DLL.



Mon, 05 Jul 1999 03:00:00 GMT  
 VB4.0 32/16 APIs call.... HELP



Quote:
>I have developed an application using VB4.0/16 under  Win95 that reads and
>writes to an INI file.  The application run wells on my system and also
>under Win3.1 systems, but I have tried to run it under a different Win95
>system and I get an error: could not load a DLL.  The point of failure is
>when I try to call the GetPrivateProfileString API.

>I do not quite understand the differences in DLLs... Could some one
>possible expalin it to me.

>Bob

Here are the two API calls (the first for 16-bit then second for
32-bit) .. with the VB types already in the declare statement .. hope
this helps...

Declare Function GetPrivateProfileString Lib "Kernel" (ByVal
lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault
As String, ByVal lpReturnedString As String, ByVal nSize As Integer,
ByVal lpFileName As String) As Integer

Declare Function GetPrivateProfileString Lib "kernel32" Alias
"GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal
lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As
String, ByVal nSize As Long, ByVal lpFileName As String) As Long



Wed, 07 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

2. VB4:16/32 DLL calling questins ?

3. 32 bit equivalent of 16 bit API call GetModuleUsage

4. API calls from ActiveX - must I make both 16 and 32 bit versions?l

5. How to test for 16 vs 32-bit API calls

6. 16 bit API calls in VB 3 supported in 32 bit VB 4.0

7. 16-bit/32-bit API calls

8. 16 to 32 Api calls

9. API Calls for 16 and 32 Bit

10. API Funktion "Escape"unter VB4 16 / 32

11. Please help with CreateProcess API call (VB4-32)

12. HELP: VB4.0/16 API calls and Null Pointers

 

 
Powered by phpBB® Forum Software