Hi,
Following on from an earlier problem where one of our customers could not get our Image to PDF DLL to work with Macro Scheduler - at first glance the problem seems to be solved.
However, we decided to be thorough and have downloaded the evaluation version of Macro Scheduler and think that there may be an issue with the way that our DLL is being called.
With a simple test we are not sure that return values are indeed being returned correctly, and some of our DLL calls actually seem to return an "Unable to Load DLL" followed by a popup error box from Macro Scheduler which states "Access violation at address 0012E286. Read of address 00123250".
Here is the script we were using, the I2PDF_License call appears to succeed but the I2PDF_Echo call causes the above reported error, the I2PDF_GetDLLVersion call also fails with a similar error. If the I2PDF_Echo call is commented out and I step through then I get the error "Privileged Instruction":
Let>lib=C:\Image2PDF StdCall.dll
LibLoad>lib,hDll
LibFunc>hDll,I2PDF_License,lResult,YOUR LICENSE CODE HERE
if>lResult0
MessageModal>I2PDF_License Error: %lResult%
endif
LibFunc>hDll,I2PDF_Echo,lValue,123
MessageModal>Echo value is %lValue%
LibFunc>hDll,I2PDF_GetDLLVersion,lVersion
MessageModal>DLL version is %lVersion%
LibFree>hDll
FYI the two functions above are declared as follows (note I specially wrote the I2PDF_Echo function in order to check that there was not an issue with not having any parameters):
extern UINT __stdcall I2PDF_GetDLLVersion(void)
{
return iVersion;
}
extern UINT __stdcall I2PDF_Echo(UINT iValue)
{
return iValue;
}
Any help gratefully received,
Adrian Nelson (Utility Warrior)
Image to PDF DLL calling issue?
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 2
- Joined: Wed Apr 12, 2006 9:42 pm
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Not sure what the problem is here but could you email a copy of your DLL to [email protected] so that we can try this out.
Unable to load dll error is only raised if the dll can not be found or the function name is not found in the dll. if libload has worked then it can only be that it does not like the function name.
Unable to load dll error is only raised if the dll can not be found or the function name is not found in the dll. if libload has worked then it can only be that it does not like the function name.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 2
- Joined: Wed Apr 12, 2006 9:42 pm
- Contact:
Image to PDF DLL emailed
Hi Marcus,
Have emailed the latest __stdcall version of the DLL (with the additional I2PDF_Echo function for testing purposes) and a copy of the manual (should you find it useful)
Best regards,
Adrian Nelson
Have emailed the latest __stdcall version of the DLL (with the additional I2PDF_Echo function for testing purposes) and a copy of the manual (should you find it useful)
Best regards,
Adrian Nelson