Results 1 to 10 of 18

Thread: Error 30 from call to OS_GetComputerName

Hybrid View

  1. #1

    Error 30 from call to OS_GetComputerName

    On one of my user's computers, they get the following error when they run my code:

    Main Script Name : C:UsersxxDownloadsFirmware_v270_WinEBBUpgraderGUI_v270.exe
    Error code 30
    Line number 26
    Token found OS_GETCOMPUTERNAME

    This occurs on the following line (line 26)
    Global ComputerName As String Value OS_GetComputerName

    This program has run fine on thousands of different computers. Any idea what "Error code 30" is and what could cause OS_GetComputerName to fail this way?

    Thanks much-
    *Brian

  2. #2

    Question

    Hi Brian,

    maybe knowing what system (real windows : which version ?, virtualization, wine...) is the program running on would be of some help.
    Also the computer name ( = expected name ?)

    Regards
    Last edited by DirectuX; 21-02-2021 at 23:34.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  3. #3
    Sure, I'll provide what I know.

    The computer system where the error is generated is Windows 10. I do know if it is up to date or not.

    I don't think it's being virtualized, although I can try to contact the user and ask.

    I don't know what the expected "Computer Name" is for their machine. What can I ask them to do to provide this information? Is there an easy way of reading out the "Computer Name" value that will normally be returned by the OS_GetComputerName call?

    *Brian

  4. #4
    Maybe this MS link can help you display the computer name, it's in the system panel.

    Quote Originally Posted by EmbeddedMan View Post
    Sure, I'll provide what I know.

    The computer system where the error is generated is Windows 10. I do know if it is up to date or not.

    I don't think it's being virtualized, although I can try to contact the user and ask.

    I don't know what the expected "Computer Name" is for their machine. What can I ask them to do to provide this information? Is there an easy way of reading out the "Computer Name" value that will normally be returned by the OS_GetComputerName call?

    *Brian
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,083
    Blog Entries
    5
    Rep Power
    725
    Brian,

    can your user try this script on his PC, will it improve the situation?
    dword bufferSize = 1024
    dim buffer as asciiz * bufferSize
    
    
    DECLARE FUNCTION GetComputerName IMPORT "KERNEL32.DLL" ALIAS "GetComputerNameW" (BYREF lpBuffer AS ASCIIZ, BYREF nSize AS DWORD) AS LONG
                                        
    GetComputerName(buffer, bufferSize)
    
    
    msgbox 0, buffer
    

    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  6. #6
    Thanks - I'll build a new version of the app for them to try with that change and let you know how it goes. Thanks!!

    *Brian

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

Posting Permissions

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