UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Wininet.dll Missing On Server 2016, Access 2016    
 
   
MrSiezen
post Feb 16 2017, 10:15 AM
Post#1



Posts: 2,366
Joined: 15-February 05
From: Den Bosch - Netherlands


Hi,

I have a FTP module which uses some declarations like:

' Declare wininet.dll API Functions
Public Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA"

But when I open this db on a Server 2016 machine with 2016 runtime, it causes runtime errors for all code.
I'm sorry, I cannot give more exact error descriptions as Runtime doesn't give me more either.

But if quote out all these declarations, all other code in other modules works fine.

Is wininet.dll no longer supported, or can I copy this DLL file from my windows 7 machine to the server to fix it?

--------------------
UA Rulez!
Go to the top of the page
 
MrSiezen
post Feb 22 2017, 05:58 AM
Post#2



Posts: 2,366
Joined: 15-February 05
From: Den Bosch - Netherlands


I think I need to add info:

The current version of Office I'm using is 32 bit.
The new server is 64 bit...

I think it has something to do with this?

--------------------
UA Rulez!
Go to the top of the page
 
MrSiezen
post Feb 22 2017, 07:34 AM
Post#3



Posts: 2,366
Joined: 15-February 05
From: Den Bosch - Netherlands


I got it:

You need to change the way you declare for 64-bit. Like below you can program simulatniously for both 32bit as 64bit:

CODE
#If VBA7 And Win64 Then
    Public Declare PtrSafe Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hFtpSession As LongPtr, ByVal lpszDirectory As String) As Boolean
#Else
    Public Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hFtpSession As Long, ByVal lpszDirectory As String) As Boolean
#End If


Note the added PtrSafe and LongPtr instead of Long in the 64 bit version.
This post has been edited by MrSiezen: Feb 22 2017, 07:34 AM

--------------------
UA Rulez!
Go to the top of the page
 
Cdex
post Apr 17 2017, 06:55 PM
Post#4



Posts: 44
Joined: 29-December 13



Hello,
I'm having similar issues with Access on Server 2016 Datacenter. Before being allowed to install 32-bit Access 2016 Runtime, I had to "Remove all 64-bit Microsoft Office products..." Did that, then re ran Access Runtime 2016 again. The DB opens fine, can navigate forms nicely, but when trying to edit data on forms, the fields appear locked. Also getting lots of runtime errors. Where did you place the code you posted above? (Figured I'd give it a try.)
Go to the top of the page
 
Cdex
post Apr 25 2017, 07:40 PM
Post#5



Posts: 44
Joined: 29-December 13



Gave it a try from the admin profile and everything worked fine. Even though my "user" profile was part of the admins group, I still needed to add full control to my permissions for the folder the DBs are in.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    21st October 2017 - 05:30 AM