02-15-2006 05:03 PM
02-15-2006 05:39 PM - edited 02-15-2006 05:39 PM
Message Edited by tbob on 02-15-2006 04:40 PM
02-16-2006 08:58 AM
02-16-2006 10:17 AM
Ok, this is really starting to screw with my head.
I made a really simple dll:
#include "lvdll.h"
__declspec(dllexport) int AddInts(int x, int y) {
int z;
z = x+y;
return(z);
}
A little test app shows this works correctly. However, in LabVIEW, I always get 1244517 as the result. I'm passing the numbers in as i32 and using C calling conventions.
Anyone have an idea?
Thanks,
Jon
02-16-2006 10:59 AM
Hi tbob
Something completelly not relevant to the thread.
I just wanted to know how did you linked the picture to the post, so it displays in the browser?
take care
Pawel
02-16-2006 11:19 AM - edited 02-16-2006 11:19 AM
Bigg_jon: Another thing to try is to change the calling convention. There are two choices, Standard (WIN API) and C. These are chosen in the screen that appears when you double click on the Call Library function icon. Whichever you have selected, try selecting the other. This may solve your problem. I would think that the C calling convention should work, but I've seen instances where Win API works better even with DLLs produce in C. I all depends on how the DLL was built. I would like someone to explain in detail the differences between the two. I suspect it has something to do with declarations in the C code.
Pawel: Neat trick, I had to ask someone to learn this one too. First create your vi. Then highlite the part of the block diagram you want to post. Copy to clipboard. Open MS Paint. Paste. Resize if you have to. Save the paint file as a PNG file. Add the png file as an attachment to your post in the usual way like you would attach a vi. Click Submit Post. As soon after you see the post, on the right side is a drop down menu called Options. Click and select Edit Message. You only have a limited amount of time to do this so be quick (I think it is a couple of minutes). Your post comes back in edit mode. Click on the attachment. Copy the HTML address of the attachment (highlite and press CTRL-C). Click the Back button on your browser. Place the cursor after your text in the Message Body edit box. Click the Insert an Image button (small yellow box with mountains in it). Paste the copied HTML address in the pop up box and click OK. You should see the image on your post. Click Submit Post. You will also see added text "Message Edited by ..." or something like that at the end of your post. You can edit your post anytime within the couple of minutes range using the Options menu. Lets say you see a mistake, or someone beat you to an answer. Edit your post and re-submit. Lots of steps but it is quite easy to do.
Message Edited by tbob on 02-16-2006 10:20 AM
02-16-2006 11:34 AM - edited 02-16-2006 11:34 AM
Thanks a lot tbob

It works! ![]()
And apparently it does not need to be a png, but any graphical file accepted by browser.
Thanks.
take care
Pawel
Message Edited by pawel on 02-16-2006 11:35 AM
Message Edited by pawel on 02-16-2006 11:36 AM
Message Edited by pawel on 02-16-2006 11:37 AM
Message Edited by pawel on 02-16-2006 11:37 AM
Message Edited by pawel on 02-16-2006 11:38 AM
02-16-2006 11:45 AM
02-16-2006 04:09 PM