comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  On Win2000 Professional, GetUserNameEx failing with parameter as NameDnsDomain . Help Needed.         


Author: developer28
Date: May 26, 2008 22:59

Hi,

I am trying to use the function GetUserNameEx on Win2k Pro.

It works for NameSamCompatible but is failing when i pass the option
as NameDnsDomain.

Important : The failure occurs only Win2000 Professional and it works
fine on XP.

In my case, following is the environment:

UserName : aman
Domain : banvsg.com

I need to use NameDnsDomain name to get the expanded domain name.

A call to GetUserNameEx with NameSamCompatible as option returns
banvsg
\aman.

A call to GetUserNameEx with NameDnsDomain name returns a blank string
when i expect it to return banvsg.com\aman .

I also tried TranslateName to convert from NameSamCompatible type to
NameDnsDomain type but even that returns a blank string.

If anyone has expertise on this or has faced the issue before and
knows how to get through it, please reply.
Show full article (0.94Kb)
1 Comment
  Custom menu and its owner         


Author: [Jongware]
Date: May 26, 2008 16:21

Hi all,
This must be incredibly simple. Or, so I hope -- it must be just me not getting
it.
I've created a custom 'menu', which is nothing more than a WS_POPUP window that
gets created and drawn whenever the user clicks on its activator. The menu
itself is similar to Word's color selector, but that's not what I'm fretting
about. How do I send the user's selection to its parent?
- The activator is a custom class, which draws a colored rectangle. A click on
its center creates the popup menu as a new window.
- This window (the menu) handles moves and mouse selections, et cetera, until
the user finally decides what he wants.
- In its WM_DESTROY handler, I simply inserted "SendMessage (GetParent (hWnd),
WM_USER, 0, my_selection)".
- Same WM_USER message never appears into its parent / owner / creator...
Show full article (1.15Kb)
8 Comments
  Reading a file without modifying its Last Access time.         


Author: dmitri
Date: May 26, 2008 16:00

Dear all,

I have been tasked with reading a file without modifying its access
time (this is for a sort of a backup application). I was under the
impression that to do a proper backup, I had to call CreateFile()
using FILE_FLAG_BACKUP_SEMANTICS flag. Then, Last Access time would
not be changed after the file contents were read. My test program is
attached at the end of this post; it does not work. That is, the Last
Access time stubbornly gets updated every time a file is read. I
tried several combinations of arguments to CreateFile() and using both
ReadFile() and BackupRead() calls to read the data, but to no avail.

I was then pointed to documentation about special trick one can do [1]
by calling SetFileTime() with atime set to 0xFFFFFFFF right after the
file is opened. This _does_ work; however, one has to call
CreateFile() with FILE_WRITE_ATTRIBUTES flag -- otherwise,
SetFileTime() call fails. In my case, the files to be read are on a
read-only share, so calling CreateFIle() with any FILE_WRITE_* flag
fails.
Show full article (5.63Kb)
7 Comments
  application hang         


Author: magix
Date: May 26, 2008 06:07

Hi,

I have WinAPI main dialog, and I have menu.
When I click on the menu to open another dialog at the 5th time, the
application seems hang, and I will need to kill it, and restart

Do you any good method to troubleshooting application hanging ?

Magix
1 Comment
  SHBrowseForFolder - Callback Kills Scroll Bar.         


Author: Larry Lindstrom
Date: May 26, 2008 01:10

Hi Folks:

Developing on XP Home, VS 2008 Pro, WIN32, no MFC.

I've been using SHBrowseForFolder() for a long time, but
a user is telling me the dialog is too big to fit on their
screen. Perhaps because they are using Dragon Naturally
Speaking, which has it's own frame around the client area.

So I'm specifying a callback for SHBrowseForFolder.
This is the first time I've tried to use a callback for
this function.

The callback does seem to be able to specify a new size
for the browse folder, but the scroll bar, which was present
before the callback was used, is now gone.

How do I resurrect the scrollbar?

This is my callback:
Show full article (1.58Kb)
2 Comments