From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I interface LabVIEW to the gdiplus.dll

Example Function in the gdiplus.dll is
 
Private Declare Function GdipLoadImageFromFile Lib "gdiplus.dll" (ByVal FileName As Long, GpImage As Long) As Long
It is not clear to me how use this.  In a vb example the FileName is forced to a pointer by StrPtr(FileName).
 
This seems to be my problem, I have tried the adapt - value and pointer.  I get an error.
0 Kudos
Message 1 of 5
(2,724 Views)
Use Image Toolbox instead:
 
 
Image Toolbox is base on gdiplus.
George Zou
0 Kudos
Message 2 of 5
(2,708 Views)
Gmiles,
      Since the function declaration uses "As Long" as the datatype, try using numeric datatypes in LabVIEW.  When you run the Visual Basic example, what value is the actual number value that it is passing the .dll?  Also, since the FileName is forced to a pointer in Visual Basic, try the string datatype in LabVIEW with the C string pointer format first, and then the other formats.  Are you using the Standard (WINAPI) calling conventions?  If none of these different options help, please let us know what error code you are getting.
0 Kudos
Message 3 of 5
(2,693 Views)
Thanks, but I did both of them and still get a error.
 
0 Kudos
Message 4 of 5
(2,687 Views)
Gmiles,
      What error code are you getting?

Thanks,

Nathan
0 Kudos
Message 5 of 5
(2,680 Views)