DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: I_NetLogonControl

  1. #1
    M. Mol Guest

    I_NetLogonControl


    I had been looking very long for an API call that can synchronize a NT Domain.
    I finally found an undocumented function which should be able to do just
    this. Namely: I_NetLogonControl!

    But I have trouble converting it to VB. I've found several examples in several
    different languages, C++, Perl, Delphi but unfortunately none in VB. Thanks
    to these examples I've the following done already.

    'lmaccess.h declaration
    function I_NetLogonControl(
    ServerName : Win32.LPWSTR;
    FunctionCode: Win32.DWORD;
    QueryLevel : Win32.DWORD;
    Buffer : access Win32.LPBYTE)
    return Win32.DWORD; -- lmaccess.h:1243

    'Forces to send a synchronize request to all BDC's.
    'ServerName must be a PDC.
    Declare Function I_NetLogonControl Lib "netapi32.dll" _
    (ServerName As String, _
    FunctionCode As Long, _
    QueryLevel As Long, _
    lngBuffer As Long) As Long

    The problem is the last parameter. I'm not sure how this one should be declared.
    I have a working Delphi example which looks very solidly done.
    It is done by John Gonzalez and can be found on his website http://www.jgsoftware.com.
    I could reproduce it here, but I don't want to make this post unnecessary
    long. I've also produced but won't reproduce that either to save space.

    I'm hoping someone can help me with converting this API-Call or even better
    maybe has already converted this API-Call and is willing to share it.

  2. #2
    M. Mol Guest

    Re: I_NetLogonControl


    Oops! Typo!

    >long. I've also produced but won't reproduce that either to save space.

    OK this should read:

    I've also produced a wrapper but won't reproduce that either to save space.
    ^^^^^^^^^


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center