Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Error 30 from call to OS_GetComputerName

  1. #11
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Cool

    Hi Brian,

    did you already check if there is something special, uncommon, in the computer name (no name at all or foreign chars...) and in the way your app is launched (virtualization, os, path...) ?

    Because if it worked anywhere before, the problem is unlikely in your code.

    Regards.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  2. #12
    We were able to get the user to send us this:
    Screenshot 2021-02-28 093213.png

    Looks like a pretty normal computer name of "Home-1".

    I tried setting my computer's name to "Home-1" and could not reproduce the problem.

    As far as the way the app is launched - they download a zip file of the .exe (bundled) application, unzip it, then double click on the .exe to run the app. It is not being run in a virtualized environment.

    It has never worked before on this user's machine, but has worked on many other user's machines.

    Clearly there is something 'different' with this user's machine, but they are non-technical and it will be up to us to hold their hand to figure out what it is. So far we don't even have any ideas on what to ask them to check for.

    THanks for all your help everybody -
    *Brian

  3. #13
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Lightbulb

    On the provided screenshot, it looks like there's a space char before the "1"

    Quote Originally Posted by EmbeeddedMan View Post
    Looks like a pretty normal computer name of "Home-1".

    I tried setting my computer's name to "Home-1" and could not reproduce the problem.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  4. #14
    I'm unable to test that because spaces aren't allowed as part of the Computer Name. So Windows won't let me rename my computer to a name which includes a space.

    If this user did name their computer a name with a space somehow, they didn't use the normal "Rename your PC" method.

  5. #15
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Clue

    You may not, but the user is
    able to rename it without a space.

    Quote Originally Posted by EmbeddedMan View Post
    I'm unable to test that because spaces aren't allowed as part of the Computer Name. So Windows won't let me rename my computer to a name which includes a space.

    If this user did name their computer a name with a space somehow, they didn't use the normal "Rename your PC" method.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  6. #16
    Quote Originally Posted by DirectuX View Post
    You may not, but the user is
    able to rename it without a space.
    Very good point. We will suggest that to them if they continue to have issues.

    Thanks for the suggestion.

    *Brian

  7. #17
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Hi Brian,

    I'm not sure error occurs due to OS_GetComputerName function.
    Maybe parser is not able to exactly determine the precise line/byte where error occurs.
    Or maybe some char of the computer name is a wide char (unicode)

    Can you create simple a script that does something like the following and see if it is working or not in the computer having problems:
    USES "OS"
    Global sComputerName As String Value OS_GetComputerName
    MsgBox sComputerName
    
    Thanks
    Eros
    Last edited by ErosOlmi; 02-03-2021 at 22:26.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #18
    Quote Originally Posted by ErosOlmi View Post
    Hi Brian,

    I'm not sure error occurs due to OS_GetComputerName function.
    Maybe parser is not able to exactly determine the precise line/byte where error occurs.
    Or maybe some char of the computer name is a wide char (unicode)

    Can you create simple a script that does something like the following and see if it is working or not in the computer having problems:
    USES "OS"
    Global sComputerName As String Value OS_GetComputerName
    MsgBox sComputerName
    
    Thanks
    Eros
    Eros, thanks for the suggestion. Here is the first part of my application code:

    Uses "UI"
    Uses "CONSOLE"
    Uses "COMM"
    Uses "WMI"
    Uses "OS"
    
    '---Constant declarations
    Begin ControlID
      %ID_StartUpdateButton 
      %ID_ExitButton 
      %ID_CommandOutputTexBox
      %IDC_TIMER
    End ControlID
    
    %TIMER_DELAY    = 100          '---Timer delay (in milliseconds, not very accurate below about 100)
         
    Global hComm           As Long
    Global nBytes          As Long
    Global sBuffer         As String 
    Global gPortOpen       As Boolean
    Global pID             As Number
    Global vData()         As String
    Global nItems          As Long
    Global Counter         As Long
    Global Position        As Long
    Global ComputerName    As String   Value OS_GetComputerName
    Global Ports()         As String
    Global CountATI        As Long
    Global sHexFilename    As String
    Global sFirmwareNumber As String
    Global bConsole        As Boolean
    Global bUpdaterConsole As Boolean
    Global sCommandLine    As String
    
                                      
    ' Replace the filename in the next two lines to change which HEX file gets programmed
    #BUNDLE File "HEX", ".\EBF_v270.hex", "", ReplaceExisting=1
    sFirmwareNumber = "2.7.0"
    
    We have already sent this user several different things to try, in order to help us diagnose the problem and try some workarounds, and we haven't received any word back. We're hoping this is a good sign - that one of the things we asked them to try actually worked. (Normally you don't get any support contacts from things that work, only things that don't work, as I'm sure you're well aware.) We're not really able to push harder on them to try more tests at this point.

    If they come back and want to try more things, I'll make an .exe and get them to test with your idea.

    Until then, we can hope the issue has resolved itself.

    Again, thanks, everyone on this forum is so helpful.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Call DWord... etc
    By David in forum thinBasic General
    Replies: 5
    Last Post: 25-10-2013, 09:20
  2. call statement
    By TomLebowski in forum thinBasic General
    Replies: 7
    Last Post: 17-08-2010, 21:39
  3. call dll
    By Lionheart008 in forum thinBasic General
    Replies: 6
    Last Post: 30-11-2009, 16:07

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •