The following is a need to rewrite the method, if imgPath travels is picture url, change the method how to write?
Public Function RTS_UpdateImageData_m (ByVal imgPath As String) As Long Dim the updatedata () As Byte Dim writelen As Long 'Dim imgPath As String 'imgPath="c: \ \ 01. JPG" Dim the Mst As ADODB. Stream '-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Set the Mst=New ADODB. Stream The Mst. Type=adTypeBinary 'binary Type The Mst. Open The Mst. LoadFromFile imgPath 'loading pictures, pictures imgPath as path '-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- The updatedata=https://bbs.csdn.net/topics/Mst.Read 'read the file flow Writelen=UBound (the updatedata) - LBound (the updatedata) + 1 'for the length of the array RTS_UpdateImageData_m=RTS_UpdateImageData (VarPtr (the updatedata (0)), writelen) End the Function
CodePudding user response:
CodePudding user response:
A little change is ok? -- -- -- -- -- - I don't know if we can directly use the Internet address, not so used, Join cannot directly use the Internet address:
Add a judgment of imgPath, if is the network address is downloaded using urldownloadtofile function to the local, and then reference the local address,