API(OleCreatePictureIndirect)を64bitのExcelで動確していてハマったのでおしらせ。
DLLがみつからないエラーになったので海外サイトなど覗いてみると
なんかDLLが変更になったようでした。
“olepro32” → “oleaut32”
宣言を置いておきますね。
Private Type PicBmp Size As Long Type As Long hBmp As LongPtr hPal As LongPtr Reserved As Long End Type Private Type GUID Data1 As Long Data2 As Integer Data3 As Integer Data4(7) As Byte End Type Private Declare PtrSafe Function OleCreatePictureIndirect Lib "oleaut32" (PicDesc As PicBmp, _ RefIID As GUID, _ ByVal fPictureOwnsHandle As LongPtr, _ IPic As IPicture) As Long