Found in the Win32.hlp

type
PTokenUser = ^TTokenUser;
_TOKEN_USER = record
User: TSIDAndAttributes;
end;
TTokenUser = _TOKEN_USER;

procedure getCurrentUserAndDomain(var User, Domain: String);
var
hProcess, hAccessToken: THandle;
InfoBuffer: array[0..1000] of Char;
szAccountName, szDomainName: array [0..200] of Char;
dwInfoBufferSize, dwAccountSize, dwDomainSize: DWORD;
pUser: PTokenUser;
snu: SID_NAME_USE;
begin
dwAccountSize:=200;
dwDomainSize:=200;
hProcess:=GetCurrentProcess;
OpenProcessToken(hProcess,TOKEN_READ,hAccessToken);
GetTokenInformation(hAccessToken,TokenUser,@InfoBuffer[0],1000,
dwInfoBufferSize);
pUser:=PTokenUser(@InfoBuffer[0]);
LookupAccountSid(nil, pUser.User.Sid, szAccountName, dwAccountSize, szDomainName, dwDomainSize, snu);
User:=szAccountName;
Domain:=szDomainName;
CloseHandle(hAccessToken);
end;

79 Responses so far.

  1. Anonymous says:

    certainly like your web site but you need to check the spelling on several of your
    posts. Many of them are rife with spelling issues and I in
    finding it very bothersome to inform the reality then again I'll certainly come back again.

    my web site :: Abercrombie

  2. Anonymous says:

    I think this is one of the most vital information for me.
    And i am glad reading your article. But want to remark on some
    general things, The site style is wonderful, the articles is really excellent :
    D. Good job, cheers

    my blog :: cheap nfl jerseys

  3. Anonymous says:

    Hi, I do believe this is a great website. I stumbledupon it ;) I will return yet again since i have
    book-marked it. Money and freedom is the greatest
    way to change, may you be rich and continue to help others.



    Also visit my page ... Mario Lemieux Authentic Jersey

  4. Anonymous says:

    I blog frequently and I really appreciate your content.
    This great article has really peaked my interest.
    I will book mark your blog and keep checking for
    new details about once a week. I subscribed to your Feed too.



    Also visit my web page :: Cheap Louis Vuitton Bags

  5. Anonymous says:

    Hi my loved one! I want to say that this article is amazing, great written and include almost all significant infos.

    I would like to look extra posts like this .

    My webpage - Cheap Jerseys

  6. Anonymous says:

    That is a really good tip particularly to those
    new to the blogosphere. Brief but very precise info… Thank you for sharing this one.
    A must read article!

    Here is my web blog - Kris Letang Black Jersey

  7. Anonymous says:

    Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your next post thank you once again.



    Feel free to surf to my page ... Abercrombie & Fitch

  8. Anonymous says:

    Pretty great post. I simply stumbled upon your weblog
    and wished to mention that I've truly enjoyed browsing your weblog posts. After all I'll be subscribing in your feed and I hope you write again soon!



    Also visit my page; Converse

  9. Anonymous says:

    I think what you composed was very reasonable.
    However, think about this, what if you added a little information?
    I mean, I don't want to tell you how to run your blog, however suppose you added a post title to possibly get people's attention?
    I mean "Get the current Domain and Username"
    is kinda vanilla. You should peek at Yahoo's home page and note how they write post titles to grab viewers to click. You might add a video or a related picture or two to grab readers excited about everything've got to say.
    In my opinion, it would make your posts a little bit more interesting.



    My homepage :: www.explorethecapabilities.com

  10. Anonymous says:

    Hi there to every one, as I am actually eager of reading
    this weblog's post to be updated on a regular basis. It carries fastidious information.

    Here is my site: Sidney Crosby Authentic Jersey

  11. Anonymous says:

    WOW just what I was searching for. Came here by searching for hesitancy

    Visit my site ... Louis Vuitton Outlet

  12. Anonymous says:

    I don't know whether it's just me or if everybody else experiencing problems with your website.

    It appears like some of the written text in your content are running off the screen.
    Can someone else please provide feedback and let me know if this is happening to them as well?
    This may be a issue with my browser because I've had this happen previously. Many thanks

    Also visit my site: Wholesale Jerseys Cheap

  13. Anonymous says:

    Fastidious respond in return of this difficulty
    with solid arguments and explaining all regarding that.


    My blog NFL Jerseys Cheap

  14. Anonymous says:

    I could not resist commenting. Very well written!

    my web page: Louis Vuitton Handbags

  15. Anonymous says:

    Hi! I've been following your site for some time now and finally got the courage to go ahead and give you a shout out from Huffman Texas! Just wanted to tell you keep up the excellent work!

    Here is my homepage :: Cheap Louis Vuitton Bags

  16. Anonymous says:

    Hello, i think that i saw you visited my website thus i came to “return
    the favor”.I am trying to find things to improve my site!
    I suppose its ok to use some of your ideas!!

    Look into my weblog ... Michael Kors Handbags

  17. Anonymous says:

    Your method of describing all in this post is actually pleasant, every one can easily
    know it, Thanks a lot.

    Also visit my web-site: www.explorethecapabilities.com

  18. Anonymous says:

    you're in reality a excellent webmaster. The site loading speed is amazing. It kind of feels that you are doing any distinctive trick. Furthermore, The contents are masterwork. you've done a
    wonderful process in this topic!

    Take a look at my homepage: www.tedxyse.com

  19. Anonymous says:

    I do not know if it's just me or if perhaps everyone else experiencing issues with your website. It appears as if some of the text within your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well? This could be a problem with my web browser because I've had this happen before.
    Thank you

    Here is my homepage; Sac Louis Vuitton Pas Cher

  20. Anonymous says:

    Genuinely when someone doesn't be aware of then its up to other viewers that they will assist, so here it takes place.

    Here is my homepage :: NFL Cheap Jerseys

  21. Anonymous says:

    I've been browsing online more than 2 hours today, yet I never found any interesting article like yours. It's pretty worth enough for me.
    Personally, if all website owners and bloggers made good content as you did, the
    net will be much more useful than ever before.

    My weblog ... Abercrombie & Fitch

  22. Anonymous says:

    Saved as a favorite, I love your website!

    my site; Cheap NFL Jerseys

  23. Anonymous says:

    Thank you for the good writeup. It in reality was a
    entertainment account it. Look complex to more introduced agreeable
    from you! By the way, how could we keep up a correspondence?



    Feel free to surf to my website - Solde Air Max

  24. Anonymous says:

    Thanks for one's marvelous posting! I actually enjoyed reading it, you happen to be a great author. I will be sure to bookmark your blog and will come back down the road. I want to encourage one to continue your great writing, have a nice holiday weekend!

    Have a look at my web site - Abercrombie Paris

  25. Anonymous says:

    Heya! I realize this is kind of off-topic however I had to ask.
    Does running a well-established website like yours take a large amount of work?
    I'm brand new to blogging but I do write in my journal every day. I'd like to start a blog so I
    will be able to share my own experience and feelings online.
    Please let me know if you have any kind of suggestions or tips for brand new aspiring blog owners.
    Thankyou!

    Here is my website ... www.tedxyse.com

  26. Anonymous says:

    The other day, while I was at work, my cousin stole my iPad and tested to see if it can survive a
    25 foot drop, just so she can be a youtube sensation.
    My iPad is now destroyed and she has 83 views. I know this is completely
    off topic but I had to share it with someone!


    Also visit my page :: Montre Guess

  27. Anonymous says:

    Hello i am kavin, its my first occasion to commenting anyplace, when i
    read this piece of writing i thought i could also create comment
    due to this good paragraph.

    My web site http://slc-wireless.com/

  28. Anonymous says:

    What a stuff of un-ambiguity and preserveness of precious familiarity about unexpected emotions.


    Also visit my blog post ... Mulberry Outlet UK

  29. Anonymous says:

    I am regular reader, how are you everybody? This paragraph posted at this web
    site is genuinely fastidious.

    my weblog :: Nike Air Jordan

  30. Anonymous says:

    Hello there, just became alert to your blog through Google, and found that
    it is truly informative. I am going to watch out for brussels.

    I'll be grateful if you continue this in future. Lots of people will be benefited from your writing. Cheers!

    My page - More Info

  31. Anonymous says:

    Ahaa, its pleasant conversation regarding this paragraph here at this
    website, I have read all that, so at this time me also commenting at this place.


    Here is my site; Read This

  32. Anonymous says:

    Hey I know this is off topic but I was wondering if you
    knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

    Have a look at my blog post :: Louis Vuitton Handbags Outlet

  33. Anonymous says:

    I've been browsing online greater than 3 hours as of late, but I never discovered any interesting article like yours. It's
    lovely worth enough for me. In my view, if all web owners and bloggers made excellent content as you did, the internet will be much more helpful than ever before.


    Review my web site; dalliza.com

  34. Anonymous says:

    Asking questions are in fact good thing if you are not understanding anything entirely, however this post
    presents nice understanding yet.

    Here is my blog post ... Cheap NFL Jerseys

  35. Anonymous says:

    Admiring the persistence you put into your site and detailed information you offer.
    It's great to come across a blog every once in a while that isn't
    the same old rehashed material. Excellent read!

    I've bookmarked your site and I'm including your RSS feeds to my Google account.


    my homepage - additional info

  36. Anonymous says:

    It's really a great and useful piece of information. I'm happy that
    you simply shared this helpful information with us. Please keep us up to date like this.
    Thank you for sharing.

    Review my website Oakley Frogskins

  37. Anonymous says:

    It's actually a nice and useful piece of info. I am happy that you simply shared this useful info with us. Please stay us up to date like this. Thanks for sharing.

    Also visit my site; Clicking Here

  38. Anonymous says:

    Hi there to all, it's really a nice for me to go to see this website, it includes priceless Information.

    my website; next page

  39. Anonymous says:

    fantastic submit, very informative. I wonder why the opposite specialists of this sector don't understand this. You must continue your writing. I'm confident, you've a great readers' base already!


    my webpage ... Continued

  40. Anonymous says:

    Your style is really unique in comparison to other folks I've read stuff from. I appreciate you for posting when you've got the opportunity,
    Guess I will just bookmark this blog.

    Look into my webpage Bonuses

  41. Anonymous says:

    Can I simply say what a relief to uncover an individual who really knows what
    they are discussing on the web. You actually realize how to bring a problem to light and
    make it important. More people have to read this and
    understand this side of your story. I was surprised that you aren't more popular given that you surely have the gift.

    my web site; extra resources

  42. Anonymous says:

    Thanks for sharing your info. I really appreciate
    your efforts and I will be waiting for your next write ups thanks once again.


    my webpage; More Help

  43. Anonymous says:

    I really love your site.. Excellent colors & theme.
    Did you create this website yourself? Please reply back as I'm wanting to create my very own blog and would like to find out where you got this from or just what the theme is called. Thank you!

    Here is my web site :: link

  44. Anonymous says:

    I visited many websites except the audio quality for audio songs existing at this web site is genuinely superb.



    Here is my web site :: article source

  45. Anonymous says:

    This website was... how do I say it? Relevant!! Finally I've found something which helped me. Kudos!

    Here is my website ... Christian Louboutin Outlet (www.ngosummit.com)

  46. Anonymous says:

    Hey I know this is off topic but I was wondering
    if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

    Feel free to visit my web-site ... Christian Louboutin Heels

  47. Anonymous says:

    Attractive section of content. I simply stumbled upon your site and in accession capital to claim that
    I get actually loved account your blog posts. Anyway I'll be subscribing on your augment or even I achievement you get right of entry to persistently rapidly.

    Review my web-site - Read More

  48. Anonymous says:

    I'm extremely impressed with your writing talents and also with the structure in your blog. Is this a paid subject or did you modify it your self? Anyway keep up the nice high quality writing, it is rare to see a nice blog like this one nowadays..

    My homepage Air Max (http://smu-fr.org/)

  49. Anonymous says:

    Undeniably believe that which you stated. Your favourite reason seemed
    to be on the web the simplest factor to consider of.
    I say to you, I certainly get irked even as folks consider
    worries that they just don't understand about. You controlled to hit the nail upon the top and outlined out the whole thing with no need side-effects , folks can take a signal. Will probably be back to get more. Thank you

    Look at my site :: Nike Air Max

  50. Anonymous says:

    What a stuff of un-ambiguity and preserveness of precious experience on the topic of unexpected feelings.


    Have a look at my web blog ... Boutique Air Jordan

  51. Anonymous says:

    If you want to get a good deal from this post then you have to apply these strategies to your
    won weblog.

    My weblog :: source

  52. Anonymous says:

    Wonderful post however , I was wondering if you could write a litte more on this topic?
    I'd be very thankful if you could elaborate a little bit further. Bless you!

    Take a look at my web site Sac a main Guess ()

  53. Anonymous says:

    What i don't realize is if truth be told how you are not actually a lot more well-liked than you might be now. You're so intelligent.

    You recognize thus considerably in relation to this topic, produced me personally consider it from a lot of varied angles.
    Its like men and women aren't fascinated until it's something to accomplish with Girl gaga!
    Your individual stuffs nice. Always maintain it up!

    my webpage; Officiel Louis Vuitton Site ()

  54. Anonymous says:

    Wow, that's what I was seeking for, what a data! present here at this web site, thanks admin of this site.

    My blog post; Michael Kors Outlet

  55. Anonymous says:

    Hey there are using Wordpress for your blog platform?
    I'm new to the blog world but I'm trying to get started and set up my own.

    Do you require any html coding expertise to make your own blog?
    Any help would be really appreciated!

    Here is my site :: Cheap NFL Jerseys

  56. Anonymous says:

    Oh my goodness! Amazing article dude! Thanks, However I am encountering difficulties with your
    RSS. I don't understand the reason why I cannot subscribe to it. Is there anybody getting identical RSS problems? Anybody who knows the answer can you kindly respond? Thanks!!

    Stop by my blog New LeBron Shoes

  57. Anonymous says:

    Thanks for your marvelous posting! I certainly enjoyed reading it, you
    might be a great author. I will be sure to bookmark your blog and will eventually come back at some point.
    I want to encourage you to ultimately continue your
    great work, have a nice holiday weekend!

    Feel free to visit my page :: Chaussures De Foot Pas Cher

  58. Anonymous says:

    Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment
    didn't appear. Grrrr... well I'm not writing all that over again.
    Anyhow, just wanted to say superb blog!

    Also visit my webpage :: Mulberry Outlet

  59. Anonymous says:

    I feel this is among the so much important info for me.
    And i'm satisfied reading your article. But should observation on some common issues, The website style is great, the articles is in reality excellent : D. Just right task, cheers

    My webpage - beats sell

  60. Anonymous says:

    I have to thank you for the efforts you have put in penning this site.
    I'm hoping to check out the same high-grade blog posts from you later on as well. In fact, your creative writing abilities has encouraged me to get my very own website now ;)

    Here is my blog post: Nike Free

  61. Anonymous says:

    This post offers clear idea in favor of the new visitors of blogging,
    that really how to do blogging and site-building.

    Visit my webpage; Sac Louis Vuitton

  62. Anonymous says:

    Your style is really unique compared to other folks I have read stuff from.
    I appreciate you for posting when you've got the opportunity, Guess I will just book mark this page.

    Also visit my blog Nike Air Max

  63. Anonymous says:

    I seldom comment, but after reading through a few
    of the remarks on "Get the current Domain and Username".

    I actually do have a couple of questions for you if it's okay. Could it be just me or do a few of the comments appear like they are coming from brain dead people? :-P And, if you are writing at other places, I'd
    like to follow anything fresh you have to post.
    Could you list of the complete urls of all your public pages like your linkedin profile,
    Facebook page or twitter feed?

    my web blog: Nike Blazers Women

  64. Anonymous says:

    Greate pieces. Keep posting such kind of info on your page.
    Im really impressed by your site.
    Hello there, You have done a fantastic job. I will definitely digg
    it and for my part suggest to my friends. I'm confident they'll be benefited from this web site.


    Check out my blog Nike ID

  65. Anonymous says:

    I am really happy to read this webpage posts which
    consists of tons of valuable data, thanks for providing these statistics.


    My site check this out ()

  66. Anonymous says:

    I love looking through an article that can make men and
    women think. Also, thanks for allowing for me to comment!


    Feel free to surf to my web-site - New Kobe Shoes

  67. Anonymous says:

    asdasd

  68. Anonymous says:

    Sammie Hill #9134 Corey Williams is an interesting player to watch is OT Jason Fox.
    The punt is fair caught at the Detroit 37 after Felix Jones had carried the Cowboys
    into Lions territory, but Colston was stripped by Stephen Tulloch on the 18-yard line and Justin Durant recovered.
    The tom brady jersey held a press conference at Super Bowl XL was played
    at Ford Field against the Vikings. Sometimes governments
    embrace austerity out of an upscale Dallas mall for wearing sagging pants.


    Look at my page; Von Miller Womens Jersey

  69. Anonymous says:

    Appreciate the recommendation. Let me try it out.|

    Feel free to surf to my web blog - program do rozliczenia pit 2013

Post a Comment

Thank you for your comment.

Any request and idea are welcome.

CLICK TO REGISTER