Converting a small bit of code from 32 to 64 (1 Viewer)

aaronb50

Registered User.
Local time
Today, 06:17
Joined
Mar 2, 2014
Messages
185
Hi..........

I added in some email functionality to one of my program which now will not work for the one user who happens to have a 64 bit version of Access. I know what bit of code is causing the error and I was wondering if anyone new what I need to change in it so that it will work for 64 bit.

I tried the obvious first guess, changing the shell32.dll to shell64.dll but that did not work.

Code:
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long

Also, I know its declaring a function but I hate to admit it, I'm not really sure what all of this is doing. So if someone happens to know what's going on I'd love to learn.
 

aaronb50

Registered User.
Local time
Today, 06:17
Joined
Mar 2, 2014
Messages
185
Thank you ridders!!!!
 

Solo712

Registered User.
Local time
Today, 09:17
Joined
Oct 19, 2012
Messages
828
Hi..........

I added in some email functionality to one of my program which now will not work for the one user who happens to have a 64 bit version of Access. I know what bit of code is causing the error and I was wondering if anyone new what I need to change in it so that it will work for 64 bit.

I tried the obvious first guess, changing the shell32.dll to shell64.dll but that did not work.

Code:
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long

Also, I know its declaring a function but I hate to admit it, I'm not really sure what all of this is doing. So if someone happens to know what's going on I'd love to learn.

There is a very good overview here of converting 32-bit Access WIN API routines to 64-bit. Take a look at it.

Best,
Jiri
 

isladogs

MVP / VIP
Local time
Today, 14:17
Joined
Jan 14, 2017
Messages
18,209
Hi Jiri

Did you realise you posted exactly the same link as I had already?
It is very good though... :D
 

Solo712

Registered User.
Local time
Today, 09:17
Joined
Oct 19, 2012
Messages
828
Hi Jiri

Did you realise you posted exactly the same link as I had already?
It is very good though... :D

No, I didn't go to the reference you provided in the other post. My Bad! :rolleyes:

Best,
Jiri
 

Users who are viewing this thread

Top Bottom