Click here to Skip to main content
16,011,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Windows Message Queue Pin
Villly13-May-03 22:18
Villly13-May-03 22:18 
GeneralRe: Windows Message Queue Pin
Jim Taylor13-May-03 22:47
Jim Taylor13-May-03 22:47 
GeneralI am lost Pin
Anonymous10-May-03 18:23
Anonymous10-May-03 18:23 
GeneralRe: I am lost Pin
Nick Parker11-May-03 3:12
protectorNick Parker11-May-03 3:12 
GeneralRe: I am lost Pin
John Kuhn14-May-03 8:06
John Kuhn14-May-03 8:06 
GeneralVBA and Business Objects Pin
nicholas.gionfriddo9-May-03 4:41
nicholas.gionfriddo9-May-03 4:41 
GeneralHorizontal bar disappearance and text being wrapped in html/codeview Pin
artikworld8-May-03 23:41
artikworld8-May-03 23:41 
GeneralCalling API function from VB Pin
Miszou8-May-03 11:05
Miszou8-May-03 11:05 
I am trying to call the Windows API function "GetUserName" from VB 6, and it always returns 0 for failure. However, I can call this exact same function from Visual C++ 6.0 and it works just fine...

Here is the code:

Declare Function _
    GetUserName Lib "Advapi32.dll" Alias "GetUserNameA" _
    (ByRef lpBuffer As String, ByRef nSize As Integer) As Long
 
Dim strUserName As String
Dim nUserLen As long
Dim nRetVal as long
 
nUserLen = 32
strUserName = Space(nUserLen)

retVal = GetUserName(strUserName, nUserLen)
Confused | :confused:


There are 10 kinds of people - those that get binary and those that don't.
GeneralRe: Calling API function from VB Pin
J. Dunlap8-May-03 11:23
J. Dunlap8-May-03 11:23 
GeneralRe: Calling API function from VB Pin
Miszou8-May-03 11:58
Miszou8-May-03 11:58 
GeneralI think I've got it! Pin
J. Dunlap8-May-03 13:37
J. Dunlap8-May-03 13:37 
GeneralRe: I think I've got it! Pin
Miszou9-May-03 5:22
Miszou9-May-03 5:22 
GeneralUser Authentication Pin
GrindAZ8-May-03 8:28
GrindAZ8-May-03 8:28 
GeneralRe: User Authentication Pin
Nick Parker10-May-03 11:41
protectorNick Parker10-May-03 11:41 
GeneralRe: User Authentication Pin
GrindAZ12-May-03 5:28
GrindAZ12-May-03 5:28 
GeneralRe: User Authentication Pin
Ray Cassick12-May-03 5:57
Ray Cassick12-May-03 5:57 
GeneralRe: User Authentication Pin
GrindAZ12-May-03 7:17
GrindAZ12-May-03 7:17 
Generallist boxes Pin
lister7-May-03 13:03
lister7-May-03 13:03 
GeneralRe: list boxes Pin
ScaleOvenStove7-May-03 16:38
ScaleOvenStove7-May-03 16:38 
GeneralRe: list boxes Pin
lister7-May-03 23:35
lister7-May-03 23:35 
Generalbit array (BSTR) Pin
Pombo7-May-03 12:21
Pombo7-May-03 12:21 
GeneralRe: bit array (BSTR) Pin
Dave Kreskowiak8-May-03 6:17
mveDave Kreskowiak8-May-03 6:17 
GeneralRe: bit array (BSTR) Pin
Anonymous8-May-03 8:25
Anonymous8-May-03 8:25 
GeneralRe: bit array (BSTR) Pin
Dave Kreskowiak12-May-03 7:00
mveDave Kreskowiak12-May-03 7:00 
GeneralRe: bit array (BSTR) Pin
Nick Parker12-May-03 17:32
protectorNick Parker12-May-03 17:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.