View previous topic :: View next topic |
Author |
Message |
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Tue May 31, 2005 2:09 pm Post subject: |
|
|
That function prototype is correct, following the VB equivalent that you provided.
You would then set the DLL path C:\WINDOWS\SYSTEM32\Cards.Dll in input data port 0 of the DFF Func Call component. You would also specify the name of the function, which appears to be "cdtInit" in input data port 1.
Note that you have to specify the return type of long in the component's "Function return type" property.
If you are doing this and it is not working, can you provide more details? Is there any error message that appears?
Also, are you able to call this DLL function from VB or elsewhere? |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Mon Jun 06, 2005 11:18 am Post subject: |
|
|
Apparently, the correct prototype is:
BOOL WINAPI cdtInit (int *width, int *height)
When tested with this prototype it seems to go through and return valid values, however, it still seems to be flagged as an exception being caught.
We are investigating this and will report back. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Tue Jun 07, 2005 1:21 pm Post subject: |
|
|
Yes, long_ptr is not the correct argument type to send. It should be int_ptr. When we look at this DLL function, we see that the function call actually goes through and returns the correct values. It also returns a success code through the return value output data port (value of 1, which is a true boolean value). So everything seems to work, however, upon returning from the DLL function call cdtInit then raises the following exception:
Object reference not set to an instance of an object.
We are trying to find out why this happens. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Fri Jun 10, 2005 4:50 pm Post subject: |
|
|
A change to handle this exception has been added, which will be included in either the next update or the next major release.
Thanks for reporting this. |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Tue Jul 19, 2005 9:55 pm Post subject: |
|
|
This should be addressed by update 1.1.9 |
|
Back to top |
|
|
|