- Code: Select all
Object oTest is a Button
Set Label to "Test VPE"
Set Location to 265 20
Set Size to 15 30
Procedure OnClick
Integer iRetVal
DWord hDoc
Move (VpeOpenDoc(0,'Preview',0)) to hDoc
Move (VpeWrite(hDoc,50,50,150,150,'Hello World')) to iRetVal
Move (VpePreviewDoc(hDoc,0,VPE_SHOW_MAXIMIZED)) to iRetVal
End_Procedure
End_Object
When using the .dll for 3.1, this works with no problem. When I switch to 7.0 the program crashes when it executes the call to VpeWrite. If I comment that line out, 7.0 will create the document, and bring up a blank page to preview, as expected.
I tried this with 4.0 as well, and it crashes at the same place.
Is there something else I need to do when using a newer version than 3.1?