Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. LoadInstanceString failed in Windows7 Operating System.

LoadInstanceString failed in Windows7 Operating System.

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelp
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    janaswamy uday
    wrote on last edited by
    #1

    Hi All, The Api LoadInstanceString(..) is Failed it is giving an Empty String in Windows7 Operating system. code. ----- CString strTemp; ::LoadInstanceString(IDS_MSG_NODBQLPLANS, strTemp); AfxMessageBox(strTemp); Help me out. Thanks & Regards, uday

    L 1 Reply Last reply
    0
    • J janaswamy uday

      Hi All, The Api LoadInstanceString(..) is Failed it is giving an Empty String in Windows7 Operating system. code. ----- CString strTemp; ::LoadInstanceString(IDS_MSG_NODBQLPLANS, strTemp); AfxMessageBox(strTemp); Help me out. Thanks & Regards, uday

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I cannot find any reference to LoadInstanceString() in MSDN, is this a standard part of the Windows API?

      The best things in life are not things.

      J 1 Reply Last reply
      0
      • L Lost User

        I cannot find any reference to LoadInstanceString() in MSDN, is this a standard part of the Windows API?

        The best things in life are not things.

        J Offline
        J Offline
        janaswamy uday
        wrote on last edited by
        #3

        Hi, I am Sorry ::LoadString(HINSTANCE hInst,UINT uid,LPWSTR,int len) Api is been Failed. Code ---- _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); ---> Here the Code is been Failed for Windows7 O.S. strMsg.Format(_T("%s"),buffer); help me out. Thanks & Regards, uday.

        modified on Tuesday, June 7, 2011 6:48 AM

        L 3 Replies Last reply
        0
        • J janaswamy uday

          Hi, I am Sorry ::LoadString(HINSTANCE hInst,UINT uid,LPWSTR,int len) Api is been Failed. Code ---- _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); ---> Here the Code is been Failed for Windows7 O.S. strMsg.Format(_T("%s"),buffer); help me out. Thanks & Regards, uday.

          modified on Tuesday, June 7, 2011 6:48 AM

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Hi, try to call GetLastError() and take a look to the error, can be usefull.

          J 1 Reply Last reply
          0
          • J janaswamy uday

            Hi, I am Sorry ::LoadString(HINSTANCE hInst,UINT uid,LPWSTR,int len) Api is been Failed. Code ---- _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); ---> Here the Code is been Failed for Windows7 O.S. strMsg.Format(_T("%s"),buffer); help me out. Thanks & Regards, uday.

            modified on Tuesday, June 7, 2011 6:48 AM

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            I have just tried that and it works fine. Use the debugger to step through your code and check the values of all your parameters to see why it is failing.

            The best things in life are not things.

            1 Reply Last reply
            0
            • L Lost User

              Hi, try to call GetLastError() and take a look to the error, can be usefull.

              J Offline
              J Offline
              janaswamy uday
              wrote on last edited by
              #6

              _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); strMsg.Format(_T("%s"),buffer); While i was running the application in WindowXP the Api is Working. But when it is Window7 O.S the buffer is Empty. There is no error. Thanks uday

              D 1 Reply Last reply
              0
              • J janaswamy uday

                Hi, I am Sorry ::LoadString(HINSTANCE hInst,UINT uid,LPWSTR,int len) Api is been Failed. Code ---- _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); ---> Here the Code is been Failed for Windows7 O.S. strMsg.Format(_T("%s"),buffer); help me out. Thanks & Regards, uday.

                modified on Tuesday, June 7, 2011 6:48 AM

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                janaswamy uday wrote:

                I am Sorry
                 
                ::LoadString

                A suggestion: when adding code to your question use copy and paste so the exact code from your program shows in the question.

                The best things in life are not things.

                1 Reply Last reply
                0
                • J janaswamy uday

                  _TCHAR buffer[2048]; LoadString(h, nResId, buffer, 2048); strMsg.Format(_T("%s"),buffer); While i was running the application in WindowXP the Api is Working. But when it is Window7 O.S the buffer is Empty. There is no error. Thanks uday

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  janaswamy uday wrote:

                  There is no error.

                  So LoadString() is returning a non-zero value?

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups