wolfgang
-
Posts
2 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by wolfgang
-
-
Hello,
I'm trying to write a dll for use in LabVIEW.
So I make this simple little dll source:
#include "lvdll.h"__declspec(dllexport) int AddInts(int x, int y) { int z; z = x+y; return(z);}
It compiles fine (using OpenWatcom compiler) and I write a little test C app and it works correctly when called from there.
However, in LabVIEW, I use the call library function node, using C calling convention and wire up i32s to the parameters, I always get 1244517 as the result.
If anyone has any idea what could be going on, I would appreciate the help. This is starting to drive me nuts.
Thanks a lot,
Jon
simple dll trouble
in Calling External Code
Posted
My inputs are LV I32 controls. For the library function node, I'm using Signed 32 bit Integers. I've attached my little vi.
I have also tried using the example method of returning void in the dll and using a pointer to an integer to get the data out, but that didn't work either.
I'm wondering if it is a compiler issue (or maybe I'm exporting the function incorrectly or something), as I have called win32 dlls with no problems.
Anyway, thanks for your help,
Jon
Download File:post-1931-1140114472.vi