WinScok API functions in Realtime

Hi,
I have the source code a dll which I am trying to port to work on a realtime PXI target.I am using VS2008, and the dll compiles fine and passes the realtime dll checker. When I deploy the dll and call it from a realtime program however, I run into problems using several windsock functions, specifically,
getservbyport() - generates an internal exception
gethostbyname() - fails to return a valid hostent structure - generates WSATRY_AGAIN
gethostbyaddr() - fails to return a valid hostent structure - generates WSATRY_AGAIN
So far I have tried linking to wsock32_rtlv.lib which comes with CVI, as well as using the winsock.h and winsock2.h headers which come with CVI.Neither has changed the situation.
I have tried moving the VS2008 project I have into CVI, but I have no experience with CVI and limited experience with VS2008. When I try to compile the sourcefiles in CVI I end up with a lot of errors in the standard header files, all of the form
"expecting ';' found ')' instead"
It is not clear to me why these are generated. Any help would be appreciated.
Jonathan Jara-Almonte

Hi,
Thanks for the answer on CVI. At this point, it would be far too complicated for me to try and recode the library in C, so I guess CVI is out of the question. 
As for the WinSock APIs, the gethostby* routines are supported by Pharlap ETS, as documented Here. Furthermore, the errors they throw as reported by WSAGetLastError() are valid errors, and do not seem to be indicative of the functions not being supported.
Thanks,
Jonathan Jara-Almonte 

Similar Messages

  • How to refresh the text which is display by windows API function 'findwindow' 'getdc' 'textout'!

    i use the windows api function to dynamelly display text on the frontpanel ,it successed ,but when you move the scrollbar to the left ,right ,top ,bottom,the text will be disappear!! i think it is a very difficulteed problem .in my around ,no one can do! who can help me!
    Attachments:
    textrefresh.vi ‏21 KB
    auto_appear_scroll.vi ‏126 KB

    Very cool!
    It looks like you are using the same functions that LV uses to refresh the screen. Thos functions only let you update within the window you specify. This is why your updates stop at teh edge of the window.
    Normally LV will watch the scroll bar position and re-paint the screen to reflect an scroll bar postion changes. Since you are by-passing LV, you can not rely on LV to refresh your screen when the scroll bars move.
    At this point I can offer two suggestions.
    1) Continue with the approach you started and start adding all of the code required to watch the scroll bars and re-paint as indicated.
    or
    2) Look into the LV Picture control. Based on what you have done using dll calls I would guess that you could probably figure how to do the
    same thing using a picture control. The Picture (being a LV native object) is fully supported by LV so the scrolling work is already done and working. The picture control will let you draw lines, insert text, etc. Take a look at the "Robot Arm" example. It should get you started.
    Finally, the Picture control is pure "G" so it should be platform independent.
    Otherwise let me commend you on your example. You say no one else where you are can do what you have done. After looking at your example, I am not suprised. There are few people in the world that can do what you have done.
    Great work!
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAutomation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • BW SEM-BPS API functions from a Web Dynpro project in Netweaver

    Hi,
    Rather than using the standard Web Interface Builder in BW SEM-BPS (3.1B), we have to use SAP Netweaver to create a Web Dynpro project which accesses all the API_SEMBPS functions, such as GETDATA, SETDATA, FUNCTION_EXECUTE etc. Has anyone done this before? If so, do you have any examples, hints?
    Regards,
    Linda Lee

    Hello Linda,
    let me add some more remarks on this topic from the BW-BPS development perspective:
    I completely agree with Marc's statement.
    Thechnically it is possible to build a planning application UI on top of the BW-BPS API functions and we have some customers that are live with such a solution. However, I would recommend this only in 2 cases
    1. You need to create a tightly integrated application with BPS being only one part of several other components (including transactional UI, e.g. running against a CRM system).
    2. You prefer a UI technology that is not provided by SAP (e.g. Java Swing based).
    In all other cases, I would say that one should stick to the Web Interface created with Web interface Builder, mainly for cost reasons. If this tool does not fulfill all your needs there are several possibilities to enhance and extend the generated web interfaces by custom specific coding (see also several How-To guides in this area; e.g. "How to integrate a BEx Web Template into a BPS Web interface").
    Another possibility is to loosly couple several web UIs with the help of the portal.
    To my knowledge, it is not true that BSP web technology will be obsolete shortly. 
    In general, I would always prefer a tool supported, model driven approach compared to a heavy custom coding. This is also in sync with SAPs general strategy to a more pattern based approach to create UIs.
    Regards,
    Tobias Hagen
    Dev. Manager BW-BPS
    SAP NetWeaver BI

  • Is there api function to change access mode and set a passcode to recording in meeting?

    Is there api function to change access mode and set a passcode to recording in meeting?
    When I'm trying to use "action=acl-field-update&acl-id=SCO_ID_RECORDING&field-id=meeting-passcode&value=MY_PASSC ODE" it just clean the password and do not set it or change.
    And "action=permissions-update&acl-id=SCO_ID_RECORDING&principal-id=public-access&permission- id=view-hidden" do not work too.

    There is not a specific API for doing this. This was discussed in the other Connect forum here, Adobe Connect User Community.
    For you call I would make the second part differently. Instead of 'field-id=meeting-passcode&value=MY_PASSCODE' I would call 'meeting-passcode=MY_PASSCODE' and see if that worked better.

  • Call mysql C API function

    Hi all,
           I just have one question, how can I use mysql C API function for my labview program? I program it use dll call, but I use command "show processlist;"in mysql database,can see this process yet.So ,anybody can help me to solve this?
          Thanks,
          also , anyone have example,show...I am very appreciate...

    Do you really want to use a C API to do that? 
    I don't see the need for a C API or a call to a DLL.  I find it more logical to connect to your MySQL DB Server and run "show processlist" as an SQL Statement.
    but if you insist on using a DLL, I am guessing this link will help you:  Using Existing C Code or a DLL in LabVIEW

  • API Function

    hi,
    what is the difference between Function module and API Function in BAPI Concept.
    Points will be rewarded .
    thanks and regards .
    soorya.k

    BAPI stands for Business API(Application Program Interface).
    Function Modules:
    Function modules are ABAP routines that are stored in a central function library. They are not application-specific, and available systemwide. The ABAP Workbench comes with a large number of standard function modules.
    Some Busniess Logic thats needs repeated execution in System are developed into FM. So Reusibility is the major advantage and no repeated programming.
    All related FMs are grouped in Function Groups..Normally used with the SAP system .
    Business API(Application Program Interface).
    BAPI enable access to SAP functions across formal, stable and dialog-free interfaces. These interfaces can be used by external applications developed by customers and complementary software partners as well as by other SAP applications.
    BAPIs are defined as API methods of SAP Business Object Types. These object types are used to enable object-based communication between components. Business objects and their BAPIs enable object orientation to be used in central information processing in companies. For example, you can reuse existing functions and data, achieve trouble-free technical interoperability, and implement non-SAP components.
    Applications can use BAPIs to directly access the application layer of the SAP System and, as clients, applications can use the business logic of the SAP System. BAPIs provide the client with an object-oriented view of the application objects, without needing to know the implementation details.
    Reusibility is the major advantage
    Even non-SAP application can access SAP system using BAPI for executing certain Business Functionality
    Basically BAPI are designed for the 3rd Software to communicate with SAP system for accessing,creating or modifying some business data lying on the SAP system !

  • Is their a activeX api function to set the database option "database logging enabled" to true or false?

    Hello!
    I want to decide dynamically while running a sequence to log the results to a database or not.
    So I need to set the "database logging enabled" property by a activex function call.
    Does a activex api function exist? I didn't found one, or is their an other way to change the property value?
    Thanks and regards
    M. Brosig

    Hi,
    Ah! I understand.
    You can change the runtime properties from you sequence or inside your step by using the Lookup string of
    "RunState.Caller.Locals.DatabasesOptions.DisableDatabaseLogging"
    Use the TS API  PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) method with RunState.Caller.Locals as your ActiveX Reference. (where newValue would be True or False.)
    Depending at what level you perform this API method depends how many "RunState.Caller" you have in your lookup string.
    eg.
    My example of
    PropertyObject.SetValBoolean("DatabasesOptions.DisableDatabaseLogging", 0, newValue) with RunState.Caller.Locals as your ActiveX Reference is based on a step in MainSequence which has been called by the Process Model sequence.
    If you have a step in a Sub-Sequence of MainSequence then the lookup string would be
     "RunState.Caller.RunState.Caller.Locals" as the activeX reference.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Is there any photoshop API functions can let me open a file with photoshop in my plugin?

    I used  the function system("open file"), it works well in any other program.
    For example, system("open 1.psd"), this code can use photoshop open the file 1.psd .
    But it just don't work in my plugin program.
    How can I use photoshop to open a file in filter plugin at Mac OS X?
    Is there any photoshop API functions can let me open a file with photoshop in my plugin?

    Go to settings> general and scroll down to multitasking geastures, turn them on and by swiping with four fingers from the right side of the iPad to the left and back you can switch between apps. I think this is what you need I'm not sure, I hope it helps

  • Api Function to list port in use

    Hi!I'm looking for an Api Function to list a ports in use in a Essbase Serve.

    Although there is currently no Api function to check the ports in use, if you are using Essbase 6.5 there are a couple other methods that could be used. (Might work in 6.2 but I didn't check).Check out the following functions in Maxl:- display system- display session all "Display system" displays how many ports are available - if you know how many you have then you know how many are in use. "Display session all" displays the users and their tcpip address - allowing you to determine the number of ports in by counting the number of unique user id + tcpip addresses. A worse case scenario to capture this information would be a program that runs the Maxl script to output a file that is then parsed.Hope this helps,- Jay---------------------------Jay NishSenior Business Intelligence ConsultantClarity SystemsEmail: [email protected]: www.claritysystems.com

  • Java API Update - All new API functions added

    I have released Version 1.1 of the iTunesU Web Services API for Java, which includes all of the new API functions documented in the request XSD announced in yesterday's update. These include:
    - mergeSite()
    - addDivision()
    - deleteDivision()
    - mergeDivision()
    - addSection()
    - deleteSection()
    - mergeSection()
    - addCredential()
    - deleteCredential()
    The project page is here:
    http://code.google.com/p/itunesu-api-java/
    The full list of supported functions can be browsed online:
    http://itunesu-api-java.googlecode.com/svn/trunk/doc/edu/asu/itunesu/ITunesUConn ection.html
    Thanks, and please let me know of any issues you encounter.
    Dave Benjamin, ASU

    This looks like a bug in SP4 Patch 3.
    Calendar calendar = Calendar.getInstance();
    DateTimeValue dateTimeValue = new DateTimeValue(calendar);
    While debugging I get these values..
    calendar.getTime()
          (java.util.Date) Wed Apr 18 <b>13:41:13</b> CDT 2007
    dateTimeValue.toString()
          (java.lang.String) 04/18/2007 <b>01:41:13</b>
    Please open a OSS message.

  • API function scandir

    Hello,
    i'm looking for the API function scandir. The man page exists in section 3C but I haven't found a library containing this function.
    Can someone give me a pointer?
    Thanx
    juergen

    it is part of libc.so. or the man page would indicate that you need to link against a separate library.
    nm /usr/lib/libc.so.1 | grep scandir
    [6208] | 393080| 500|FUNC |GLOB |0 |9 |_scandir
    [6354] | 392580| 500|FUNC |GLOB |0 |9 |_scandir64
    [8578] | 393080| 500|FUNC |WEAK |0 |9 |scandir
    [2909] | 0| 0|FILE |LOCL |0 |ABS |scandir.c
    [7663] | 392580| 500|FUNC |WEAK |0 |9 |scandir64
    estale ksh:
    tim

  • How to call api functions

    Hi
    I have a problem in form6i.i wrote a c++ program calling forms bjects and changing properties .The code gets complied(let file name be some.cpp file).now how can i use this file .where should i use this file .please replay
    from
    Pradeep

    gang lee (guest) wrote:
    : sir:
    : For some reasons,I want to call the windows api functions
    : from developer/2000 2.1,I want to know how to do that?
    : thanks for your help!
    There are two ways to invoke windows api functions: First, and I
    believe the simplest of the two is the Forms package ORA_FFI,
    which stands for Foreign Function Interface. This allows you to
    load the dll and call any function in that dll as long as its
    arguments uses standard data type (e.g. int, floats, chars), but
    it does not support complex datatype such as structures and
    pointers to structures.
    Thoe other alternative is writing your own C function in a dll
    and calling the windows api from the user exit. This is more
    flexible as it can call functions that pass complex data types.
    Either approach will require time and tinkering to get it to
    work. A good knowledge of C would be helpful.
    null

  • CProjects API Functions

    Hi All,
    Is anyone aware of API functions for the cProjects suite? (i.e. cFolders have CFX_API_* function set).
    I'm working with SAP cProject Suite 3.10 (based on 640) and need to be able to read project info such project type, status, description, etc... from a remote system.
    Thanks!
    Roman D.

    Try CFX_BI_RI_CF_SELECT_FOLDER 
    CFX_BI_RI_UTIL                 cFolders: Rel. Ind. Util. Functions                         
    CFX_BI_RI_UTIL_AFTER_RFC       Check for errors after call of cFolders API function        
    CFX_BI_RI_UTIL_CF_DOC_SET_DEST Set R/3 destination document for cFolders document given    
    CFX_BI_RI_UTIL_CF_DOC_SET_PATH Set path (col., area, path) for cFolders document given     
    CFX_BI_RI_UTIL_CF_DOC_TO_R3    Select R/3 documents for cFolders documents given           
    CFX_BI_RI_UTIL_CHECK_RFC_DEST  Check RFC destination to cFolders system                    
    CFX_BI_RI_UTIL_CREATE_DMS_DOC  Create DMS document, copy obj. links from template          
    CFX_BI_RI_UTIL_DEL_TRAIL_BLANK Delete all blanks ' ' at the end of a string                
    CFX_BI_RI_UTIL_DOC_2_ORIGINALS create list of original files out of documents list         
    CFX_BI_RI_UTIL_FILE_FROM_CF    Copy one file from cFolders system                          
    CFX_BI_RI_UTIL_FILE_TO_CF      Copy one file to cFolders system                            
    CFX_BI_RI_UTIL_GET_AL_VALUES   Get alias values                                            
    CFX_BI_RI_UTIL_GET_AREA_LIST   Get list of areas within one competition                    
    CFX_BI_RI_UTIL_GET_COL_LIST    Get list of collaborations within one folder                
    CFX_BI_RI_UTIL_GET_DOC_LIST    Get list of documents within one folder                     
    CFX_BI_RI_UTIL_GET_FOL_LIST    Get list of folders within one folder                       
    CFX_BI_RI_UTIL_GET_ICON_F_TYPE Determine Icon for cFolders object type given               
    CFX_BI_RI_UTIL_GET_SEARCH_LIST Get search list from cFolders system                        
    CFX_BI_RI_UTIL_REDLINE_FROM_CF Redline layer from cFolders to the backend system           
    CFX_BI_RI_UTIL_REDLINE_TO_CF   Redline layer from the backend system  to cFolders          
    CFX_BI_RI_UTIL_SET_B_AL_VALUES Set alias values for Backend System                         
    Thanks
    Message was edited by: Saquib Khan

  • API functions

    Hi,
    Does anybody know how I can find the URL of a webpage using EnumWindows API functions
    I can get the title of the page and the classname using the GetWindowText and GetClassName functions. I found info on these functions on the http://www.msdn.microsoft.com/library site.
    (I'm using j++ and I imported dll's).
    I should be able to get the URL in the same way but I can't seem to find a similar function that retrieves it.
    Does anybody know?
    bulb

    Thanks for the info
    I actually have the window handle
    It's getting the url is my problem. The way I see it I should be able to get the url in a similar way to the way I'm getting the handle. But I don't know if there is a function to do this.
    Or
    Is there any other way of retrieving the url of a page?
    Thanks, bulb
    Look here
    http://faqchest.dynhost.com/msdn/JCOM/jcom-99/jcom-9905
    jcom99051805_02671.html for a description of how to
    enumerate windows in J++ via EnumThreadWindows (those
    owned by one thread) and EnumWindows (all those top
    level windows owned by a process).
    But beware, you are using a discontinued language and
    tool that is a dead end.
    Chuck

  • Looking for Logoff API functionality from NWA

    Hi ,
    I have one web application which is deployed on NW 720 system . I have applied security contraint in this web application so when i try access the url pattern it ask user for credentials . But if i close this browser and open a new session then it never ask for user credentials . I guess it takes the user cookie information to re login .
    The requirement from my side is to find the API from nwa which can be called during the _jspDestroy functionality so that current user can log off before the broswer is closed . Can you help me here to find that API ?
    Best Regards,
    Mitul

    Hi,
    Refer below link if it helps:
    http://help.sap.com/saphelp_nw70/Helpdata/en/44/aada5230be5e77e10000000a155369/frameset.htm
    Best Regards,
    Rupali

Maybe you are looking for