dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 41

Thread: Howto Get Windows NT Domain\Username

  1. #16
    Monte Hansen Guest

    Re: Howto Get Windows NT Domain\Username

    Duh =8, I posted to the wrong thread.

    ++++++++++++++++++++
    Monte Hansen
    http://KillerVB.com
    ++++++++++++++++++++

    "Monte Hansen" <monte@nospam.com> wrote in message
    news:3b8cff8d$1@news.devx.com...
    > Sachin, I would suggest first that you use the LoadLibraryEx function with
    > the DONT_RESOLVE_DLL_REFERENCES flag, for resource loading.
    >
    > Next I would question if the function can even find the file; perhaps try

    an
    > absolute path first, then worry about the relative path spec once you get

    it
    > working.
    >
    > Hope this helps.
    >
    > ++++++++++++++++++++
    > Monte Hansen
    > http://KillerVB.com
    > ++++++++++++++++++++
    >
    > "Monte Hansen" <monte@nospam.com> wrote in message
    > news:3b8c22dc$1@news.devx.com...
    > >
    > > I don't believe the "USERDOMAIN" environment variable will work in

    non-NT
    > > platforms (although I wish it did).
    > >
    > > +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
    > > Monte Hansen
    > > http://KillerVB.com
    > > +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
    > >
    > >
    > > "Sachin" <sachin.nigam@orbit-e.com> wrote:
    > > >easiest way:-
    > > >Environ$("USERDOMAIN")
    > > >-Sachin
    > > >"Hal" <Halu@home.se> wrote in message news:3b8abf02@news.devx.com...
    > > >>
    > > >> Hi!
    > > >> How can I get the NT Domain name for a windows client? The user-name

    I
    > > get
    > > >> via GetUserName in Lib advapi32.dll.
    > > >> Does anybody nows?
    > > >> Thanks
    > > >> /Hal
    > > >>
    > > >
    > > >

    > >

    >
    >




  2. #17
    Monte Hansen Guest

    Re: Howto Get Windows NT Domain\Username

    Duh =8, I posted to the wrong thread.

    ++++++++++++++++++++
    Monte Hansen
    http://KillerVB.com
    ++++++++++++++++++++

    "Monte Hansen" <monte@nospam.com> wrote in message
    news:3b8cff8d$1@news.devx.com...
    > Sachin, I would suggest first that you use the LoadLibraryEx function with
    > the DONT_RESOLVE_DLL_REFERENCES flag, for resource loading.
    >
    > Next I would question if the function can even find the file; perhaps try

    an
    > absolute path first, then worry about the relative path spec once you get

    it
    > working.
    >
    > Hope this helps.
    >
    > ++++++++++++++++++++
    > Monte Hansen
    > http://KillerVB.com
    > ++++++++++++++++++++
    >
    > "Monte Hansen" <monte@nospam.com> wrote in message
    > news:3b8c22dc$1@news.devx.com...
    > >
    > > I don't believe the "USERDOMAIN" environment variable will work in

    non-NT
    > > platforms (although I wish it did).
    > >
    > > +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
    > > Monte Hansen
    > > http://KillerVB.com
    > > +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
    > >
    > >
    > > "Sachin" <sachin.nigam@orbit-e.com> wrote:
    > > >easiest way:-
    > > >Environ$("USERDOMAIN")
    > > >-Sachin
    > > >"Hal" <Halu@home.se> wrote in message news:3b8abf02@news.devx.com...
    > > >>
    > > >> Hi!
    > > >> How can I get the NT Domain name for a windows client? The user-name

    I
    > > get
    > > >> via GetUserName in Lib advapi32.dll.
    > > >> Does anybody nows?
    > > >> Thanks
    > > >> /Hal
    > > >>
    > > >
    > > >

    > >

    >
    >




  3. #18
    Sachin Guest

    Re: Howto Get Windows NT Domain\Username


    "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    news:3b8c2862@news.devx.com...
    > Monte,
    >
    > > Look at the NetResources class/sample on my site. That code works for

    all
    > > Windoz platforms.

    >
    > Cool, didn't see that one.
    >
    > > I don't believe the "USERDOMAIN" environment variable will work in

    non-NT
    > > platforms (although I wish it did).

    >
    > Plus, depending upon environmental vars is kinda sucky -- users can change
    > 'em, fairly easily
    >

    hmmm...ok the Environment variable trick is a bit shady & doesn't work on
    Win9x platforms but its kinda easiest way to find out when the stakes are
    not very high.
    -Sachin
    > --
    > L.J. Johnson, Slightly Tilted Software
    > Microsoft MVP (Visual Basic)
    > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > <http://www.SlightlyTiltedSoftware.com>
    > Ask The NT Pro at <http://www.devx.com/gethelp>
    >
    >
    >




  4. #19
    Sachin Guest

    Re: Howto Get Windows NT Domain\Username


    "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote in message
    news:3b8c2862@news.devx.com...
    > Monte,
    >
    > > Look at the NetResources class/sample on my site. That code works for

    all
    > > Windoz platforms.

    >
    > Cool, didn't see that one.
    >
    > > I don't believe the "USERDOMAIN" environment variable will work in

    non-NT
    > > platforms (although I wish it did).

    >
    > Plus, depending upon environmental vars is kinda sucky -- users can change
    > 'em, fairly easily
    >

    hmmm...ok the Environment variable trick is a bit shady & doesn't work on
    Win9x platforms but its kinda easiest way to find out when the stakes are
    not very high.
    -Sachin
    > --
    > L.J. Johnson, Slightly Tilted Software
    > Microsoft MVP (Visual Basic)
    > LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    > <http://www.SlightlyTiltedSoftware.com>
    > Ask The NT Pro at <http://www.devx.com/gethelp>
    >
    >
    >




  5. #20
    Klaus H. Probst Guest

    Re: Howto Get Windows NT Domain\Username

    Hi L.J.,

    > Aren't those solutions NT only? Hal didn't specify, but the API he's using
    > is Win95+ compatible, so I assumed Win9x.


    True...

    > Although I almost never use Win9x, I'd be curious about a solution that
    > works in these OSs. I didn't see anything interesting in the 19 Net...
    > functions available on Win9x, and I'm not certain about the WNet...
    > functions.


    Well, nowadays I *never* use 9x so my POV is tainted :-)

    ____________
    Klaus





  6. #21
    Klaus H. Probst Guest

    Re: Howto Get Windows NT Domain\Username

    Hi L.J.,

    > Aren't those solutions NT only? Hal didn't specify, but the API he's using
    > is Win95+ compatible, so I assumed Win9x.


    True...

    > Although I almost never use Win9x, I'd be curious about a solution that
    > works in these OSs. I didn't see anything interesting in the 19 Net...
    > functions available on Win9x, and I'm not certain about the WNet...
    > functions.


    Well, nowadays I *never* use 9x so my POV is tainted :-)

    ____________
    Klaus





  7. #22
    Chris Dengler Guest

    Re: Howto Get Windows NT Domain\Username

    Just as an aside, I think most of the major netapi32.dll functions can be
    massaged to work under 95 using radmin32.dll (from the server tools)... not
    that I would do it for a mainstream app, but for internal (corporate?)
    programs it may be worth a look.

    ....Chris.

    "Klaus H. Probst" <kprobst@v b b o x.com> wrote in message
    news:3b8db3c3$1@news.devx.com...
    > Hi L.J.,
    >
    > > Aren't those solutions NT only? Hal didn't specify, but the API he's

    using
    > > is Win95+ compatible, so I assumed Win9x.

    >
    > True...
    >
    > > Although I almost never use Win9x, I'd be curious about a solution that
    > > works in these OSs. I didn't see anything interesting in the 19 Net...
    > > functions available on Win9x, and I'm not certain about the WNet...
    > > functions.

    >
    > Well, nowadays I *never* use 9x so my POV is tainted :-)
    >
    > ____________
    > Klaus





  8. #23
    Chris Dengler Guest

    Re: Howto Get Windows NT Domain\Username

    Just as an aside, I think most of the major netapi32.dll functions can be
    massaged to work under 95 using radmin32.dll (from the server tools)... not
    that I would do it for a mainstream app, but for internal (corporate?)
    programs it may be worth a look.

    ....Chris.

    "Klaus H. Probst" <kprobst@v b b o x.com> wrote in message
    news:3b8db3c3$1@news.devx.com...
    > Hi L.J.,
    >
    > > Aren't those solutions NT only? Hal didn't specify, but the API he's

    using
    > > is Win95+ compatible, so I assumed Win9x.

    >
    > True...
    >
    > > Although I almost never use Win9x, I'd be curious about a solution that
    > > works in these OSs. I didn't see anything interesting in the 19 Net...
    > > functions available on Win9x, and I'm not certain about the WNet...
    > > functions.

    >
    > Well, nowadays I *never* use 9x so my POV is tainted :-)
    >
    > ____________
    > Klaus





  9. #24
    L.J. Johnson Guest

    Re: Howto Get Windows NT Domain\Username

    Chris,

    > Just as an aside, I think most of the major netapi32.dll functions can be
    > massaged to work under 95 using radmin32.dll (from the server tools)...

    not
    > that I would do it for a mainstream app, but for internal (corporate?)
    > programs it may be worth a look.


    Curious. Apparently, it's included in both the server tools for Win95, and
    in ADSI (http://support.microsoft.com/support.../Q251/2/87.ASP).

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  10. #25
    L.J. Johnson Guest

    Re: Howto Get Windows NT Domain\Username

    Chris,

    > Just as an aside, I think most of the major netapi32.dll functions can be
    > massaged to work under 95 using radmin32.dll (from the server tools)...

    not
    > that I would do it for a mainstream app, but for internal (corporate?)
    > programs it may be worth a look.


    Curious. Apparently, it's included in both the server tools for Win95, and
    in ADSI (http://support.microsoft.com/support.../Q251/2/87.ASP).

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  11. #26
    Roy Guest

    Re: Howto Get Windows NT Domain\Username

    It seems that your long tong is the only thing you use well nowadays.

    Cheers,
    Roy

    "Klaus H. Probst" <kprobst@v b b o x.com> wrote in message
    news:3b8db3c3$1@news.devx.com...
    > Hi L.J.,
    >
    > > Aren't those solutions NT only? Hal didn't specify, but the API he's

    using
    > > is Win95+ compatible, so I assumed Win9x.

    >
    > True...
    >
    > > Although I almost never use Win9x, I'd be curious about a solution that
    > > works in these OSs. I didn't see anything interesting in the 19 Net...
    > > functions available on Win9x, and I'm not certain about the WNet...
    > > functions.

    >
    > Well, nowadays I *never* use 9x so my POV is tainted :-)
    >
    > ____________
    > Klaus
    >
    >
    >
    >




  12. #27
    Roy Guest

    Re: Howto Get Windows NT Domain\Username

    It seems that your long tong is the only thing you use well nowadays.

    Cheers,
    Roy

    "Klaus H. Probst" <kprobst@v b b o x.com> wrote in message
    news:3b8db3c3$1@news.devx.com...
    > Hi L.J.,
    >
    > > Aren't those solutions NT only? Hal didn't specify, but the API he's

    using
    > > is Win95+ compatible, so I assumed Win9x.

    >
    > True...
    >
    > > Although I almost never use Win9x, I'd be curious about a solution that
    > > works in these OSs. I didn't see anything interesting in the 19 Net...
    > > functions available on Win9x, and I'm not certain about the WNet...
    > > functions.

    >
    > Well, nowadays I *never* use 9x so my POV is tainted :-)
    >
    > ____________
    > Klaus
    >
    >
    >
    >




  13. #28
    Chris Dengler Guest

    Re: Howto Get Windows NT Domain\Username

    Hmm. Interesting. I wonder if the radmin32.dll is the same. The only one
    I've ever run across is 3.51.867.1 (10/14/96, 455KB, 516 functions).

    I guess that would imply that 95's DSClient needs access to similar
    functions.

    Odd when you consider that MS considers radmin32 as an
    undocumented/unsupported library, and still encourages 95 developers to use
    the svrapi ... where some functions simply do not work.

    ....Chris.


    "L.J. Johnson" wrote in message ...

    > > Just as an aside, I think most of the major netapi32.dll functions can

    be
    > > massaged to work under 95 using radmin32.dll (from the server tools)...


    [snipped]

    > Curious. Apparently, it's included in both the server tools for Win95, and
    > in ADSI (http://support.microsoft.com/support.../Q251/2/87.ASP).




  14. #29
    Chris Dengler Guest

    Re: Howto Get Windows NT Domain\Username

    Hmm. Interesting. I wonder if the radmin32.dll is the same. The only one
    I've ever run across is 3.51.867.1 (10/14/96, 455KB, 516 functions).

    I guess that would imply that 95's DSClient needs access to similar
    functions.

    Odd when you consider that MS considers radmin32 as an
    undocumented/unsupported library, and still encourages 95 developers to use
    the svrapi ... where some functions simply do not work.

    ....Chris.


    "L.J. Johnson" wrote in message ...

    > > Just as an aside, I think most of the major netapi32.dll functions can

    be
    > > massaged to work under 95 using radmin32.dll (from the server tools)...


    [snipped]

    > Curious. Apparently, it's included in both the server tools for Win95, and
    > in ADSI (http://support.microsoft.com/support.../Q251/2/87.ASP).




  15. #30
    L.J. Johnson Guest

    Re: Howto Get Windows NT Domain\Username

    Chris,

    > Hmm. Interesting. I wonder if the radmin32.dll is the same. The only one
    > I've ever run across is 3.51.867.1 (10/14/96, 455KB, 516 functions).


    Just downloaded and installed ADSI 2.5 for Win98 and checked the file. It's
    listed as version 3.51, 1/21/99. So it's probably not exactly the *same*,
    but ADSI (and WMI) for Win9x have many of the same requirements as the admin
    tools -- they need to access the "cool" network functions, and probably good
    that they didn't re-write the 16-bit thunking for each one.

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




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