Announcement

Collapse
No announcement yet.

Missing Net API ?

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

  • Missing Net API ?

    Hopefully I'm not embarrasing myself again like the last of my posts about missing time API's but here goes.

    Are the two netapi32 functions

    NetUserAdd
    NetUserDel

    missing for any particular reason?

    In VB they look like this... (probably need to be asciiz rather than strings though)
    (and they have to be pointers to Unicode strings or you'll screw your NT PDC.

    Code:
    Declare Function NetUserAdd Lib "netapi32" (ByVal lpServer As String, ByVal Level As Long, lpUser As USER_INFO_3, lpError As Long) As Long
    Declare Function NetUserDel Lib "netapi32" (ByVal lpServer As String, ByVal Username As Long) As Long
    ------------------

    Paul Dwyer
    Network Engineer
    Aussie in Tokyo
    (Paul282 at VB-World)

  • #2
    For PowerBASIC, you'll likely need an ALIAS clause to those declarations, plus the usual changes necessary when translating [VB] BYVAL..STRING paramaters to BYREF..ASCIIZ (or similar), etc.

    I believe these functions were not included in the INC files since they are only available in NT/2000.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      That's true, I didn't realise that NT API was avoided as such.

      Not a problem, in future I'll just add them to my app rather than post them here then.

      Thanks Lance

      ------------------

      Paul Dwyer
      Network Engineer
      Aussie in Tokyo
      (Paul282 at VB-World)

      Comment


      • #4
        Posting or at least commenting on them is not really a problem, since others may search the BBS and at least find discussion on them... every little helps.

        For the record, the INC files are not intended to cover every single API, equate and structure, but rather to cover the ones that are actually being used. We are always keen to add to the set, but each addition is "assessed" for suitability before being added.

        Excluding certain API's that that are specific to NT/2000 helps reduce the problems encountered when someone tries to use one on a Win9x machine.

        There has been some previous discussion about creating other file(s) for the platform-specific API's... Of course, you are most welcome to initiate one and post it to the Source Code forum (where other people can use and add to it). It would need to include the MS copyright info, etc, just as the existing WIN32API.INC file does, etc.



        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          you mean like a WinNTapi.inc or something?

          hmmmm, I'm I little too preoccupied with unicode and international issues at the moment but it's not a bad idea. I'm not really interested in supporting 95/98/ME at all really.

          Thanks for the info.


          ------------------

          Paul Dwyer
          Network Engineer
          Aussie in Tokyo
          (Paul282 at VB-World)

          Comment

          Working...
          X