Results 1 to 3 of 3
  1. #1
    Silvera is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    May 2013
    Location
    California
    Posts
    65

    Coding for 64 and 32 bit "if statements"

    Yesterday I got this response from ranman256 which enabled me to fix Private declaration code.

    #If Win64 Then
    Private Declare PtrSafe Function GetTempPath Lib "Kernel32" Alias "GetTempPathA"
    #Else
    Private Declare Function GetTempPath Lib "Kernel32" Alias "GetTempPathA"
    #End If



    That worked but after correcting that code another set of code crashed. This time "PtrSafe" was the stopping point. I'm guessing since was not a "Private" declaration another term is needed.

    #If Win64 Then
    Declare PrtSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll" _
    Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
    #Else
    Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" _
    Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
    #End If

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I don't think it matters if the function is private or public in order for PrtSafe to work.

    Where is your function and where are you calling it from? How you have it, that function is private.

  3. #3
    Silvera is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    May 2013
    Location
    California
    Posts
    65
    Quote Originally Posted by ItsMe View Post
    I don't think it matters if the function is private or public in order for PrtSafe to work.

    Where is your function and where are you calling it from? How you have it, that function is private.
    I'm not at my computer and will research it. Thanks for your response I'll definitely replay back.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 09-08-2014, 06:07 PM
  2. Replies: 1
    Last Post: 09-03-2014, 03:27 AM
  3. Replies: 8
    Last Post: 07-15-2014, 05:56 PM
  4. Coding an "update" button
    By Nick F in forum Programming
    Replies: 6
    Last Post: 11-16-2012, 09:38 AM
  5. Replies: 11
    Last Post: 03-29-2012, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums