Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7595355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:39:09+00:00 2026-05-30T21:39:09+00:00

In this sample,the dwerror is 10045L .but this code returns 0x13d value as error.

  • 0

In this sample,the dwerror is 10045L.but this code returns 0x13d value as error.
How to get the format message?Please have a look into it.

TCHAR lpMsgBuf[512];
if(!FormatMessage(
    FORMAT_MESSAGE_ALLOCATE_BUFFER | 
    FORMAT_MESSAGE_FROM_SYSTEM,
    NULL,
    dwError,
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
    (LPTSTR) &lpMsgBuf,
    0, NULL ))
{
    wprintf(L"Format message failed with 0x%x\n", GetLastError());
    return;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:39:11+00:00Added an answer on May 30, 2026 at 9:39 pm

    0x13d == 317 == ERROR_MR_MID_NOT_FOUND.
    The message for the error you’re trying to find doesn’t exist in SYSTEM.
    Maybe your error originate from a specific dll or driver.
    If you know which dll\driver try to abtain it handle and specify FORMAT_MESSAGE_FROM_HMODULE instead of FORMAT_MESSAGE_FROM_SYSTEM and supply the handle as the source in the call to FormatMessage.

    And besides that if you use FORMAT_MESSAGE_ALLOCATE_BUFFER you should declare a variable of type LPTSTR like LPTSTR pMsg; and pass it to FormatMessage as (LPTSTR)&pMsg and when you’re done with it use LocalFree(pMsg) to release the allocated memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this sample code where I'm defining an array but it doesn't compile:
I've written this sample code to print the length of x. But for some
I have this sample code for async operations (copied from the interwebs) public class
With this sample code, the activity is told to finish, but continues execution afterwards
I have this sample code for converting 32 bit integers to ip addresses. #include
I have this sample code. List<Dictionary<string,string>> objects = new List<Dictionary<string,string>>(); foreach (string url in
I follow this sample http://trac.osgeo.org/proj/wiki/ProjAPI but if I try to import this code in
I have this sample code which generates the following warning (VS2008 compiler with SP1):
I have this sample code: struct A { bool test() const { return false;
Say i have this sample XML. <result> <field k='field1'> <value h='1'><text>text_value1</text></value> </field> <field k='field2'>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.