Jay, Your suggestion is a good one, lpBuffer should not be passed as byval
Jacques Paris e-mail [EMAIL PROTECTED] MapBasic-MapInfo support http://www.paris-pc-gis.com -----Original Message----- From: Terry McDonnell [mailto:[EMAIL PROTECTED] Sent: 14-Jul-04 11:07 To: [EMAIL PROTECTED] Subject: RE: MI-L GetUserName Api Problem Jay I'm relatively new to MB, and Basic languages, but I refer you top the following passage from help on Functions: "Any or all of a function's parameters may be specified as by-value if the optional ByVal keyword precedes the parameter name in the Function...End Function definition. When a parameter is declared by-value, the function's caller can specify an expression for that parameter, rather than having to specify the name of a single variable. However, if a function modifies the value of a by-value parameter, there is no way for the function's caller to access the new value. " To my understanding this means (esp. the last sentence) that you won't be able to access the user name as manipulated by the func. (assuming GetUserName DOES alter the passed param). I'm ready to be shot down by more experienced users but, would getting rid of the ByVal switch in your func do the trick? I suppose the dll func would have to be redone though? HTH Terry McDonnell --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12609 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12611
