|
|
Up |
|
|
  |
Author: Jeffrey AdlerJeffrey Adler
Date: Jan 27, 2008 15:37
"Kellie Fitton" yahoo.com> wrote in message
news:a0638715-3e8c-44ff-9641-7933562acf9f@d21g2000prg.googlegroups.com...
On Jan 26, 12:26 pm, "Jeffrey Adler" bigfoot.com>
wrote:
> I have an app that needs to get info regarding user accounts.
>
> Specifically, I am trying to determine when a particular user's password
> will expire. Initially it is for the current logged-in user, but could
> later be for another user.
>
> Any suggestions for a direction to persue would be appreciated.
>
> Jeff.
Hi,
You can use the following APIs to retrieve information about
a particular user account on a server:
GetUserName()
LookupAccountName()
NetUserEnum()
|
| Show full article (1.05Kb) |
|
| |
no comments
|
|
  |
Author: Scott HScott H
Date: Jan 27, 2008 10:27
I'm using the LBS_WANTKEYBOARDINPUT style.
I want to prevent the user from activating the normal selection
procedure through
1. The mouse, and
2. Any keyboard key except the arrow keys.
This means I don't want the user to be able to hit 'F' and have the
listbox scroll to the next 'F' entry. I want to disable som
--or, if
needed, all--of the List Box entries so that I can process the
messages myself, using either the WM_VKEYTOITEM message or the
WM_KEYDOWN / WM_LBUTTONDOWN / WM_TIMER messages together with GetFocus
() and GetCursorPos () or GetAsyncKeyState ().
|
| |
|
| |
1 Comment |
|
  |
Author: thibarg.webthibarg.web
Date: Jan 27, 2008 05:28
Hi all,
To get and display misc infos, I use the "performance counter" (pdh...)
routines. For most infos, it's ok on both XP and Vista. But under XP, I
can't get the "private wrking set":
// __________________________
DH_HQUERY appMemQueryCounter= NULL;
PDH_HCOUNTER appMemCounter = NULL;
PDH_STATUS pdhStatus;
char counterPath [1024];
// Code using PdhLookupPerfNameByIndex to get the appropriate labels.
// At the end, counterPath contains:
// \Processus(MonAppli)\Plage de travail - Privée"
// (yes, in french ;->)
pdhStatus = PdhOpenQueryH(NULL, NULL, &appMemQueryCounter);
if(pdhStatus == ERROR_SUCCESS && appMemQueryCounter != NULL)
{
dhStatus = PdhAddCounter(appMemQueryCounter, counterPath, NULL,
&appMemCounter );
}
|
| Show full article (1.30Kb) |
|
1 Comment |
|
  |
Author: Owen RansenOwen Ransen
Date: Jan 26, 2008 23:29
On Sat, 26 Jan 2008 14:37:21 -0800 (PST), pedronf65@ gmail.com wrote:
>I use this line of code:
>m_hFile = ::CreateFile(m_csCommPortName, GENERIC_READ | GENERIC_WRITE,
>0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
It is a long times since I used this code, but you might
find something useful in it (especially the TRACE statements
after GetCommState() :
char gszPort [_MAX_PATH+1] = "COM2" ;
HANDLE hComm;
hComm = CreateFile( gszPort,
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,// FILE_FLAG_OVERLAPPED,
0);
|
| Show full article (1.37Kb) |
|
7 Comments |
|
  |
Author: InquirerInquirer
Date: Jan 24, 2008 10:19
is there a function in Win32 API allowing comparing paths? I cannot
find it:(. Maybe there is a function normalising paths that then could
be simply compared as ordinary strings?
There is Path.Equals() from .NET Framework which works perfectly for
me but I cannot unfortunately use the framework in the project...
|
| |
|
3 Comments |
|
  |
Author: JamieJamie
Date: Jan 24, 2008 04:24
Hi, i am porting some old code to win32 using the win32 file
functions. I am finally egtting somewhere. But during testing i am
reading text from a file using ReadFile and trying to display it using
wsprintf and MessageBox for testing, but all it's displaying of the
read text is gibberish?? All the numbers i am reading are ok. This is
similar to if i leave out the L"My Text here" 'L' but am not sure why
it is happening.
Simple PTSTR using malloc, and reading into the buffer. Any idea what
i am doing wrong? some conversion somewhere?
Many Thanks
Jamie
|
| |
|
3 Comments |
|
  |
Author:
Date: Jan 23, 2008 17:16
I know this is not really very on-topic for either of these groups,
but searching Google for a newsgroup dedicated to unicode or
encoding-specific groups, I didn't come up with anything ... hopefully
somebody else will have wrestled with this ...
I am parsing data which can contain UTF-8 sequences. The data is
encoded like this:
Sigur%%20R%%C3%%B3s
This represents "Sigur Rós". The second to last letter is supposed to
be this:
http://www.fileformat.info/info/unicode/char/00f3/index.htm
in case that doesn't come through correctly on your end.
So that makes sense, 0xC3 0xB3 is the correct encoding for the weird
o, "o with acute". So far, so good.
But then I realized I could have sequences like
%%C3%%B3%%20
Which would be "o with acute" followed by a space, and I don't know
how to know when to stop.
If I understand UTF-8 encoding right, I can use this logic:
|
| Show full article (1.49Kb) |
|
2 Comments |
|
  |
Author: waltbradwaltbrad
Date: Jan 23, 2008 12:51
Hopefully I'm putting the relevant bits of code here. This code uses
GetProcAddress to get commands "in process" to a server. Now,
GetProcAddress is defined as:
FARPROC GetProcAddress (
HMODULE hModule,
LPCSTR lpProcName)
What FARPROC is exactly is beyond me. The author only says "FARPROC,
like "long pointer," is an anachronism."
I've looked elsewhere with equally confusing results. My best guess is
that it is a function pointer that returns an integer.
Now, the author gives this declaration:
int (*dl_addr) (char *, char*);
This is a function pointer that takes two pointers to char and returns
an integer.
Now as you get into the code you come to this:
dl_addr = (int ( * ) (char *, char *) ) GetProcAddress (pThArg -
>dlhandle, sys_command);
|
| Show full article (1.09Kb) |
|
1 Comment |
|
  |
Author: Jens LengeJens Lenge
Date: Jan 23, 2008 11:41
Hello world,
I am looking for a simple way to have a C++ function suspend all other
active threads of the process (except the one that called the function).
I think I'll need to
a) find and enumerate all active threads of the current process,
b) identify which is the one that called my function,
c) suspend all others one by one.
Or is there a better approach?
However, I couldn't google any guide to this kind of task.
I'd appreciate if somebody can give me some hints on how to do it.
Regards,
Jens
|
| |
|
5 Comments |
|
  |
|
|
  |
Author: Larry LindstromLarry Lindstrom
Date: Jan 23, 2008 10:41
Hi Folks:
Developing on XP Media, VC6, WIN32, no MFC.
I didn't find much when I queried Google's archives for
this group.
Is there a tool or technique for recording keystrokes so
they can be replayed during a debugging session?
I'm building my first MDI app. Much works, but when I
do get it to fail it's hard to remember exactly what I did
to cause that problem.
Thanks
Larry
|
| |
|
1 Comment |
|
|
|
|
|
|