0
我在Access 2013中使用下面的代碼(從網站獲得它)。它的工作沒有任何問題。64位模式下的StrPtr類型不匹配
Private Declare Function GdipCreateBitmapFromFile Lib "gdiplus.dll" (ByVal FileName As Long, bitmap As Long) As Long
If GdipCreateBitmapFromFile(StrPtr(sFileName), hPic) = 0 Then ....
在刪除用於Access 2013 64位運行時安裝的32位組件後,出現編譯器錯誤。聲明後添加PtrSafe,編譯器將會正常。
Private Declare PtrSafe Function GdipCreateBitmapFromFile Lib "gdiplus.dll" (ByVal FileName As Long, bitmap As Long) As Long
If GdipCreateBitmapFromFile(StrPtr(sFileName), hPic) = 0 Then ....
但是,它在StrPtr中會有運行時錯誤類型不匹配。不知道如何解決它。