Can a dll remember state information?

Hello
I want to write a dll to read an
excel file and return a 2D array of strings representing the
contents. I do not know at the start how big this array is going to
be. What is the best way of handling this. I thought of making two
calls, one to find the size and the second to get the array. Or can I
do the memory allocation in the DLL? (It's my first foray into DLL's)
The reason I'm writing a DLL is that
some customers have Excel97 and others Excel2000. It's time we fixed
this for once and all!
John

Hi John,
The answer to your question is yes, there are several ways to handle state information in a DLL.
However, this application is probably not suited for a DLL. I suspect
you would be better served in making ActiveX calls into Excel. There is
at least one example that ships with LabVIEW that shows how to do this.
Finally,
Finally, if you insist on writing a DLL, the best way to maintain the
state information is to create some sort of structure or class and
return a pointer to that class to LabVIEW. The call library node should
be instructed to treat the pointer as a U32. LabVIEW can't access the
data in the pointer, but it can pass the pointer on to the next DLL
call, which can then dereference it and access the data.
Jason

Similar Messages

  • How can I recover my account information I lost all the details and only remember my email address

    how can I recover my account information I lost all the details and only remember my email address

    https://getsupport.apple.com/Issues.action

  • Can't activate my iphone cause the previous owner can't remember their information

    How do I activate my iphone when the previous owner can't remember their information to take it off their account?

    Send the previous owner this link and tell them to reset the information. If they will not or cannot do so, the iPhone is useless to you.
    (120831)

  • Can we use Loop Statement for Ranges

    Hi Friends,
    I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
    I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
    But my question is .....
    My R_range has values as below
    'I' 'EQ' '001'
    'I' 'EQ' '002'
    'I' 'BT' '003' '007'
    'I' 'EQ' '008'
    I have to move all these values to R_New_range and my count of items should be '8'.
    How can i do that????????
    Expecting ur answers....
    Thanks in advance
    Cheers,
    R.Kripa.

    hey friends,
    Its nice to see the replies.... but i think i had confused u all with the question
    Now i'll explain u all in detail ....
    See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
    I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
    Description of the Dump is
    Error in the module RSQL accessing the database interface
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
    neither                                                                
    caught nor passed along using a RAISING clause, in the procedure        
    "GET_COSP_COSS" "(FORM)"                                               
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.                          
    The reason for the exception is:                                        
    The SQL statement generated from the SAP Open SQL Statement violates a  
    restriction imposed by the database system used in R/3.                                                                               
    Possible errors:                                                        
    o The maximum size of an SQL statement has been exceeded.              
    o The statement contains too many input variables.                     
    o The space needed for the input data exceeds the available memory.    
    o ...                                                                               
    You can usually find details in the system log (SM21) and in the        
    developer trace of the work process (ST11).                             
    If an error occurs the developer trace often informs you about the      
    current restrictions.                                                   
    So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
    Now :
    My Projects are stored in the form of a range R_Range
    I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
    I am clear till this .....
    If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
    But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
    Hope iam clear with my question
    If not do revert back ....
    Thanks in advance for the replies
    Cheers,
    R.Kripa.
    My Doubt is ....

  • 'The state information is invalid for this page and might be corrupted' error

    An admin user added a 'widget' for internet content to be displayed on our intranet (sharepoint). Now, anytime I try to modify the page (it is still checked out) I get this error:
    The state information is invalid for this page and might be corrupted.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.HttpException: The state information is invalid for this page and might be corrupted.
    Source Error:
    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
      <%@ Page Language="C#" Debug="true" %>
    or:
    2) Add the following section to the configuration file of your application:
    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>
    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
    Stack Trace:
    [FormatException: Invalid character in a Base-64 string.]
    System.Convert.FromBase64String(String s) +0
    System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +67
    System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
    System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
    System.Web.UI.HiddenFieldPageStatePersister.Load() +136
    [ViewStateException: Invalid viewstate.
    Client IP: 10.10.16.77
    Port: 3996
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.2) chromeframe/5.0.317.0
    ViewState: /wEPDwUJLTY1NzY2ODU3D2QWAmYPZBYCZg9kFgQCAQ9kFgICBQ9kFgJmD2QWAgIBDxYCHhNQcmV2aW91c0NvbnRyb2xNb2RlCymIAU1pY3Jvc29mdC5TaGFyZVBvaW50LldlYkNvbnRyb2xzLlNQQ29udHJvbE1vZGUsIE1pY3Jvc29mdC5TaGFyZVBvaW50LCBWZXJzaW9uPTEyLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTcxZTliY2UxMTFlOTQyOWMBZAIDD2QWDgIBD2QWAgUmZ18zYzI1NzczNl82NDAzXzQwNTlfYmE4Y19hODJjODE0YzMzOTAPDxYEHgxmaWx0ZXJzdHJpbmdlHg9vbGRmaWx0ZXJzdHJpbmdlZGQCAw9kFgICDw9kFgJmD2QWAgIDDxYCHgRUZXh0BQF8ZAIJD2QWBAIDD2QWAgIBD2QWAmYPZBYCAgEPD2QWAh4FY2xhc3MFGG1zLXNidGFibGUgbXMtc2J0YWJsZS1leGQCBQ9kFgJmD2QWBAICD2QWCAIBDxYCHgdWaXNpYmxlaGQCAw8WAh8FaGQCBQ8WAh8FaGQCBw9kFgJmDw8WBh4cUHJldmlvdXNBdXRob3JpbmdJdGVtVmVyc2lvbgUCMzAeGlByZXZpb3VzQXV0aG9yaW5nSXRlbU93bmVyBQExHhxQcmV2aW91c0F1dGhvcmluZ0NvbnRyb2xNb2RlCysEAWRkA...]
    [HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
    System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +267
    System.Web.UI.HiddenFieldPageStatePersister.Load() +218
    System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
    System.Web.UI.Page.LoadAllState() +35
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
    System.Web.UI.Page.ProcessRequest() +86
    System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
    System.Web.UI.Page.ProcessRequest(HttpContext context) +49
    ASP.WELCOMELINKS_ASPX__1775745042.ProcessRequest(HttpContext context) +4
    Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context) +153
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
    Should I Publish it then re-check it out to edit or even restore to a prior version?

    Try one of the tips in these blog posts:
    http://weblogs.asp.net/lduveau/archive/2007/04/17/viewstate-chunking-in-asp-net-2-0-maxpagestatefieldlength.aspx
    http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/
    I suspect that the webpart the user added is putting a large amount of data into the page's Viewstate.
    Bryan Phillips
    MCT, MCSD, MCDBA, MCSE
    Microsoft MVP - SharePoint Services
    Blog: http://bphillips76.spaces.live.com
    Web Site: http://www.composablesystems.net

  • How can I change the state in the shipment info in the account setting?

    How can I change the state in the shipment info in the account setting?
    I was trying to buy an Apple TV from the store but, I live in Italy and at the moment (for long time) I'm in Deutschland.
    From the shipment information i didn't find the possibility to change the state. From default is ITALY but I need to receive in Deutschland.
    Did somebody know how to???
    Thanks in advance!!!

    Hi 7oaksGaz,
    1) Due to tax reasons, it's not possible to change the country associated with an existing Adobe ID.
    Follow the steps mentioned in the below link as a workaround to create an Adobe ID with the email address you currently use for the existing Adobe ID.
    http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id. html
    2) You can change the language of the application from AAM preferences
    Please find the link below for the article with the steps
    http://helpx.adobe.com/creative-cloud/kb/creative-cloud-trial-mode.html
    Thanks!
    Eshant

  • State information/Crystal Reports

    Hi :
    If there's an FAQ somewhere which answers these (or similar) question,
    pardon me, and please direct me to it.
    Q1. When I have a service object with Environment visibility and a
    Transaction/Session Dialog Duration, how's state information maintained
    ? Is it automatic, or do I have to turn on the IsShared attribute on the
    service object class ?
    Q2. I was trying to create a Crystal Report interface (CR V 5.0) to
    forte (2.0.f2) and ran into some problems. I know it has been done by
    others and would appreciate some help. After I created the C++ wrapper
    code, I had to go in and remove the prototypes (both for
    FORTE_NO_PROTOTYPE and the alternate one) for the code to compile. I
    also had some problem in mapping HWND to forte data type. Any help on
    these will be greatly appreciated.
    Please respond to either/both of the addresses brlow.
    Thanks.
    [email protected]
    [email protected]

    Priya Rath asks...
    Q1. When I have a service object with Environment visibility and
    a Transaction/Session Dialog Duration, how's state information
    maintained? Is it automatic, or do I have to turn on the IsSharedattribute on the service object class ?First of all, the IsShared attribute deals with ensuring multiple tasks
    are not accessing/updating the same object concurrently. And while
    setting this attribute helps to ensure that "state information" is not
    corrupted by multiple tasks, it has nothing to do with "maintaining"
    state information.
    So, the simple answer to your question is yes... assuming the state
    information you mention is stored in SO attributes, then it will be
    maintained automatically. However, as is the case with most simple
    answers, there are numerous problems/issues that need to be considered.
    1) For message duration SOs, the state information would generally only
    last for a single method invocation, which normally means that all state
    information is passed as parameters to the method and not maintained in
    the SO.
    2) For transaction duration SOs, the state information lasts for the
    duration of the transaction. Therefore, any initiating state information
    needs to be passed as method parameters. Subsequently, any changes to
    the SO state information (made during the current transaction) will be
    maintained automatically. Once the transaction completes, Forte will
    release the transactional lock making the SO available to other tasks.
    However, should the SO/partition etc. crash during the transaction, all
    state information is lost and the transaction will have to be restarted
    (generally on a replicated copy of the SO).
    3) For EVSOs which permanently maintain state (regardless of duration),
    the state information lasts for the entire life span of the SO and is
    shared by all distributed tasks executing in the environment. As stated
    earlier, setting the IsShared attribute can help ensure that this state
    information is not corrupted by multiple tasks. However, if your EVSOs
    have "permanent" state, then they can NOT generally be replicated for
    failover or load balancing (since this state information will not be
    available to the failed-over SO and will not be shared by load balanced
    SOs).
    If, however, you truly wish to maintain "permanent" or "semi-permanent"
    state in EVSOs, then I suggest you look at the Memento Design Pattern in
    Erich Gamma's Design Patterns book. With some ingenuity and thoughtful
    partitioning, this pattern can be adopted to maintain transient,
    semi-permanent and permanent EVSO state information, INCLUDING REMOTE
    OBJECT REFERNCES, and can recover this state in the event of FAILOVER
    (though it does nothing to help with sharing state between load balanced
    EVSOs). If you having any questions about how to adopt the Memento
    pattern, please let me know.
    Steve McIntyre
    MCI Systemhouse
    [email protected]
    --------------------------

  • How do we use if statement in labview?moreover can i use if statement inside for loop?

    how do we use if statement in labview?moreover can i use if statement inside for loop?

    The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
    Attachments:
    For_Loop_with_Case.jpg ‏21 KB

  • Can we use Perform statement in start routine ,Form and endform.

    Hi,
    Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
    Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
          Form ABC,
          ......<ABAP> code .....
          Endform.

    Hi,
    In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
    But you can surely try both the approaches.
    Reards,
    Durgesh.

  • Can we use return statement in procedure?

    Can we use return statement in procedure or we can use more than one return statement in procedure?

    HamidHelal wrote:
    NOReally? Did you at least test it? You can use RETURN in procedure or in anonymous PL/SQL block. The only restriction is you can't specify return value:
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return;
      4      dbms_output.put_line('After return');
      5  end;
      6  /
    Before return
    PL/SQL procedure successfully completed.
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1;
    Before return
    PL/SQL procedure successfully completed.
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return 99;
      4          dbms_output.put_line('After return');
      5  end;
      6  /
        return 99;
    ERROR at line 3:
    ORA-06550: line 3, column 5:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 3, column 5:
    PL/SQL: Statement ignored
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return 99;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    5/9      PL/SQL: Statement ignored
    5/9      PLS-00372: In a procedure, RETURN statement cannot contain an
             expression
    SQL> SY.

  • I just pressed the wrong button to erase of my IMac, how can I get back all information from my computer ?

    I just pressed the wrong button to erase of my iMac, how can i get back all information ?

    Possibly through a data rescue service (can cost a four-figure amount) if you didn't have an external backup.
    But you must stop using that Mac immediately, or your data will be over-written.

  • How can I share my schedule information with my wife on her accounts and devices?

    My wife and I have separate accounts in our MacMini and MacBook.  We each have an iPhone.  She uses GMail.  I use Mac Mail.  How can I share my schedule information with my wife on her accounts and devices?

    It is not advisable to follow the above suggested method. The following will do what you want without complications.
    1. On your Mac, go to http://help.apple.com/icloud/#mm6b1a9479 and follow the instructions to share a calendar privately. If you have more than one calendar you want to share you will have to do each individually. You can choose whether she is able to edit it or whether it should be read-only.
    2. If your wife does not have an iCloud account she will need to obtain one. When you share a calendar and nominate her to access it she will receive and email. All she has to do is to open the email and click 'Join Calendar'. This will add the calendar to her Calendar app on all devices and on icloud.com without affecting any other data. Again, this will have to be done individually if more than one calendar is involved.

  • HT4528 Can I put the same information on two different i-phones with different numbers and different ID's?

    Can I put the same information on two different i-phones with different numbers and different ID's?

    Yes and no it really depends on what information you are putting on the devices.

  • How can I delete credit card information from app store in IPAD2

    how can I delete credit card information from app store in IPAD2

    Im vert tirés about thé contrôle of Apple.
    I just buy a iPad 3 and use Gift credit card at beginning.
    I'm from Canada and usevps so my ip can be from other country.
    So now I can't use this gift credit card even if they have $27 on it.
    I try too buyin iTunes gift card. At beginning its work but now it's stop to work.
    And I have $100 there.
    I never use my real credit card on the Internet and never I will do that.
    I use just PayPal or gift credit card.
    Ok I talk for nothing since Apple is too much miserly to buy employee for support.

  • How can we retrieve the Payload information from B2B

    Hello,
    We are trying to send the payload information back to the client for a failed BPEL Transaction from B2B's b2b_instancemessage view. We are enqueing messages to IP_OUT_QUEUE using BPEL. We see the payload coming correctly in the B2B Business Message Reports. But we don't see the payload coming in the b2b_instancemessage view for failed B2B transactions. How can we see the payload in b2b_instancemessage view for failed B2B transactions as well? or How can we retrieve the Payload information from B2B?
    Any help is greatly appreciated! Thanks. - Sam.
    Edited by: user12049162 on Dec 4, 2009 2:04 PM

    I am not sure about the PDK API to get the group name. But using LDAP API its easy to get the User Group.
    If you find the answer to get the group name using PDK API, Please update in forum. It will really help others.
    --Balaji S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Runtime

    Hi, I wrote a program to retrieve data  from three different master data tables and put it into an internal table. I got an error message saying - 'Maximum Runtime Exceeded.' What does it mean? Thanks.

  • FlexPMD maven plugin no longer useable with Maven due to imcompatible binaries?

    I am using Maven 2.2.1 with FlexPMD 1.2 and Flexmojos 3.7.1, with the maven-site-plugin 3.0 I get the following error: [INFO] [site:site {execution: default-site}] [FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage error

  • Problems with filling out PDF forms

    We have problems with filling out PDF-forms. Aotomatic filling of forms is deactivated and we use the Adobe Reader 11.0.05. The problem is: After some time the inputs are wrong put down in the form. For example: I write 120 and in the form stands 125

  • More than one camera!

    Hi Chaps. Use three new Macs. One at the office, one at home and a Laptop. All are new therefore camera and mic sorted. Use ichat and Skype a lot, especially if I'm away from home (I can talk to my family from overseas) Would like my home mac to have

  • Return code  For DataStore objects and InfoObjectsb

    Hello Gurus,        For DataStore objects and InfoObjects: you cannot use the return code in the routine for data fields that are updated by being overwritten.        as per above statement, why ? Many thanks, Frank Zhang