How to use Call library function node for a function in dll with VOID data type
Hi All,
I would like to ask for your kind help,
I am facing an issue with the call library node.
I have a C++ function(stdcall), which has void as data type
error code XXXX(hwnd, lID, getValue, *void data1, *void data2)
the data1 and data2 types are always changing depending upoin the value of "getValue".
Primarily i can use call library node multiple times and adapt each node according to the data types of data1 and data2, and extract the values and use in the code. Here is no issue. Real question is:
My question:
How can i just use one time call library node and make a case depending upon the "getvalue", which will control the data type of data1 and data2. Here i really looking for solutions.
My trials:
i used varaints as input to the call libray node for data1 and data2, and selected Parameters in call libraby node as " Adapt to type". here labview just crashed.
i really appreciate your feedbackand suggestions.
Thanks
Kutbuddin
Solved!
Go to Solution.
Attachments:
Clipboard02.jpg 103 KB
A variant is a very specific LabVIEW datatype (really a C++ type object internally) and trying to pass that to a function, which excepts a flat memory pointer there, for sure will crash very quickly.
As to endianess, yes Unflatten will be able to adjust for endianess, which in this case however is most likely exectly NOT what you want. So make sure that the you select native type for the endianess input on Unflatten from String. LabVIEW internally works with whatever is the native endianess, as will most likely your C++ DLL. The platform independent big endian format does only come into play when you receive data streams over some streaming interface like a network connection. Here it is desirable to use an endian format that is independent from the actual platform that generates and consumes the data stream. LabVIEWs default endianes is big endian here.
But as long as you pass data directly to native components like DLLs there is no difference in endianess between what LabVIEW uses and what those components use.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Similar Messages
-
HT5037 How to use iPhoto Library Upgrader
How to use iPhoto Library Upgrader
Hello Terence,
sorry that I come here with a completly different thema but I follow your answers since long and they are always excellent! And I do not know who could help... as I can not find the solution in Apple Support Communities.
I am very afraid with my MacBook Pro: midd. 2012
Prozessor: 2,3 GHz Intel Core i7
4GB 1600 MHz DDR3
Intel HD Graphics 4000 384 MB
Software: OS X 10.8.5 (12F45)
Kernel-Version: Darwin 12.5.0
iPhoto 11, Version: 9.4.3 (720.91)
iPhone 4s, 64GB Version:7.0.2 (11A501),
Symptoms:
1. I have notice three days ago that Spotlight allways answers I should go to the web when I look for data in my computer. It seems that Spotlight can not find anything from my computer.
2. Timemachine has no data before the 28th. January 2014 (!?) No idea why this happens
3. In Finder window when I go to "Alle meine Daten"(= All my data) there is absolutely nothing there...it means 0 objekts are there.
4.In Systemeinformationen (=Systeminformations) if I go to Software and then to Programs... there is nothig there because the Plug-In do not react quick enough (Das Plug-In hat beim Sammeln dieser Informationen nicht schnell genug reagiert). I am asking me which Plug-In it is and where to find it...
5. On my iPhone the Photo-stream suddenly shows only 110 fotos from Dezember on, but in My MacBookPro the iPhoto Stream shows of course the lasts 1000 ones...from 25.01.2013 to 03.02.14 as it did allways before.
I am not going to sync anything until I discover what is going on...
6. On my Contacts suddenly appeared the link address of a "game" in my own card ( both in iCloud and Lokal AddressBook)... and I have never ever played an online game (!?). So I deleted this two links as I discovered them some days ago...
I do not know what is going wrong here but I'm afraid to loose all my data in the computer, so I am making a secure copy in an external drive right now...
Could it be a virus inside... a software problem may be...?
The mayor Problem is how to get the programms to work (Spotlight, etc), or how to repair them.
I'm trying to find something wrong in the Protocols I have here, for example
- the Repair protocol for users from 27.01.2012 ( /Users/Begona/Library/logs/fsck_hfs.log).
- the Datasystem-Reppairprotocol from 01.02. 14 (/var/log/fsck_hfs.log)
- the Installationsprotocol from 04.02.14...
but I am really lost.
Thank you very much for reading this, help would be high appreciated
Begoña -
When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
I have a time critical real time application, in which I use a piece of DLL function developed by C++. It is OK? Could any senior developer assure me?
Thank you in advance.
Solved!
Go to Solution.qing_shan61 wrote:
When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
Once
qing_shan61 wrote:
I have a time critical real time application, in which I use a piece of DLL function developed by C++. It is OK?
OK
Be sure that all DLL calls are thread safe (do not perform calls in UI thread).
Also for real-time application you need real-time OS.
Andrey. -
Call a special function in the dll using Call Library Function Node????
Dear all,
I am calling a special function in the dll using call library function node. There is a input parameter that it is a enum type in this function. I don't know how to deal this parameter for calling this function.Has anybody solved this problem?Please advise!
I am appreciated of you anytime.Most of the times an enum is just a U8/U16/U32, internally so probably you can call it with just a U8/U16/U32 or something. For the correct value you have to look at the definition.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
LabVIEW PDA reports COREDLL.DLL error when using Call Library Function Node
I'm trying to build a LV PDA app that calls an external DLL file built using embedded visual C. When configuring the Call Library Function node I select the stub DLL, configure the I/O parameters and select OK. When the configuration dialog closes I get the following error:
LabVIEW: LabVIEW.exe - Unable to Locate Component
This application has failed to start because COREDLL.DLL was not found. Re-installing the application may fix this problem.
I do not get this error when using the configuration dialog in the example VIs.
Any suggestions as to the cause and/or the solution?
Thanks,
RyanHello -
When you create a PDA VI that calls a DLL, you must include the .c or .lib file that corresponds to the DLL. Take a look at these documents:
LabVIEW PDA Module Build Errors with VIs that Call DLLs
Why Do I Receive Errors When Calling a C++ DLL from a Call Library Node Using the LabVIEW PDA Module...
How To Call External Code in LabVIEW PDA for Palm OS
H
ow To Call External Code in LabVIEW PDA for Pocket PC
Hope this helps!
S Vences
Applications Engineer
National Instruments -
Use call library function node
I try to use call library function node to call a function in DLL and retrieve info stored in the C structure data type, can I do it? If yes, how ? Thanks.
Have a look at the article Configuring the Call Library Function Node
-
Hi Experts,
I am using CALL TRANSACTION in ALV for VA02, but I want to go on item number. The following form i have used and it is working but I want to go on perticular item number in va02. pl. guide me.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'VBELN'.
READ TABLE it_out INTO wa_itab INDEX rs_selfield-tabindex.
SET PARAMETER ID : 'AUN' FIELD wa_itab-vbeln .
'APO' FIELD wa_itab-posnr.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*=====================================
YusufHi,
use BDC for that....
check out the BDC part of coding for it.
REFRESH itab_bdcdata.
CLEAR itab_bdcdata.
*initial screen
PERFORM bdc_dynpro USING 'SAPMV45A'
'0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBAK-VBELN'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'VBAK-VBELN'
<b> g_t_atpma4-vbeln.</b>
*item overview screen
PERFORM bdc_dynpro USING 'SAPMV45A'
'4001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=POPO'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV45A-MABNR(04)'.
*popup screen (move item to top)
PERFORM bdc_dynpro USING 'SAPMV45A'
'0251'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV45A-POSNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=POSI'.
PERFORM bdc_field USING 'RV45A-POSNR'
<b>g_t_atpma4-posnr.</b>
*item overview screen
PERFORM bdc_dynpro USING 'SAPMV45A'
'4001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBAP-POSNR(01)'.
PERFORM bdc_field USING 'RV45A-VBAP_SELKZ(01)'
'X'.
*Call transaction VA02
CALL TRANSACTION 'VA02' USING itab_bdcdata
MODE 'E'
UPDATE 'A'
MESSAGES INTO itab_bdcmsg.
Patil -
How to create one more server node for SAP J2EE server?
Hi,
Can any one please suggest how to create one more server node for SAP J2EE server? I am using WAS700.
Thanks and Regards,
Smriti.Hai,
Login into the Configtool(C:\usr\sap\SID\DVEBMGS<inst no>\j2ee\configtool) if ABAP+JAVA stack or C:\usr\sap\SID\JC<inst no>\j2ee\configtool) if JAVA stack
click on the instance and and select the addserver button on the top to create a servernode for J2EE server.
Thanks and Regards, -
How can I make a "property node" for a VI?
Hello!
If I add a boolean button on the FP then I am able to make a property node for that button in the Block Diagram. But how can I make a property node for a VI? I have several VI:s an that together is one program. What I need to do is to verify what kind of VI some of my VI:s is. I need to verify if it is .exe or .vi-file, and if it is .exe then I want to disable run, abort, run continuously bottons otherwise not. I have hard that this is possible to do programmaticaly but I can´t figure out how. I am aware that I could do that manually in the File->vi properties->customize->windows appearance but theese choises makes it last forever.
I want to be able to stop and run and everything if it is a .vi file, but if it is .exe-file then all those buttons should be disabled.
Anyone have an example on this?
In an other message at this Forum I read "You can use the `Front Panel Window. Allow Runtime PopUp`" property to disable run-time shortcuts menues programmaticaly, but still I dont know how to create this property node.
/AmirYou really shouldn't open a new thread. If you don't understand something, ask and we will explain it.
Like I said in the other thread, you can check if you are running in LV or an EXE by using the Application>>Kind property. To get it, place a property node (from the Application Control palette) on the diagram, click it and find the property.
To set the properties for the VI, place another property node, right click it and select Select Class>>VI Server>>VI. You should have the properties you want under Front Panel Window.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf). I believe chapter 17 of the user manual explains about programmatic control of VIs.
Try to take over the world! -
How to use the same POWL query for multiple users
Hello,
I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
"Query 'ABC' is already open in another session."
where 'ABC' is the query name.
Can you please tell me how to use the same POWL query for multiple users ?
A fast reply would be highly appreciated.
Thanks and Regards,
SandhyaBatch processing usually involves using actions you have recorded. In Action you can insert Path that can be used during processing documents. Path have some size so you may want to only process document that have the same size. Look in the Actions Palette fly-out menu for insert path. It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..
-
How to use the same services-config for the local and remote servers.
My flex project works fine using the below but when I upload my flash file to the server I doesn't work, all the relative paths and files are the same execpt the remote one is a linux server.
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service id="amfphp-flashremoting-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
<destination id="amfphp">
<channels>
<channel ref="my-amfphp"/>
</channels>
<properties>
<source>*</source>
</properties>
</destination>
</service>
</services>
<channels>
<channel-definition id="my-amfphp" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
</channels>
</services-config>
I think the problem is the line
<endpoint uri="http://localhost/domainn.org/amfphp/gateway.php" class="flex.messaging.endpoints.AMFEndpoint"/>
but I'm not sure how to use the same services-config for the local and remote servers.paul.williams wrote:
You are confusing "served from a web-server" with "compiled on a web-server". Served from a web-server means you are downloading a file from the web-server, it does not necessarily mean that the files has been generated / compiled on the server.
The server.name and server.port tokens are replaced at runtime (ie. on the client when the swf has been downloaded and is running) not compile time (ie. while mxmlc / ant / wet-tier compiler is running). You do not need to compile on the server to take advantage of this.
Hi Paul,
In Flex, there is feature that lets developer to put all service-config.xml file configuration information into swf file. with
-services=path/to/services-config.xml
IF
services-config.xml
have tokens in it and user have not specified additional
-context-root
and this swf file is not served from web-app-server (like tomcat for example) than it will not work,
Flash player have no possible way to replace token values of service-config.xml file durring runtime if that service-config.xml file have been baked into swf file during compilation,
for example during development you can launch your swf file from your browser with file// protocol and still be able to access blazeDS services if
-services=path/to/services-config.xml
have been specified durring compilation.
I dont know any better way to exmplain this, but in summary there is two places that you can tell swf about service confogiration,
1) pass -services=path/to/services-config.xml parameter to compiler this way you tell swf file up front about all that good stuff,
or 2) you put that file on the webserver( in this case, yes you should have replacement tokens in that file) and they will be repaced at runtime . -
How to use the same email address for outgoing email on two iPads?
How to use the same email address for outgoing email on two iPads?. My wife and I both use the same email address. We receive the same incoming email on both iPads but are unable to send email from my wife's iPad. She is using an iPad 2 and is usng IOS 6.0.1
Hi Creaturekeeper,
If you've added the account into the iPad and you are unable to send email from it, then please follow the troubleshooting in the article below.
Get help with Mail on iPhone, iPad, and iPod touch - Apple Support
Take care,
Alex H. -
How to use the field of 'FM for Determining Address' in report RSWUWFML2?
Dear gurus,
In the selection screen of report RSWUWFML2, there is a field named 'FM for Determining Address' . How to use it? Is it for sending e-mail to specific e-mail addresses?
Regards
DavidI will test soon. Thanks to all involved.
-
How to use external library(in .jar format) in netbeans project?
How to use external library(in .jar format) in netbeans project?
Thanks!How to use external library(in .jar format) in netbeans project?
Thanks! -
WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?
WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?
I have installed KB2734608, but when I search MS13-101 , no patch for Win 2012.
Can you help me resolve this problem ?
ThanksOn Thu, 10 Apr 2014 06:01:48 +0000, fujitsu08 wrote:
WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?
WSUS has its own, dedicated forum where the WSUS experts answer questions.
You should repost your question here:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverwsus
Paul Adare - FIM CM MVP
Aibohphobia: n. Fear of Palindromes
Maybe you are looking for
-
Errors occurred during installation, install failed.
So recently I got into a bit of trouble when my web browsers got hacked and started installing some adware on my computer... I'm still getting that sorted out, but I think while I was going through my "Common Files" folder and deleting things that lo
-
Hello friends, I've a huge matter: whould I buy a Macbook Air or Pro?
I'd want to get a Macbook for my birthday (university's approaching, too). I saw the new MacBook air 13" and the new MacBook Pro 13" are pretty much at the same prize. I'll tell you things I considered: MacBook Pro: more CPU power, more storage, more
-
Sorting by multiple characteristics
Can I sort my library by more than one column? What I mean is, by rating, and then for those songs that don't have a rating, by genre? Or by Album, and then within the album, by name?
-
Satellite X200 - error trying to install WinVup2_L802A_RATO35 rev2
From an advice of TEMPRO (http://it.computers.toshiba-europe.com/innovation/download_driver_details.jsp?ID=59113&OSID=-1&driverLanguage=42&SOURCE=TEMPO&LNG=11) I tried to install the driver WinVup2_L802A_RATO35 rev2. I received the message "target dr
-
In Finder, Mac Help doesn't work
When I click on the help icon in the finder tool bar, and choose the " mac help" drop down, a window that says, "untitled" opens, but it is then, poof, gone in a few seconds. What is happening here?