OCIContextSetValue: can the structure contain a pointer to a C++ object?

I have a working external stored procedure that's implemented in C++ (with extern "C"). I'm using OCIContextSetValue to share a struct (allocated with OCIMemoryAlloc for OCI_DURATION_SESSION) between calls. My problem is that I now also need to share a C++ object between calls.
I extended the struct with a pointer to the object (created with "new MyObject"). I free the object by calling another proc from a "before logoff" trigger. It works in simple tests, but since I don't know what processes are involved, I'm afraid that the memory might go out of scope.
Is this a valid strategy? Is there an alternative? Any guidance would be appreciated!

How could i do this Wrapper function?
Respectively how could i handle with the following problem in C#
i have this in my header-file of the SharedLib.h
typedef struct {
LVBoolean status;
int32_t code;
LStrHandle source;
} TD1;
void __cdecl IP_Supply_GET_Current(TD1 *FehlerEingang, LVBoolean *Start,
TD1 *FehlerAusgang, LVBoolean *End);
long __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);
 and try to make a project with this rudimentary start:
namespace IP_GET_Current
/** interface TestInterface
Boolean status{
get;
set;
public class Class1 /**: TestInterface**/
[DllImport("C:\\SharedLib.dll", EntryPoint = "IP_Supply_GET_Current", ExactSpelling = false)];
static extern unsafe void IP_Supply_GET_Current(Int32 code, Boolean Start, Boolean End, Int32 code);
public struct TD1{
Boolean status;
Int32 code;
Boolean Start;
Boolean End;
public Main()
IP_Supply_GET_Current(3,true,true,2);
How can i start to solve the problemß
Thanks

Similar Messages

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • How to create an array of structure which the structure contain an array(s)

    im very new to java, and new here
    i searched many websites, but i cant find it
    it looks like this,
    there is 10 employees, each of them has 0-5 children,
    what i want is,
    peter alan joseph
    |?????????????????|???????|??????????????
    | |????????| |??????| | |?????| |
    | | andrew | | alvin | | | john | | ...........................
    | |________| |______| | |_____| |
    | |
    what i know is,
    import java.util.*;
    class main{
        public static void main(String[] args){
              employee d[] = new employee[10];
              d[0]= new employee();
              d[0].child = "alvin";
              System.out.println(d[0].child);
    class employee{
        String child;
    }but only work for 1 child.. =(
    i need an array of structure which the structure itself cantains an array(s)
    please help, newbie here

    sen,
    my lecture[r] said no statement in classEither you misundetstood your lecturer [probable]; or your lecturer is full of shit [possible].
    is "String[] children = new String[5]" a statement ?Yes, it is.
    she said we can only declare like "String[] children;" in classEither you misundetstood your lecturer ...
    There's nothing actually wrong withclass Employee{
        String[] children = new String[5];
    }But it has the inherent limitation that you can't put the fathers name on the 6'th child's birth certificate... because the dumb computer won't let you... Hence it is poor practice.
    A better implementation would be:class Employee{
        private List<String> children = new ArrayList<String>();
    }because it doesn't impose an artificial limit on the number of kids a bloke can have.
    keith.

  • Can the thumbnail container (TC) in a light box be set to a fixed size and a single row/line?

    I would like to set the thumbnail container to be one row and a fixed length. I also want the thumbnails to rotate/slide from left to right along the row.  Currently, I can only set up thumbnail container to show all the thumbnails in rows.   Can the container be set for a fixed length and a single row; and the user be allowed to scroll through thumbnails that exceed the length of the container?

    In these forums you are just talking to users, not developers. To provide your feedback, in Keynote go to Keynote Menu>Provide Keynote Feedback and send your request that way.

  • How can I search a word in a column and erase all the rows containing that word?

    How can I erase all the rows containing a certain word at once?
    Right now I do it manually : I search the word in a certain column with cmd+f, after that it points out where the word is in different rows. And then I manually erase every row but this takes a lot of time when you have 500 row! There must be a way to select all the rows concerned at once and erase them? Thks!

    assuming this is something you don't do very often you can simply use the search feature to identify instances of the search term, and select the row, delete the row then search again.
    The next level would be to add a new column where you identify that the search term exists in a cell of the row, then you sort by the new column:
    B1=IF(IFERROR(FIND("team", A1,1), 0)>0, "FOUND", "")
    my search term is "team" change yours as needed.
    select B1, copy,
    select Column B, paste
    Now sort:
    Inspect the rows to make sure the rows found are REALLY ones you want to remove.  select the ones you want to remove and delete those rows.

  • Diagram Disable Structure doesn't remove all objects it contains after deleting the structure.

    I have programmed in side of a while loop a Stop from "Application Control", later I used disable structure around that "Stop". It was working fine, but after removing disabled structure containing the disabled "Stop" my application stops even there was no reason to stop. Later I have experienced that removing the disabled structure leaves hidden object in the code and some how they get executed and it is no way debugging due the objects are invisible.
    I am worried that this is a bug in Labview !
    (Edi)
    Solved!
    Go to Solution.

    The Stop was in the disabled case in a frame and after removing the complete "disable structure" the software stopped randomly at the location where the disabled structure containing the Stop was already removed. Unfortunatally the code is to complex to post. I am working on a demo, but sofar doesn't prove my point yet. But I realized Labview was pointing on left over items from the disabled structure after its removal. The compiler was high lighten the hidden objects in the same shape of the object but without any visible object in the high lighted position in the graph. 
    (Edi)

  • Can not refer to a field in the structure INCLUDE

    Hi gurus,
    I have tried to declare an internal table like ( SAP standard )
    DATA: BEGIN OF OBJECT_TAB OCCURS 0.
            INCLUDE STRUCTURE RQMQMEL1.
    DATA:   SELECTED,
            PM_SELECTED TYPE PM_SELECTED,
            LIGHTS,
    "add some more fields
          END OF OBJECT_TAB.
    But then i can not reference to this structure for the field QMNUM in the INCLUDE STRUCTURE RQMQMEL1.
    I refer by l_qmnum = object_tab-qmnum . It show an error message like " This field can not be found in this table"
    Could you suggest me a solution for this
    Thanks

    Hi,
    Sorry for the wrong suggestion.  Please check the help of Include. It specifies as follows:
    Even if the structure rec that you want to define contains extra components, do not use
    DATA: BEGIN OF rec,
            INCLUDE STRUCTURE s.
    DATA:   ...
          END OF rec.
    Instead, use
    DATA: BEGIN OF rec,
            rec LIKE s,
          END OF rec.
    You can then address s as a substructure of rec.
    Note
    Although "INCLUDE STRUCTURE s." expands the substructure s into its components, its alignment remains unchanged. This means that there may be extra fields inserted as padding before the first component or after the last component of s within rec.

  • How to grant protection to data and not to structures containing the data?

    Dear All,
    I have a question regarding authorizations in BW. Maybe someone can give me a good advice.
    We have the following situation: a group of developers in BW should be able to develop and to "move" within BW without any limit or constriction. Another group of developers is not allowed to see some specific data, since they are sensible data from some external system regarding third party business. These data are contained in structures (Infocubes, DSOs, Multiproviders, ecc) all having the same naming convention, let´s say ZNVS*. Apart from that, they have exactly the same authorizations as the first group.
    I am able to restrict access to infoareas (and underlying objects) by means of authorization objects like S_RS_ICUBE, S_RS_ODSO, ecc. This was easy and it does work fine: the user is not able to see any of tha data contained in the protected objects.
    But, what if they tipp the DSO active data table name in SE11? They are able to get to the data. I know that i could link a table name to an authorization group and through the authorization group restrict the access to the table, but it is not realistic to think that it can be done for every new structure created in BW. 
    Now the question:: how can I avoid that? Is there any solution granting protection not to the data warehousing structure (dso, infocube, ecc) but to the data within the structure itself, no matter how i try to get to them?
    Hope, my question is clear.
    Thanks in advance
    Best regards
    Enrico
    Edited by: Dottblabla on Jun 3, 2010 2:42 PM

    Hi Brian,
    thanks for your answer.
    According to my knowledge and to my understanding analysis authorizationrefers to another issue. I am not talking about authorizing or not authorizing some user for some values or data when executing a query. I am talking about not authorizing those user to get access tho those protected data when developing in the BW system (i.e. by executing SE11 for DSO active table)
    Is my understanding of analysis authorization wrong?
    Thanks
    Best regards
    Enrico

  • None of the commnets or other type of annotations on this page are contained in the structure tree, getting this error on full check of adobe acrobat PDF

    none of the commnets or other type of annotations on this page are contained in the structure tree, getting this error on full check of adobe acrobat PDF

    You can find and tag the unmarked annotations using the Tags pane - click the down arrow next to
    the Options icon (near the top left of the pane), then Find > Unmarked Annotations. You will be given the option to tag the annotations - usually they are hyperlinks in which case use the link tag. Then you will need to create the proper tag stucture. Lots of information about that via google, for example the Adobe Acrobat X Professional: PDF Accessibility (Section 508 Tagging) Reference Guide (http://webtools.ca.gov/files/2010/07/acrobat_X_tagging-manual.docx)

  • Can the composition widget container be rotated?

    I designed a background image with a 2-point perspective. So I want to place my widgets at the angle of the perspective. Unfortunately, the accordian widget won't visually work for my purpose, but I think the Composition widget might. However, can the composition widget container be rotated so that it lies on an angle ? (like the accordion widget now can)  And can any of the widgets other than the accordian widget be rotated like that? I hope so! Thanks.

    Hi,
    The only other panel you can rotate same as the accordion panel is the tabbed panel. You can also rotate the State Button but I don't think that will be of any help to you.
    Regards,
    Aish

  • Illustrator CS2 error message : Can't open the illustration : The illustration contains an incomplet

    Hi,
    I am getting this message once in a while in Illustrator CS2 :
    Can't open the illustration : The illustration contains an incomplete or garbled object description.
    Offending operator ''Bg''
    Context :
    357.2139 668.8398L
    357.2139 669.8477L
    161.228 669.8477L
    Bb
    1 (Unnamed gradient 1) 0 0 0 1 1 0 0 1 0 0 Bg
    Is there something which is done wrong in illustrator to get this message ?
    What can prevent this to happen, because unable to open the document, the document is blank when opened ?
    Thanks in advance !

    We have tried both saving the files on our company server and on our individual desktops - neither of which will open the files.
    Fonts are ok - they are all created and saved in CS6.
    Printers, I believe are all correctly set up.
    We tried a complete reinstall on one PC - still running into the same random files ending up 'lost' with the same error message.
    Originally, the cs6 design standards (6 licenses total) were loaded to the server/shared drive and then downloaded onto each PC from there - we believe this may have something to do with the corruption, but this problem has just begun within the last month and the programs were all downloaded over 6 months ago.

  • ERROR! can't open the illustration. the illustration contains an illegal operand. Offending operator '((((((((((((((((((((((( 1Gm

    Hello, good people. Please help!
    I am working on a project that consists of one .ai file that contains 27, letter sized art boards.
    I am using Adobe cs5-Illustrator on a macbook pro.
    I have opened and closed and save this file many, many times—I have been working on this for the last 2+weeks.
    Today, when I tried to open the file I received an error message that read: "can't open the illustration. the illustration contains an illegal operand. Offending operator '((((((((((((((((((((((( 1Gm
    A screen shot of the entire message is below. Can anyone please help me to ward of this "offending operator?"
    Thank you in advance.

    AAhlene,
    It is strange that the offending operation is not shown in context within the message.
    Are you saving to your own harddisk( see below)?
    One thing often tried first is to create a new document and File>Place the (PDF contents, if any, of the) corrupted one to see how much may be rescued that way.
    Here are some websites where you can see whether it can rescue the actual file, and if it can, you may pay for a subscription to have it done,
    http://www.recoverytoolbox.com/buy_illustrator.html
    http://markzware.com/adobe-software/fix-illustrator-file-unknown-error-occurred-pdf2dtp-fi le-recovery/
    http://www.illustrator.fixtoolbox.com/
    As far as I remember, the first one is for Win and the second one is for Mac, while the third one should be for both.
    Here are a few pages about struggling with it yourself:
    http://daxxter.wordpress.com/2009/04/16/how-to-recover-a-corrupted-illustrator-ai-file/
    http://helpx.adobe.com/illustrator/kb/troubleshoot-damaged-illustrator-files.html
    http://kb2.adobe.com/cps/500/cpsid_50032.html
    http://kb2.adobe.com/cps/500/cpsid_50031.html
    http://helpx.adobe.com/illustrator/kb/enable-content-recovery-mode-illustrator.html
    External media: It is always recommended here to open/save from/to own hard disk, and to copy from/to networks and removable media. You may be lucky (for a while), but the chances of file corruption and other unpleasantnesses are immensely greater when you use anything but the harddisk, and it is better to be safe than sorry.
    In addition to the (far greater) risk of file corruption, some issues are mentioned here:
    http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html
    To have a network actually work may require some work.
    If you transfer by external means it is always safest to zip/compress the file to avoid corruption.

  • I am able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. How can I fix that?

    I am not able to download all the album I bought from itune store. The album contains 13 songs but 4 of them would not load up into my ipod. An error code will pop up notified me that "my Ipod cannot convert some of the file" How can I fix that?

    Hi there mayway3000,
    You may find the troubleshooting steps in the article below helpful.
    iPod does not play content purchased from the iTunes Store
    http://support.apple.com/kb/TS1510
    -Griff W.

  • Need to connect to upgraded Oracle EBS R12 version from R11. The current ODI set up is pointing to R11, Can i use the same connection to point to R12? Please hele experts..

    Need to connect to upgraded Oracle EBS R12 version from R11. The current ODI set up is pointing to R11, Can i use the same connection to point to R12? Please hele experts...
    Rp

    1. in physical connections part can i use the same work schema
    2. Can i use same contexts created or do i need to create everything as new and then try?
    Thanks,
    Rp.
    Hi,
    As you mentioned that you just upgraded the database, so the data is same and schema is same you can connect with the same work schema.
    Yes, you can use the same contexts , but need to do Reverse Engineering for your new database.
    And about data server, i think you also have no need to create new data server, if hostname,sid and port etc are same as these were with R11(consult with your DBAs regarding it)

  • Pages: how can I see the structure of a document?

    Hi, I'm a new user, I just bought my first mac last week.
    I have a problem with Pages. How can I see the structure (organization) of the document I'm working on? I mean headings, headings 2, etc? In Microsoft Word you see it on the left. I don't mean thumbnails, but the construction of the document.
    I know how to mark headings and other parts of a typical document but how can I see the structure afterwards?
    Thanks in advance.

    What you are asking for is Outlining, and that has been removed from Pages 5.2 along with 110 other features.
    Use Pages '09 if you can.
    Peter

Maybe you are looking for

  • IDOC AAE error:IDOC_ERROR_PARSE_FAILURE

    Hello Gurus, I am facing following error in IDOC AAE channel scenario is SOAP to IDOC we are using Integrated configuration.I have mapped all the attributes in the IDOC to 1 and date formats are fine.On Analsys i found for the IDOC Field MENGE is not

  • HT1688 i want to unlock my iphone4 at&t how can i do???

    hello i need your help , last year i received an iphone 4 att as a gift from the usa,but i can not use it here in Morocco,i need to unlock it but i can not contact at&t cuz i can not have an account cuz i'm not american,some help please !!

  • BEA Portal 7.0 configure to use ActiveDirectoryAuthenticator

    Hi Folk: Could anyone have any ideas how or show me the documentation where I can change the Sample Portal Server to use a different Realm in the Portal Server ? I have read the portal server is by default using Database Realm, which config file and

  • Why is the ad blocker not blocking pop up ads

    Every time i open up safari i keep getting this mac keeper pop up add and other pop up ads my ad blocker is enabled but it doesn't block all the ads. Please help!

  • Debugging Shopping Cart / Floor Plan Manager

    Hello, I am trying to debug the shopping cart in SRM 7. In step 2 there is a button 'check' and I am looking for the eventhandler  of this event. In the floorplanmanager i found out that the component in this step is /sapsrm/wdc_sc_wz_gaf_2st. In the