11-02-2009 11:13 AM
Now that it's working I'm kind of unsatisfied because I don't actually know WHY it's working. I'll be stuck next time I have the same problem.
Are there any special things I need to watch when declaring exported functions or something which could have lead to this problem?
Shane.
11-02-2009 11:24 AM
Intaris wrote:
Apparently CVI can only use __cdecl DLLs? Is this correct?
No - I've used both schemes with CVI. Apparantly the Microsoft recommendation is that for 'public' dlls, that are intended for commercial distribution and possible use by VB based programs, __stdcall is the convention of choice. For private dlls with a well-controlled pattern of usage, that excludes VB code, __cdecl is preferred. It is possible to mix both types within a single dll.
CVI can be set to use one type or the other by default, but this can easily be over-ridden for individual functions.
Confusingly, it is not always disastrous to get the conventions mis-matched - I have seen some functions continue to work just fine, even though the programmer got it wrong. (Depends on the number of function parameters, the number of local variables in the function, if those locals are used before or after further function calls, the compiler,...)
JR
11-02-2009 02:29 PM
Well I've no idea any more as to what was wrong with my software.
Either LabVIEW or CVI has decided to do something different today.
As long as it stays that way I'll be OK.....
Thanks for all the help.
Shane.