Announcement

Collapse
No announcement yet.

Another Vista problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Iain Johnstone
    replied
    MM - thanks for the suggestion. I have put it in and sent it to the client, so I have to wait for a response. This has been endless fighting with Vista and may have cost me a sale. To be fair, there was some sloppy directory creation routines that really did need tightening up - and Vista showed these to me in no uncertain way!!

    Tom - this is part of a 3Mb program and is just a little snippet from one particular function. I omitted to say that the variable temp had already been declared - I just moved the other declares down to this bit so that they could be seen. As has frequently been pointed out, the fault may be somewhere else - the next move in the routine is to create the required directories. This is the only machine that it fails on, and it runs perfectly well on my Vista Basic laptop, but not on his Vista Business machine.

    Thanks to you both for your interest and assistance (good to see you back Tom).

    Iain Johnstone

    Leave a comment:


  • Tom Hanlin
    replied
    Works fine here...

    You might show the full code for a working program, DECLARE and all.

    Leave a comment:


  • Michael Mattias
    replied
    When GetUserName fails (n=0), you can call GetLastError() to get the reason.

    That might provide a hint.

    Leave a comment:


  • Iain Johnstone
    started a topic Another Vista problem

    Another Vista problem

    For some reason that I cannot fathom, the following code fails on a client's Vista Business machine :-
    Code:
    DIM szStr AS ASCIIZ* %MAX_PATH
    DIM n_length   AS DWORD
    ?"getting user name"
            n_length= SIZEOF(szStr)  'n_length holds the initial length of %MAX_PATH
    ?"n_length="+STR$(n_length)      'display length
            n=GetUserName (szStr, n_length)   'get the user name in szStr and the name length in n_length - DS copy stops here!!!!!!
            temp=szstr                        'convert asciiz string to normal string
    ?"user name return (zero is bad)="+STR$(n)+$CRLF+"new n_length="+STR$(n_length)+$CRLF+"user name="+temp     'display findings
    This is a reproducable error, but only on his machine. Any ideas as to what is happening??

    Iain Johnstone
Working...
X