Why EvtRender return 1 but GetLastError()==0?

This is blocking me. I am using below to get the buffer size:
bRet = EvtRender(
        hContext,
        hEvent,
        EvtRenderEventValues,
        0,
        NULL,
        &dwBufferUsed,
        &dwPropertyCount);
I expect:
  bRet != ERROR_SUCCESS && GetLastError() == ERROR_INSUFFICIENT_BUFFER
  dwBufferUsed > 0
Actual:
 bRet == 1 && GetLastError() == 0
 dwBufferUsed = 0
Any idea why this function does not work as spec-ed on MSDN? Appreciate any help!

If EvtRender returns true (value "1") than the function was successful, therefore GetLasError is 0 (means no error detected)
See here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa385471(v=vs.85).aspx
Keep in mind, EvtRender returns a BOOL value, True =1, False = 0.
Best regards
Bordon
Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

Similar Messages

  • My ipod starts voicing song data, artist data, and playlist data while I am listening to music.  Is this a feature or a defect?  I do not know why it occurs, but the only way to stop it is to stop the music then play the playlist again.

    My ipod starts voicing song data, artist data, and playlist data while I am listening to music.  Is this a feature or a defect?  I do not know why it occurs, but the only way to stop it is to stop the music then play the playlist again.

    To make sure voiceover is off, you need to go to summary screen then click the "Configure Universal Access" button. Then you will get a dialog where you can make sure voiceover is off. All of the boxes in the dialog should be unchecked.
    i

  • HT201274 I have erased my Ipad remotely thinking it was stolen.  It has now been returned, but I don't want to switch it on and erase all information.  Can I reverse the erase?  If not, how do I restore the info?

    I have erased my Ipad remotely thinking it was stolen.  It has now been returned, but I don't want to switch it on and erase all information.  Can I reverse the erase?  If not, how do I restore the info?

    You can't reverse the erase.
    Restore from your iTune or iCloud backup.

  • I have been having trouble getting my email on my iPad. It started when I brought it to the US on vacation (I live in London and my email provider is Virgin Media). It worked once since I returned, but that is it. I can send emails, but can't get them

    I have been having trouble getting my email on my iPad2.
    It started when I brought it to the US on vacation (I live in London and my email provider is Virgin Media). It worked once since I returned, but that is it.
    I can send emails, but can't get them.
    Any ideas, people?

    Hi Kharels
    Just posted this reply to 2 others with same sort of question:
    I have the same issue as i have my own email address and only want to use.
    There are two ways around this annoying problem. The first is to set up your own domain email account alongside your iCloud one, and when you go to send each email tap on From and you get a choice of emails addresses to reply from... ie your own domain or the iCloud one.  This is tedious though.
    The other is to set up your iCloud email as normal, then create a new one altogether. Choose 'Other' when creating this new account. Then put for the incoming server mail.me.com, along with your user name and password. For the outgoing server put the server you want to use - ie your own domain one. This is therefore a hybrid account and does work.
    Now switch off the email for iCloud (leaving on Calendar, Address Book etc). Switch on the email for your hybrid account (which of course is iCloud incoming as well).
    Providing you have directed your own domain email address to your me.com one, you will find the iPhone should behave itself and you can use the folders etc and these will synch with your Mac ok.
    Hope this work for you - let us know.
    Simon

  • 27" iMac was stolen, now returned but has been locked what do I do?

    My 27' iMac was stolen, now returned but has been locked what do I do? It was purchased in December of 2011, they nust have set up icloud account to lock it. How do I get around this? Apple should have my serial number of this computer matching my account somewhere right?

    What do you mean by 'locked'. Is it the admin password that you don't know or did they set a firmware password?

  • Is there any where that I can voice why I returned my beloved new Ipad? I was told I could move my Keynote presentations to it and then use it for my business presentations. Unfortunately that turned out to not be true. I need the IPad to work with a remo

    Is there any where that I can voice why I returned my beloved new Ipad? I was told I could move my Keynote presentations to it and then use it for my
    business presentations. Unfortunately that turned out to not be true. I need the IPad to work with a remote.
    The Ipad is on a short cable to my projector. I am usually on a podium 30 feet away. No infra red receiver on the IPad and
    the Iphone remote needs wi fi which is not always available in all the locations I do my teaching and lecturing in.
    If you can build a remote into the Ipad in the future I would really like to use an Ipad to replace my heavier lap top for business travel. Thank You Kathy McNeil.

    "The Ipad is on a short cable to my projector."
    Get a longer cable?

  • New to Macbook Air. Screen suddenly expands to 4-500% for no apparent reason. Have to use back arrow to return but lose what I've been typing. What am I doing to cause this?

    New to Macbook Air. Screen suddenly expands to 4-500% for no apparent reason. Have to use back arrow to return but lose what I've been typing. What am I doing to cause this?

    Next time you want to put your iMac screen to sleep, try switching off the Magic Mouse, wait for the notification to come up on the screen telling you the Magic Mouse has been disconnected, wait for it to disappear then press the keyboard shortcut to put the screen to sleep. See if that helps and we'll go from there. If that doesn't help, can you just say wether the screen always turns back on the same time every time?
    Hope that helps
    David

  • Create return but linked to original sales order where the material was delivered in the first instance

    Hi Everyone
    I want to create return but linked to original sales order where the material was delivered in the first instance, I don’t want to create other sales order (to return) with references to the original, and then other sales order to be delivered again (replacement).
    Example
    SALES
    1. Create a sales order number 33 with 10 Ton
    2. The delivery is linked to sales order 33 just with 8 Ton
    3. Invoice is created linked to the delivery with 8 Ton
    4. Sales order number 10 pending qty is 2 Ton
    RETURN
    5. We would like to link the return delivery to the sales order, 5 Tons will be retuned
    6. Credit memo is created
    7. Sales order number 10 pending qty update to 7 Ton

    The only way is to change the item categories in the delivery.
    Create the delivery wrt the original sales order.
    Change the item category(In the config make sure the return is checked)- But I think you need to do some changes in the user exit to enable the item category in the delivery)..
    The other option is to have a return order document(type RE) and then create the return delivery for this document. In the copy controls you can maintain the return item categories while creating the return order from sales order..
    Thanks

  • I was trying to make a purchase from Amazon & a return but FIREFOX would not let me open drop down boxes in the purchase & return areas. I was forced to use IE to accomplish the deed. Can you investigate the problem?

    I was trying to make a purchase from Amazon & a return but FIREFOX would not let me open drop down boxes in the areas. I was forced to use IE to accomplish the deed. Can you investigate the problem? Thanx, David Deters

    Thanks for the welcome Karsten! I’ve checked the installer disks – which appear to have all the main pieces of software, but not iDVD. If you or anyone knows where it might be hidden that would be great. Thanks for all the other info too!
    Thanks Lennart – I don’t think my computer could support iLife ’05 as it is running Mac OSX 10.3.2 and I’ve just been looking at its system requirements which state it requires 10.3.4 minimum – if you know differently, please let me know. As an alternative I have considered getting iLife ’04, but your comment about iLife ’05 being the first version to support external drives worried me (“iDVD 5 is the first iDVD version that officially supports external burners“ does this mean there is an unofficial option for iLife ‘04? Perhaps a patch similar to the one mentioned by Karsten), does that mean iLife ’04 would not support an external Lacie DVD writer?
    What is the earliest version of Toast I’d be able to use (as a money saving option!)?
    Thank you both, and apoligies for my amateurish questions…
    Kevin.

  • I have a very complex problem. i am trying to print my tax return but my hp photosmart c309a series

    Trying to print my tax return but instead of printing - it brings up Set Up Fax.  I don't want the fax, never use it.  It only does this with my etax return.  I ask to print and it brings up the fax set up.  HP C309a series.  And this is what I select to print.  What the! Please help anyone?

    fandrich,
    This article should help resolve your blank pages:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01892627&cc=us&dlc=en&lc=en
    Give the steps listed under your operating system a try and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Why CreateNewFrame() returns as NULL after successful created 136 child frame window and trying to create 137th child frame window in MDI application

    I am working on MDI application which was developed in VC++ in VS 2012. When my application is launched, it will display a Tree. Under a tree there are 254 nodes. Basically
    these nodes data are read from Configuration xml file and loaded into the Tree. By double clicking on each node, first it will create object for document class ( By calling CreateNewDocument() method) after that member variables for that
    document class will be initialized and then it will create the new frame window (by calling
    CreateNewFrame(pDoc,NULL). New child frame window will show under Main window to the user.
    User able to see the data from child frame window.
    Similarly by double clicking on each node it will create another object for the same document class and new child frame window will be opened for that node. Each child frame window runs
    in different data and showed under the Main window.
    Existing requirement by double clicking on each node, node data shall show in separate child window and there is no requirement for all 254 child windows opened simultaneously.
    But current requirement is , all 254 child windows shall open simultaneously by double clicking on each node one by one.
    In debug mode I have tried double clicking on each node. I able to open up to 50 nodes. After 50th child windows are opened, I unable to access to the application
    (Unable to open further node data window since application is getting hanged).
    Each child window is having tree, multiple splitter window and some additional controls (static text, ...).
    Same I have tried in release mode, I able to open up to 136 child windows. After that the application fail to create the new frame window in VS 2012. i.e CreateNewFrame() return
    NULL after successful created 136 child frame window. Debug purpose I have added the code to retrieve last error code by calling GetLastError() method. I got the value as "0". By closing any existing child window then I able to open remaining nodes.
    At any point of time I can reach maximum of 136 child frame window that can be opened under Main window. Failing to open all 254 child frame window
    simultaneously,  currently I fail to meet the current requirement.
    current Requirement is all 254 child frame window are opened simultaneously. Please let me know what may be the reason fail to create new frame window after 136 frame window that are
    opened already. In Microsoft site, mentioned that there is no limitation for creating frame  window in MDI application. I have tried another sample MDI application having limited number of controls, in which I able to create "n"
    number of child frame windows. why not able to create more than 136 child frame window in my actual application?
    Is there any possibility by changing project settings allow me to create 254 child frame window??
    Code Snippet as below:
    CDiagBaseDoc * CDiagBaseMDocTemplate::OpenDiagView( ...)
         CDiagBaseDoc* pDoc = NULL;
        if (pDoc == NULL)
            pDoc = (CDiagBaseDoc*)CreateNewDocument();
        if ( pDoc )
           CFrameWnd* pFrame = NULL;
           if (bAlreadyOpen)
                  // If Child frame window already opened, then handling the code here.
         else
               pFrame = CreateNewFrame(pDoc, NULL);
               if (pFrame == NULL)
                  ASSERT(FALSE);
                  delete pDoc;       // explicit delete on error
                 pDoc = NULL;
              ASSERT_VALID(pFrame);
              if( pDoc != NULL ) //VS2012
                 if ( !pDoc->OnNewDocument() )
                    TRACE0("CDocument::OnNewDocument returned FALSE\n");
                    delete pDoc;       // explicit delete on error
                    pDoc = NULL;
                    pFrame->DestroyWindow();
                     pFrame = NULL;
           if (pFrame)
               InitialUpdateFrame(pFrame, pDoc);
               ShowWindow( pFrame->GetSafeHwnd(), SW_MAXIMIZE ); //when opening node for the 1st time, maximize it
    }<o:p></o:p>

    Hi MuruganK,
    Have you checked how much memory your application used? You could check it by Task Manager. Maybe your application reach Memory Limits for Windows.
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    Is it possible that there are some memory leaks in your application? It would better if you have made a simple sample to reproduce and narrow down this issue.
    Best regards,
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Why Date() return local and GMT time intermixturely

    I have following code in my Java application:
    Date dt = new Date();
    System.out.println("Local Time: " + dt.toString());
    I got local date (CST) at most time. But I got GMT format date few times within hours' running by the same code and the same running, which will crash my DateFormate later.
    Can anyone tell me why this happened? Is there any way I may use to make sure of that "new Date() will return only one date format, local or GMT"?
    Thanks.

    Do appreciate of your reply. In my application, I do use new Date() and DateFormat.format() like you suggested. But I caught following exception. Then I use Date.toString() to test Date and found that " new Date() return local time (CST time) and GMT time intermixturely". Most time, my application got CST time string and my SimpleDateFormat("yyyy.MM.dd' 'HH:mm:ss:SSS") works well. But few times a running, new Date() return a GMT time string, then I got following exception. I was confused by why one statement "Date dt = new Date();" in one running return both CST and GMT time.
    java.lang.IllegalArgumentException
         at java.util.SimpleTimeZone.getOffset(SimpleTimeZone.java:427)
         at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1173)
         at java.util.Calendar.complete(Calendar.java:1058)
         at java.util.Calendar.get(Calendar.java:916)
         at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:481)
         at java.text.SimpleDateFormat.format(SimpleDateFormat.java:410)
         at java.text.DateFormat.format(DateFormat.java:305)

  • I don't understand why eclipse returns this ...

    Hi,
    i'm trying to write a program to keep trace of how many money every player has at a poker game...
    now i try to do the next :
    public static void main(String[] args) {
              ArrayList<String> spelerNaam = null;
              ArrayList<Integer> spelerGeld = null;
              int pot = 0;
              int smallblind = 0;
              int buyin = 0;
              Spel testje = new Spel(spelerNaam, spelerGeld, pot, buyin, smallblind); // here i start a new game. "spel" is dutch for game.
              //now i try to add a new player...
                    Spel.addSpeler( Mike , 1000 ) //it constantly tells me to change the class i'm using to a static ... wich isn't what i want
                   // the same goes for the menu() class ... i can't seem to get it to work! HELP PLZ !!! i'm going nutz!
    import java.io.*;
    import java.util.*;
    class Spel {
         InputStreamReader isr = new InputStreamReader(System.in);
         BufferedReader in = new BufferedReader(isr);
         protected ArrayList<String> spelerNaam;
         protected ArrayList<Integer> spelerGeld;
         protected int pot;
         protected int smallblind;
         protected int buyin;
         public static void main(String[] args) {
              ArrayList<String> spelerNaam = null;
              ArrayList<Integer> spelerGeld = null;
              int pot = 0;
              int smallblind = 0;
              int buyin = 0;
              Spel testje = new Spel(spelerNaam, spelerGeld, pot, buyin, smallblind);
              String jeroen;
         public Spel(ArrayList<String> spelerNaam, ArrayList<Integer> spelerGeld,
                   int pot, int buyin, int smallblind) {
              this.spelerNaam = spelerNaam;
              this.spelerGeld = spelerGeld;
              this.pot = pot;
              this.buyin = buyin;
              this.smallblind = smallblind;
         // speler toevoegen
         public void addSpeler(String naam, int geld) {
              spelerNaam.add(naam.toLowerCase());
              spelerGeld.add(geld);
         // spelerGeld opvragen
         public int getGeld(String naam) {
              int geld = 0;
              naam = naam.toLowerCase();
              int pos = spelerNaam.indexOf(naam);
              if (pos == -1) {
                   System.out.println("speler niet gevonden");
              } else {
                   geld = spelerGeld.get(pos);
              return geld;
         // spelerGeld aanpassen
         public void setGeld(String spelerNaam, int geldAanpassing) {
              int pos = spelerNaam.indexOf(spelerNaam);
              if (pos != -1) {
                   System.out.println("pos =" + pos);
              } else
                   System.out.println("not found");
         // aan spelerGeld toevoegen
         public void addToGeld(String spelerNaam, int geldderbij) {
              int totaal = 0;
              int pos = spelerNaam.indexOf(spelerNaam);
              if (pos == -1) {
                   System.out.println("Speler niet gevonden");
              } else
                   totaal = spelerGeld.get(pos) + geldderbij;
              spelerGeld.set(pos, totaal);
         // small blind aanpassen
         public void setSmallblind(int smallblind) {
              this.smallblind = smallblind;
         // pot aanpassen
         public void setPot(int pot) {
              this.pot = pot;
         // aan pot toevoegen
         public void addToPot(int derbij) {
              this.pot += derbij;
         // toon het hoofdmenu
         public void menu() throws IOException {
              int fout = 0;
              int getal = 0;
              String speler = "";
              System.out
                        .println("Hoofd Menu \n\t1. Nieuwe Small Blind \n\t2. Rebuy \n\t3.  Nieuwe Speler  ");
              int optie = -1;
              optie = Integer.parseInt(in.readLine());
              switch (optie) {
              case '1':
                   System.out.println("\n nieuwe Small Blind: ");
                   getal = Integer.parseInt(in.readLine());
                   setSmallblind(getal);
                   break;
              case '2':
                   System.out.println("\n wie wil er rebuyen?");
                   speler = in.readLine();
                   System.out.println(" voor hoeveel geld? (Buy-in = " + buyin);
                   getal = Integer.parseInt(in.readLine());
                   addToGeld(speler, getal);
                   break;
              case '3':
                   System.out.println("\n wie wil er bij?");
                   speler = in.readLine();
                   System.out.println(" met hoeveel geld? (Buy-in = " + buyin);
                   getal = Integer.parseInt(in.readLine());
                   addSpeler(speler, getal);
                   break;
              default:
                   System.out.println("\n foute invoer!");
                   menu();
                   break;
    }

    pff i got sick of it so i started all over again ...
    i wrote it in English this time.
    got it working now...
    except for 1 thing:
    i'm trying to save the games to a .txt file
    so i'd be typing the next:
    myPokerGame.saveGame()and here's the saveGame() method :
    it creates the .txt files just fine but they stay empty ... there's no data printed to them! why?
    public void saveGame() throws IOException {
              InputStreamReader isr = new InputStreamReader(System.in);
              BufferedReader in = new BufferedReader(isr);
              // displays what and how it's going to save it in the text file
                    //this gives the exact things i want to write... they show up just fine
              System.out.println(getBuyin());
              System.out.println(getSmall());
              System.out.println(getBig());
              int y = 0;
              for( y = 0; y < players.size(); y++){
                   System.out.println(players.get(y).name);
                    // i ask the user under what name he wants to save the game (for example "FirstGame")
              System.out.println("Save Game as : ");
              String filename = in.readLine();
              PrintWriter saveit = new PrintWriter(new FileWriter("savedgames.txt"));
              // creates a file "savedgames.txt" --> i can find this in the directory
              saveit.print(filename);
              // here it should print "FirstGame" to the "savedgames.txt" file but the file stay empty! why?
              PrintWriter des = new PrintWriter(new FileWriter(filename+".txt"));
              // creates "FirstGame.txt"
              // the next line should print all the data to the file but it also stays empty! why?
              des.println(getBuyin());
              des.println(getSmall());
              des.println(getBig());
              int z = 0;
              for( z = 0; z < players.size(); z++){
                   des.print(players.get(z).name);
         }

  • Why WHO_CALLED_ME return me ANONYMOUS BLOCK ?

    I would like to know the name of the current of stored procedure with the name of the package.
    So I use OWA_UTIL.WHO_CALLED_ME function but it returns ANONYMOUS BLOCK and not "PROCEDURE" and the name of my procedure.
    Do you know why ?
    Example :
    create or replace
    PACKAGE BODY     RDF_UTILS AS
       PROCEDURE T1
       IS
             owner varchar2(30);
             nom varchar2(200);
             lineno number;
             caller_t varchar2(200);
       BEGIN
            sys.DBMS_OUTPUT.PUT_LINE (sys.DBMS_UTILITY.FORMAT_CALL_STACK);
            sys.DBMS_OUTPUT.NEW_LINE();
            sys.DBMS_OUTPUT.NEW_LINE();
            sys.OWA_UTIL.WHO_CALLED_ME(owner, nom, lineno, caller_t);
            sys.DBMS_OUTPUT.PUT_LINE('owner ='||owner||'name = '||nom||'lineno = '||lineno||'caller_t = '||caller_t);
       END;
    END RDF_UTILS;

    Because that's the way it works.I thought we were all making a concerted effort not to post sarcastic one-liners.
    @sed: The who_called_me function is intended to return the user who called your function / procedure, not the immediate caller of the 'who_called_me' function.
    Perhaps Tom Kyte's original post will be of help (compare with the who_am_i function).
    http://asktom.oracle.com/tkyte/who_called_me/
    http://asktom.oracle.com/tkyte/who_called_me/who.sql

  • Bapi_goodsmvt_create: no error return, but no document created!

    Hi guys!
    I have i weired problem.
    I'm using the bapi_goodsmvt_create to create a goods receipt document for a standard order.
    The simulation works fine, no error or warning return, the bapi_goodsmvt_create  without simulation flag works fine, bapi_transaction_commit returns no error as well, BUT: the document was not created.
    Any idea about the problem?

    Commit the work ..
    This code might help u
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header       = wa_header
          goodsmvt_code         = wa_gm_code
        IMPORTING
          goodsmvt_headret      = tbl_export
          materialdocument      = matdoc
          matdocumentyear       = year
        TABLES
          goodsmvt_item         = tbl_item
          goodsmvt_serialnumber = tbl_serial
          return                = return.
      WRITE AT 10 'STATUS OF BAPI UPLOAD' COLOR 2 INTENSIFIED ON .
      SKIP 2.
      LOOP AT return ASSIGNING <fs_return>.
        IF <fs_return>-type EQ 'E'.
          WRITE AT 10 'Error in function:' COLOR 6 INTENSIFIED OFF.
          WRITE AT 28 <fs_return>-message .
          SKIP 1.
          err_flag = 'X'.
        ELSE.
          WRITE AT 10 <fs_return>-message .
          SKIP 1.
        ENDIF.
      ENDLOOP.
      IF err_flag IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        IF sy-subrc NE 0.
          WRITE:/ 'Error in updating'.
          EXIT.
        ELSE.
          WRITE:/
    'Number of Material Document created through BAPI:',tbl_export-mat_doc.
          WRITE:/ 'Material Document Year':, tbl_export-doc_year.
        ENDIF.
      ENDIF.

Maybe you are looking for

  • Is there any way to achieve dynamic end point in SOA 11g (non-AIA process)

    Hi, We are using SOA Suite 11.1.1.5.0 and we are not using AIA product..Is there any mechanism to achieve dynamic end point?If so can you please tell me how we can achieve this. Thanks in advance.

  • Extremely Urgent - Problem with delimited output

    Report looks fine in the live previewer. But when I generate to file with tab or comma delimited, I only get the first two coloumns out of the 34 columns I got. Any idea what is going on ? I am using reports 6i(6.0.8.8.3) on windows 2000 Thanks in ad

  • Watching music videos from iPad to tv

    I have a new Vizio Razor LED LCD HDTV and want to watch music videos I've purchased from iTunes currently located on my iPad on the TV.  The TV has a USB port.  Is there any way I can copy the files to a jump drive?  I don't want to hook my iPad up d

  • Make Flash player window full screen automatically, when it's opening

    Hi, all. It's today I joined Adobe forums so, I don't know much about community guidlines and functionality here. So, pardon me if I do any mistake or something. This is my problem... I'm creating an interface with Adobe Flash Catalyst and I want it

  • Time series chart doesn't work

    I am trying to create a simple time series chart, plotting five time series over a 5 year period. I have a table with the time series in rows, but when I select the chart to graph it, the data appears as if the time series is in the columns! Then, wh