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. Windows API
  4. Windows CreateFile() api failed with error code 1397 or 1238

Windows CreateFile() api failed with error code 1397 or 1238

Scheduled Pinned Locked Moved Windows API
helpcomdata-structuresjsonannouncement
5 Posts 2 Posters 16 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.
  • M Offline
    M Offline
    Member 10483480
    wrote on last edited by
    #1

    Hello, I am having a HP laptop (Probook 6470b) with Windows 7 configuration and BroadCom stack (Driver Version : 6.5.1.1785). Windows CreateFile() API fails with error code 1397 or 1238 while trying to connect a device via serial COM port over Bluetooth. I am having an administrator account and antivirus has not been installed over laptop, all the data transfer happens through Bluetooth only. Application receives valid COM port still problem occurs. Request you to plz help me. . .. . Regards, Nilam

    L 1 Reply Last reply
    0
    • M Member 10483480

      Hello, I am having a HP laptop (Probook 6470b) with Windows 7 configuration and BroadCom stack (Driver Version : 6.5.1.1785). Windows CreateFile() API fails with error code 1397 or 1238 while trying to connect a device via serial COM port over Bluetooth. I am having an administrator account and antivirus has not been installed over laptop, all the data transfer happens through Bluetooth only. Application receives valid COM port still problem occurs. Request you to plz help me. . .. . Regards, Nilam

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

      ERROR_CONNECTION_COUNT_LIMIT
      1238 (0x4D6)
      A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.

      ERROR_MUTUAL_AUTH_FAILED
      1397 (0x575)
      Mutual Authentication failed. The server's password is out of date at the domain controller.

      I don't see any connection to CreateFile() in these; are you sure that is where the error occurrs? Perhaps you should show what it is you are trying to create or open with this call.

      Veni, vidi, abiit domum

      M 1 Reply Last reply
      0
      • L Lost User

        ERROR_CONNECTION_COUNT_LIMIT
        1238 (0x4D6)
        A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.

        ERROR_MUTUAL_AUTH_FAILED
        1397 (0x575)
        Mutual Authentication failed. The server's password is out of date at the domain controller.

        I don't see any connection to CreateFile() in these; are you sure that is where the error occurrs? Perhaps you should show what it is you are trying to create or open with this call.

        Veni, vidi, abiit domum

        M Offline
        M Offline
        Member 10483480
        wrote on last edited by
        #3

        Hello Richard, Thanks for your response. .. . :-D I have called GetLastError() API incase CreateFile()API fails, and through this only i get to know these error codes (1397 / 1238). I have done upgradation of Broadcom driver, but still facing the same problem. :( If i do the retry in a loop over CreateFile() API then it succeddes. But not able to get passed this API in 1st attempt only, which results into slower performance. Requesting you support . .. plz help . . .

        L 1 Reply Last reply
        0
        • M Member 10483480

          Hello Richard, Thanks for your response. .. . :-D I have called GetLastError() API incase CreateFile()API fails, and through this only i get to know these error codes (1397 / 1238). I have done upgradation of Broadcom driver, but still facing the same problem. :( If i do the retry in a loop over CreateFile() API then it succeddes. But not able to get passed this API in 1st attempt only, which results into slower performance. Requesting you support . .. plz help . . .

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

          But what is the name of the file that you are trying to open? Please provide full details of your code and your data.

          Veni, vidi, abiit domum

          M 1 Reply Last reply
          0
          • L Lost User

            But what is the name of the file that you are trying to open? Please provide full details of your code and your data.

            Veni, vidi, abiit domum

            M Offline
            M Offline
            Member 10483480
            wrote on last edited by
            #5

            Hello, I am trying to open a device over serial port using windows bluetooth api's. Following is the code snippet : BluetoothFindFirstRadio(&m_bt_find_radio,&m_radio); . . . BluetoothAuthenticateDevice( NULL, m_radio, &m_device_info, L"PASSKEY", SEVEN ); . . //m_device_info.Address contains the bluetooth address in the format "AA:BB:CC:DD:EE:FF" . . BluetoothSetServiceState( NULL, &m_device_info, &SerialPortServiceClass_UUID, BLUETOOTH_SERVICE_ENABLE ); If authentication fails then tried retry for 3 times. . . /* Logic has been implemented to find the com port created by BluetoothSetServiceState(. .. ) api. * / . . CreateFileA ( (LPCSTR)szComPortStr, GENERIC_READ | GENERIC_WRITE, NULL, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL ); szComPortStr is having the format : " \\\\.\\%s" where %s specifies the port number. If CreateFileA() fails then tried retry for 3 times. The CreateFileA() api fails for several times and works sometimes with same implementation. Thus the api shows unexpected behavior, resulting into application performance issue.

            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