Search the Community
Showing results for tags 'external code'.
-
I am trying to pass a 2d array initialized with large data in my c dll to labview, but no matter what I only get a pointer to the array at best shot. I want to get the array as return type from the function I get when I use labview shared library wizard. #include<stdlib.h> #include<stdio.h> #include<stdint.h> __declspec(dllexport) int* get_results(){ int *array; array=malloc(3*3*sizeof(int8_t)); int a=0; for (int y=0;y<3;y++){ for(int x=0;x<3;x++){ int index=y*3+x; array[index]=a; a++; } } return array; } for this I get "get results.vi" which after running it I only get a negative number. and for this one : __declspec(dllexport) int get_results(){ int *array; array=malloc(3*3*sizeof(int8_t)); int a=0; for (int y=0;y<3;y++){ for(int x=0;x<3;x++){ int index=y*3+x; array[index]=a; a++; } } return *array; } I got get results1.vi which I get nothing after running the vi. I don't know how should I make the function or dll that I get the array from the vi that shared library wizard gives me please help me get results1.vi get results.vi
- 8 replies
-
- dll
- external code
-
(and 1 more)
Tagged with:
-
I was thinking it would be cool to write an API that would allow programmers to customize the thumbnail popups in windows 7, especially with the ability to add buttons (see http://dotnet.dzone....ndows-7-taskbar and attached image). From what I can tell, even after taking the knowledgebase steps on NIs site to make .NET 4.0 available in LabVIEW, the necessary namespaces are not available in LabVIEW. Even if they were, I'm not sure how I'd get this to work because it requires xaml files. I suppose I would have to write a .NET wrapper, but then I don't think this would be dynamic enough to make into a standard API for LabVIEW applications that need more or less buttons without modifying the wrapper text code. Unless, somehow you had all buttons fire a single event to be captured by LabVIEW in which the event data had the name of the button pressed, allowing you to determine what to do on that button press. Suggestions, or is this just not going to be possible?
- 16 replies
-
I am trying to open shell32.dll with .NET but an exception is being thrown. I'm seeing this type of exception all over when I search google but really not much related to LabVIEW (mostly vb.net, c#.net etc). I have tried loading shell32.dll from system32/shell32.dll and SysWOW64/shell32.dll and both fail. I am running 32 bit LabVIEW on Windows 7 64 bit. I'm guessing it has something to do with that. I am going to try on a coworkers 32 bit computer when I get a chance, but does anyone have suggestions? Thanks. Edit: Tried on 32 bit labview on a 32 bit machine and it still fails.
- 6 replies
-
- .net
- external code
-
(and 2 more)
Tagged with:
-
Hello everyone, My project: We have 2 PXI-RT communicated by 2 connections: a fiber optics connection (not Ethernet), and an Ethernet connection. The FO connection is the main connection used to wsend a receive data. The Ethernet connection is only use when the FO connection is lost, in order to check if the "mute PXI" has lost the FO connection but is still on, or if the PXI has been switched off. The problem: Originally we used the "RT Ping controllers.vi" on the "Real-Time Utilities", but unluckily we changed the PXI controller and the new one is not supported by the library. The main issue is the application was developed using LV7.1 and cannot be upgraded. Options already disscarted: We tried opening a TCP connection, but the operation takes too long. I found this great VI, but its for LV2010. I tried it and it works perfectly. (http://forums.ni.com...er/td-p/1535420) I tried translating it to LV7.1, but something is wrong, because LV closes as soon as I play Run Have any of you worked using wsock32.dll on a PXI? Best regards, g_l_u_p ping_PharLap_LV711.vi
- 2 replies
-
- pxi-rt
- labview7.1
-
(and 3 more)
Tagged with: