I need to get the domain name for the currently logged on user. ::GetUserName gets me the user name, but how do I get the domain name for that user? Thanks!
Stefan Spenz
Posts
-
Platform SDK: Get domain name -
Starting a service with standard (no admin) user rightsCould you provide me with a quick example? Sorry I'm not that into services and user access rights
-
Starting a service with standard (no admin) user rightsHi, using Vista with a standard user (no admin), I cannot start a service using Win32 with OpenSCManager, OpenService etc. How can I modify the user rights temporary to admin rights, so the functions work properly? Regards, Stefan
-
Starting external web browser with URLthank you
-
Starting external web browser with URLHi, I want to start the system's favorite web browser from my c# app with an URL I specify. How do I do this? Regards, Stefan
-
Connecting router with xbox 360 via wireless lanHi, setup: Router, connected to the internet, and a xbox 360 console several rooms away. They are not connected with a ethernet cable. Now I want to plug an ethernet cable into the xbox which connects to a wlan adapter, and I also want to plug an ethernet cable into the router which connects to another wlan adapter. These two adapters have to connect to each other so that it's quasi a wlan bridge between these two replacing the physical ethernet cable. Is this possible? What kind of wlan adapters do I have to buy? How do I setup them? I want the stuff to work just like a normal LAN. Regards, Stefan
-
Bad pointerHi, in a particular situation, my pointer
pManager
becomes somewhat faulty. It passes theif (pManager) {
check, but most of the members are not active and the code crashes when I try to access them. Now, I want to check if a particular member inside the pointer is valid. When I try like thisif (pManager->bMember) {
, the code crashes. Are there any functions to check the integrity of a member? Regards, Stefan -
File lock problem with Image.FromFile()Dave Kreskowiak wrote:
This has been known for at least 4 years now, and it's not exactly a bug. Though, some people would probably argue that it is.
When you call .Dispose() and the handle won't get free, it's a bug!
Dave Kreskowiak wrote:
You can read more about it in this[^] KB article on MSDN.
Thank you, that worked! :) Regards, Stefan
-
File lock problem with Image.FromFile()Hi, when I load an image using this
Bitmap bitmap = (Bitmap)Image.FromFile(pic.Path)
, it is not possible to delete the file afterwards, unless you exit the program. I tried to call.Dispose()
on the object, but it seems like a bug in theFromFile
method. I found out a workaroundBitmap origbmp = new Bitmap(pic.Path); Bitmap bitmap = new Bitmap(origbmp); origbmp.Dispose();
. I keep working with the copy of the original bitmap as it's not locked anymore. But, loading an image usingBitmap
's constructor, it's impossible to load animated GIFs as it seems thatBitmap
doesn't support them. Now, how can I use animated GIFs and other image formats AND be able to delete the file afterwards? Thx :-D Stefan -
File lock problem with Image.FromFile()Hi, when I load an image using this
Bitmap bitmap = (Bitmap)Image.FromFile(pic.Path)
, it is not possible to delete the file afterwards, unless you exit the program. I tried to call.Dispose()
on the object, but it seems like a bug in theFromFile
method. I found out a workaroundBitmap origbmp = new Bitmap(pic.Path); Bitmap bitmap = new Bitmap(origbmp); origbmp.Dispose();
. I keep working with the copy of the original bitmap as it's not locked anymore. But, loading an image usingBitmap
's constructor, it's impossible to load animated GIFs as it seems thatBitmap
doesn't support them. Now, how can I use animated GIFs and other image formats AND be able to delete the file afterwards? Thx :-D Stefan -
AOL speke;) OMG WTF... When I was young my mother told me to clean up my room, I told her -1!
-
Star Wars ASCII -
New CameraProffK wrote: Fujifilm FinePix A-203 I got the predecessor, the FinePix A-202. The only thing I'm missing is an optical zoom, but I don't photograph that much that I would need it necessarily. I paid around 200 EUR for it in Oct 2002. For your question: I think the camera needs to have special names for the JPG's, some kind of prefix and an incrementing number for each image When I was young my mother told me to clean up my room, I told her -1!
-
Copying folders to another device_Theo_ wrote: Use the SHFileOperation function for easy copying Great. That's exactly I was looking for... Thanks! When I was young my mother told me to clean up my room, I told her -1!
-
Copying folders to another deviceHi @all, maybe a simple question to most of you, but I never did this before while coding... What's the easiest and best way to copy all files inside a folder to a target device (e.g. drive D: )? And what classes or functions do you use? MFC stuff is welcome! :) Thx a lot! Stefan When I was young my mother told me to clean up my room, I told her -1!
-
New monitorTrollslayer wrote: You can get 2 22" flat face CRT monitors for that Sure, if you got the space to place these two blocks When I was young my mother told me to clean up my room, I told her -1!
-
New monitorAnders Molin wrote: But it really bugs me that all the 19" only can can show a resolution at 1280 x 1024. I want 1600 x 1200, but then I have to get a 20" Yes, most can only display 1280*1024... I thought about buying a Dell 20" display, which is not so much more expensive than the Samsung, but most moderate priced 20" displays have pixel response times >30ms, which is not suitable for gaming, and I must admit I like to play games sometimes :). Anyway I like the styling of the SyncMaster, so living with 1280*1024 will surely do for me. When I was young my mother told me to clean up my room, I told her -1!
-
New monitorzenboy wrote: I'll just call you "Mr. Money" from now on It's not that pricey anymore, you can get it for ~ 850 EUR in Europe, and it's even cheaper in the US. I think thats a fair price When I was young my mother told me to clean up my room, I told her -1!
-
New monitorToday I ordered a new SyncMaster 191T[^]. It'll replace my old 17" CRT. I expect a huge WHOA effect on first use :) When I was young my mother told me to clean up my room, I told her -1!
-
The Matrix : ReloadedNnamdi Onyeyiri wrote: it looks like its gonna kick rear end. True... seems like to even beat part 1 When I was young my mother told me to clean up my room, I told her -1!