i'm having a problem using the NetServerGetInfo API. i'm pretty sure it's something that i'm doing, but i can't seem to find what i'm doing wrong.
; get server info
invoke NetServerGetInfo, NULL,100,ADDR servInfo
.IF (eax==NERR_Success)
; get server name
invoke MessageBoxW, NULL,servInfo.sv100_name,ADDR strServer,MB_OK
lea eax,servInfo
invoke NetApiBufferFree, eax
.ENDIF
the servInfo variable is local to this function and strServer is in unicode format. the function returns success as the MessageBoxW function displays the message box, however servInfo.sv100_name shows up as as left parenthesis and not what i expected it to be. the messagebox function was just so i could see if the netservergetinfo function was working.
i know that the sv100_name is a pointer to a unicode string, but i thought that passing it this way would work. guess not?
TIA
after further research, i found a function that accomplished the same thing that i was looking for. the function i found is NetGetDCName.