Please help: svrapi.dll 
Author Message
 Please help: svrapi.dll

I'm trying to use the NetServerGetInfo API-function in Windows 9x. Therefore
I have to use svrapi.dll. On MSDN I found an example of this function, but
the code is written in C and I'm not that familiar with converting to VB. If
anyone could give an example of this function (preferably in VB of course
:-) ) and how it works, I would be extremely thankful. (It doesn't matter
which SERVER_INFO-structure you use, allthough I prefer SERVER_INFO_50)

Stefan.

--




Tue, 12 Nov 2002 03:00:00 GMT  
 Please help: svrapi.dll
Private Type SERVER_INFO_API    'Level 101
    PlatformId As Long
    ServerName As Long
    Type As Long
    VerMajor As Long
    VerMinor As Long
    Comment As Long
End Type

Declare Function NetServerGetInfo Lib "netapi32" _
        (lpServer As Any, ByVal lLevel As Long, _
         vBuffer As Any) As Long

Alonso Yocupicio



Quote:
> I'm trying to use the NetServerGetInfo API-function in Windows 9x.
Therefore
> I have to use svrapi.dll. On MSDN I found an example of this function, but
> the code is written in C and I'm not that familiar with converting to VB.
If
> anyone could give an example of this function (preferably in VB of course
> :-) ) and how it works, I would be extremely thankful. (It doesn't matter
> which SERVER_INFO-structure you use, allthough I prefer SERVER_INFO_50)

> Stefan.

> --





Tue, 12 Nov 2002 03:00:00 GMT  
 Please help: svrapi.dll
Thanks for responding. Unfortunately the code you submitted is not suitable
for use in Windows 9x. That's what I'm desperately looking for. How can I
use the NetServerGetInfo function (declared in svrapi.dll and NOT in
netapi32.dll) in Windows 9x?

Stefan.
--




Thu, 14 Nov 2002 03:00:00 GMT  
 Please help: svrapi.dll
What you seek is below. Using them is might be difficult. I could be wrong, but as I recall the SVRAPI.dll writes the data in reverse byte order (hence the declare as Byte). Also, because the structure is not 4-byte aligned, you must first copy into a byte array, then from there copy into of a SERVER_INFO_1 structure.

Let me know how it goes.

Private Declare Function NetServerGetInfo95 Lib "SVRAPI.DLL" Alias "NetServerGetInfo" ( _
    ByVal SvrName As String, _
    ByVal sLevel As Integer, _
    ByVal pbBuffer As Any, _
    ByVal cbBuffer As Integer, _
    pcbTotalAvail As Integer) As Long

Private Type SERVER_INFO_1
    szname(0 To 15) As Byte    
    lver As Integer            
    lType(0 To 3) As Byte      
    szComment(0 To 3) As Byte  
End Type

--------------------------------
Monte Hansen
VB Yuk Yuk
http://KillerVB.com

What the yuk is a Yuk Yuk anyway? Beats the Yuk outta me!

Please respond to the newsgroups
--------------------------------


I'm trying to use the NetServerGetInfo API-function in Windows 9x. Therefore
I have to use svrapi.dll. On MSDN I found an example of this function, but
the code is written in C and I'm not that familiar with converting to VB. If
anyone could give an example of this function (preferably in VB of course
:-) ) and how it works, I would be extremely thankful. (It doesn't matter
which SERVER_INFO-structure you use, allthough I prefer SERVER_INFO_50)

Stefan.

--




Sat, 23 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Please help: svrapi.dll

2. Please help: svrapi.dll

3. Help wanted!!! SVRAPI.dll

4. Help!!! SVRAPI.dll

5. Help!!! SVRAPI.dll

6. Help!!! SVRAPI.dll

7. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

8. svrapi.dll documentation or network neighborhood on Windows98

9. VB5 & NetSessionDel Function in the SVRAPI.DLL

10. Who can answer SVRAPI.dll question???

11. svrapi.dll netconnectionenum

12. NetShareAdd (svrapi.dll) Win9x

 

 
Powered by phpBB® Forum Software